Skip to main content

@sqb/sqlite-dialect

SQB's dialect plugin for SQLite — teaches @sqb/builder how to render SQLite's SQL syntax. It's shared by both SQLite adapters: @sqb/sqlite (native, node:sqlite/bun:sqlite) and @sqb/sqljs (WebAssembly, sql.js) — since sql.js is SQLite-flavored, it registers under the same 'sqlite' dialect name rather than SQB shipping a separate sqljs-dialect package.

No exported API

This package exports nothing. Its entire effect is a side effect of importing it: it constructs an internal SqliteSerializer (not exported) and registers it with SerializerRegistry for dialect: 'sqlite'.

import '@sqb/sqlite-dialect';

@sqb/sqlite imports this package internally as part of its own entry point; @sqb/sqljs does not import it automatically, so importing @sqb/sqlite-dialect yourself is required alongside @sqb/sqljs. Either way, you don't need to import it yourself when only using @sqb/builder standalone (no @sqb/connect/adapter) and you still want .generate({ dialect: 'sqlite' }) to render SQLite SQL.

See also