Registry / database / sql-bricks-sqlite

sql-bricks-sqlite

JSON →
library1.0.0jsnpmunverified

SQL-Bricks-SQLite (v1.0.0) extends the core sql-bricks library with SQLite-specific SQL generation functions such as LIMIT, OFFSET, OR REPLACE, OR ABORT, and other SQLite dialect features. It provides a transparent, schemaless builder for SELECT, INSERT, UPDATE, and DELETE statements targetting SQLite. The package has no dependencies other than sql-bricks itself. It is released as a stable package but is in maintenance mode with infrequent updates. Key differentiator: seamless integration with sql-bricks for developers already using that library.

npm install sql-bricks-sqlite
INSTALL
IMPORT
SIG · SQL-BRICKS-SQLITE
S
sql-bricks-sqlite
databasejavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import sql from 'sql-bricks-sqlite'
const sql = require('sql-bricks-sqlite')
Modern ESM import; for CommonJS use require('sql-bricks-sqlite').
select
import { select } from 'sql-bricks-sqlite'
const { select } = require('sql-bricks-sqlite')
Named export available for ESM; CommonJS require also works.
SQLiteBricks
// Browser global: var sql = SQLiteBricks;
import SQLiteBricks from 'sql-bricks-sqlite'
SQLiteBricks is a global for browser UMD builds, not a module export.

Shows basic SELECT with SQLite LIMIT and OFFSET using the sql-bricks-sqlite builder.

import sql from 'sql-bricks-sqlite'; // Build a query with SQLite-specific clauses const stmt = sql.select('name', 'age') .from('users') .where({ name: { $like: '%Fred%' } }) .limit(10) .offset(20); console.log(stmt.toString()); // Output: SELECT name, age FROM users WHERE name LIKE '%Fred%' LIMIT 10 OFFSET 20
Debug
Known issues
breakingRequires sql-bricks as a peer dependency at version >=2.0.
fix
npm install sql-bricks@^2.0.0
affects: >=1.0
deprecatedThe package is in maintenance mode and may not receive updates for newer SQLite features.
fix
Consider using a more actively maintained alternative like knex.
affects: >=1.0
gotchaBrowser usage expects global `SQLiteBricks`; not a typical module export.
fix
Use the UMD bundle and reference the global, or use a bundler with CommonJS/ESM.
affects: >=1.0
gotcha`sql-bricks-sqlite` does not sanitize input; raw strings in `.where` may lead to SQL injection.
fix
Always use parameterized objects or `sql()` template literals if available.
affects: >=1.0
Errors
Common errors & fixes
Cannot find module 'sql-bricks'
Missing peer dependency sql-bricks.
fix
Run npm install sql-bricks
sql.select is not a function
Incorrect import style in browser (library not loaded).
fix
Use the UMD bundle and access `SQLiteBricks` global, or use a module bundler.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
sql-bricksrequiredCore SQL generation library; this package provides SQLite dialect extensions.
Agent activity
23 hits · last 30 days
node
18
Meta
2
Amazon
1
OpenAI (training)
1
Resources
sql-bricks-sqlite — npm install sql-bricks-sqlite · libregistry