Registry / database / mythix-orm-sqlite

mythix-orm-sqlite

JSON →
library3.1.0jsnpmunverified

SQLite database driver for Mythix ORM, version 3.1.0 released with TypeScript support and a moderate release cadence. It provides SQLite-specific features such as in-memory database, BIGINT auto-increment emulation, and foreign key constraint management. Designed to work seamlessly with the Mythix ORM ecosystem, it requires peer dependencies mythix-orm and mythix-orm-sql-base. Differs from other SQLite drivers by integrating with Mythix ORM's model binding and query generation.

npm install mythix-orm-sqlite
INSTALL
IMPORT
SIG · MYTHIX-ORM-SQLITE
M
mythix-orm-sqlite
databasejavascriptv3.1.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.

SQLiteConnection
import { SQLiteConnection } from 'mythix-orm-sqlite'
const SQLiteConnection = require('mythix-orm-sqlite');
ESM import is recommended; CommonJS require returns the constructor but named exports are standard. Works in both ESM and CJS environments.
SQLiteQueryGenerator
import { SQLiteQueryGenerator } from 'mythix-orm-sqlite'
import SQLiteQueryGenerator from 'mythix-orm-sqlite'
Named export, not default.
default
import SQLiteConnection from 'mythix-orm-sqlite'
const { SQLiteConnection } = require('mythix-orm-sqlite')
Default export is also the SQLiteConnection constructor for compatibility with older CommonJS patterns, but named imports are preferred.

Demonstrates creating an in-memory SQLite connection with Mythix ORM, binding models, and enabling foreign key constraints.

import { SQLiteConnection } from 'mythix-orm-sqlite'; async function main() { const connection = new SQLiteConnection({ bindModels: true, models: [], // Add your models filename: ':memory:', foreignConstraints: true, logger: console }); await connection.start(); console.log('SQLite connection established'); await connection.stop(); } main().catch(console.error);
Debug
Known issues
gotchaSQLite does not natively support BIGINT auto-increment; enabling `emulateBigIntAutoIncrement` may lead to edge-case failures.
fix
Avoid using BIGINT auto-increment in production; use emulation only for testing.
affects: >=3.0.0
gotchaForeign key constraints are disabled by default in SQLite. Setting `foreignConstraints: true` (the default) enables them via PRAGMA, but this may affect performance.
fix
Leave `foreignConstraints: true` unless you have a specific reason to disable them.
affects: >=1.0.0
deprecatedOption `boundModels` is misspelled as `boundModels` in option table; the correct option is `bindModels` (with an 'i')
fix
Use `bindModels: true` instead of `boundModels`.
affects: >=3.0.0
gotchaIf `filename` is not specified, defaults to `:memory:` which creates a volatile in-memory database.
fix
Provide a file path for persistent storage if needed.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'mythix-orm-sqlite'
Missing peer dependency or incorrect installation
fix
npm install mythix-orm mythix-orm-sql-base mythix-orm-sqlite
TypeError: Cannot read properties of undefined (reading 'SQLiteConnection')
Using default import with CommonJS require
fix
Use `const SQLiteConnection = require('mythix-orm-sqlite').SQLiteConnection` or switch to ESM import
Error: SQLITE_ERROR: no such table: ...
Models not bound or table not created
fix
Ensure `bindModels: true` and models are provided in the `models` array with proper schema definitions
Upgrade
Version history
3.1.0latest on npm
Audit
Dependencies
mythix-ormrequiredPeer dependency required for ORM functionality
mythix-orm-sql-baserequiredPeer dependency providing SQL base classes
Agent activity
4 hits · last 30 days
node
4
Resources
mythix-orm-sqlite — npm install mythix-orm-sqlite · libregistry