Database

Query Builder

Fluent SQL query builder with parameterized queries.

1 min readDocumentationEdit this page

SELECT#

typescript
const users = await db
  .select('id', 'name', 'email')
  .from('users')
  .where('active', true)
  .orderBy('name', 'ASC')
  .limit(10)
  .all()

INSERT#

typescript
await db.insert('users', { name: 'Tariq', email: 'tariq@axiljs.dev' }).execute()

UPDATE#

typescript
await db.update('users').set({ name: 'Tariq Mehmood' }).where('id', 1).execute()

DELETE#

typescript
await db.delete('users').where('id', 1).execute()

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY