sqlite-ts (v0.1.0) is an ORM for SQLite databases targeting TypeScript/JavaScript applications, including React Native and Expo. It provides decorators (@Primary, @Column) to define entities, automatic table creation, and CRUD operations. The library wraps a driver (e.g., node-sqlite3) and simplifies SQLite interactions with transaction support. It differentiates by offering a TypeScript-first API with decorators and a simple entity mapping. No recent releases; likely in early development.
npm install sqlite-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a Person entity with decorators, connects to in-memory SQLite, creates table, and inserts a row.
For individual primary keys, insert one by one or use transaction with exec and .then.
Initialize all properties in the class definition.
Set `createTables: true` in Db.init or manually create tables after init.
Use `exec(tables.Entity.insert(...))` and attach `.then()` to get individual results.
Use `import sqlite3 from 'sqlite3'` in ESM.
Run `npm install sqlite-ts sqlite3`
Add `"experimentalDecorators": true` to tsconfig.json
Ensure you have the latest version (0.1.0) and check if types are exported correctly.