Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

SQB Logo


NPM Version NPM Downloads CI Tests Test Coverage

About SQB

SQB is an extensible, multi-dialect SQL query builder and Database connection wrapper for NodeJS.

About @sqb/sqlite

This package is a SQB Adapter for SQLite that uses the runtime's own native SQLite bindings instead of a WASM build:

The correct driver is picked automatically at runtime — no configuration needed. If you need SQLite support on a runtime without a native driver (e.g. older Node versions, or in the browser), use @sqb/sqljs instead — both adapters share the same @sqb/sqlite-dialect SQL serialization rules, so queries behave identically either way.

Installation

$ npm install @sqb/sqlite --save

Usage

import '@sqb/sqlite';
import { SqbClient } from '@sqb/connect';

const client = new SqbClient({
  driver: 'sqlite',
  database: '/path/to/database.db', // or ':memory:'
});

Node Compatibility

  • node >= 22.5 (for node:sqlite), or any recent Bun version (for bun:sqlite)

License

SQB is available under MIT license.