{"id":44785,"library":"doric-sqlite","title":"DoricSQLite","description":"DoricSQLite is an extension library for the Doric framework (>=0.8.26) that provides SQLite storage support for Doric applications. Current version is 0.2.6, with moderate release cadence. It integrates seamlessly with Doric's reactive system, allowing persistent data operations similar to other Doric data sources. Key differentiators: enables native SQLite capabilities within Doric apps without external dependencies. As a Doric extension, it follows the same data-binding and lifecycle patterns as other Doric modules.","status":"active","version":"0.2.6","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install doric-sqlite","lang":"bash","label":"npm"},{"cmd":"yarn add doric-sqlite","lang":"bash","label":"yarn"},{"cmd":"pnpm add doric-sqlite","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; DoricSQLite requires Doric framework >=0.8.26 to function.","package":"doric","optional":false}],"imports":[{"note":"The package is ESM-only, so require() will fail. Default import provides the main class.","wrong":"const DoricSQLite = require('doric-sqlite')","symbol":"default","correct":"import DoricSQLite from 'doric-sqlite'"},{"note":"Named export available for explicit imports; both default and named are equivalent.","wrong":"import DoricSQLite from 'doric-sqlite'","symbol":"DoricSQLite","correct":"import { DoricSQLite } from 'doric-sqlite'"},{"note":"TypeScript users can import the type directly for type annotations.","wrong":null,"symbol":"type","correct":"import type { DoricSQLite } from 'doric-sqlite'"}],"quickstart":{"code":"import DoricSQLite from 'doric-sqlite';\n\n// Instantiate with a database path (or default ':memory:')\nconst db = new DoricSQLite({ path: 'mydb.sqlite' });\n\n// Create a table and insert data using Doric's reactive syntax\nawait db.run(`CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)`);\nawait db.run(`INSERT INTO users (name, age) VALUES (?, ?)`, ['Alice', 30]);\n\n// Query data\nconst users = await db.all(`SELECT * FROM users`);\nconsole.log(users); // [{ id: 1, name: 'Alice', age: 30 }]\n\n// Use with Doric reactive components (if applicable, adjust per Doric version)\n// Note: The library follows Doric's async/await pattern.","lang":"typescript","description":"Shows basic SQLite database creation, table creation, insert, and query using DoricSQLite."},"warnings":[{"fix":"Pin exact version and test upgrades thoroughly.","message":"API may change significantly between minor versions before 1.0.0.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Ensure Doric is initialized before using DoricSQLite.","message":"DoricSQLite is a Doric extension; must be used inside a Doric application context.","severity":"gotcha","affected_versions":"*"},{"fix":"Use absolute paths or rely on Doric's default storage location.","message":"Database file path is relative to the app's data directory, not the current working directory.","severity":"gotcha","affected_versions":"*"},{"fix":"Replace synchronous calls with async/await.","message":"The synchronous API (e.g., `db.exec()`) is deprecated in favor of async methods (`run`, `all`).","severity":"deprecated","affected_versions":">=0.2.0"}],"env_vars":null,"search_vec":"'0.2.6':23 '0.8.26':11 'allow':36 'app':54 'applic':19 'bind':68 'cadenc':27 'capabl':51 'current':20 'data':38,44,67 'data-bind':66 'depend':57 'differenti':47 'doric':9,18,32,43,53,60,74 'doricsqlit':1,2 'enabl':48 'extens':5,61 'extern':56 'follow':63 'framework':10 'integr':29 'javascript':76 'key':46 'librari':6 'lifecycl':70 'moder':25 'modul':75 'nativ':49 'oper':39 'pattern':71 'persist':37 'provid':13 'reactiv':34 'releas':26 'seamless':30 'similar':40 'sourc':45 'sqlite':14,50 'storag':15 'support':16 'system':35 'version':21 'within':52 'without':55","created_at":"2026-06-07T12:51:49.818457+00:00","updated_at":"2026-06-07T12:51:49.818457+00:00","problems":[{"fix":"npm install doric@>=0.8.26","cause":"Missing peer dependency 'doric'.","error":"Error: Cannot find module 'doric'"},{"fix":"Ensure Doric is initialized before instantiating DoricSQLite.","cause":"DoricSQLite instance created outside Doric context.","error":"TypeError: Cannot read properties of undefined (reading 'run')"},{"fix":"Use CREATE TABLE IF NOT EXISTS before inserting/selecting.","cause":"Table not created before querying.","error":"Error: SQLITE_ERROR: no such table: users"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"doric-sqlite","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}