websql-orm is an ORM framework for TypeScript, Angular, Cordova, and browser environments that wraps WebSQL and SQLite databases. Version 2.6.1 is the latest stable release, with regular updates. It uses decorators to define tables, columns, and foreign key references, generating SQL schemas automatically. Key differentiators: supports both browser WebSQL and Cordova sqlite-storage via a config flag, provides a Table base class for entity models, and includes methods like insert, update, delete, and raw SQL queries. It is designed for Angular developers needing offline-first mobile or web apps with minimal SQL boilerplate.
npm install websql-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows defining a table with decorators, inserting a record, and querying with parameters.
Install version 2.1.0 or later: npm install websql-orm@latest
import { EnvConfig } from 'websql-orm'; EnvConfig.useCordovaSqliteStorage = true;Add "experimentalDecorators": true to tsconfig.json compilerOptions.
Ensure each entity class extends Table.
Use raw SQL for foreign key constraints instead.
Use: import { Table } from 'websql-orm';Run: npm install websql-orm@latest
Add "experimentalDecorators": true to tsconfig.json compilerOptions.
Use: import { sqlite } from 'websql-orm';