{"id":42588,"library":"davesql","title":"DaveSQL","description":"A lightweight SQL interface for Node.js projects, providing a simplified API for database queries. Version 0.6.3 is current, with infrequent updates based on author's needs. It wraps callback-based SQLite operations into promises. Differentiators: minimalistic design, zero dependencies, and direct SQL execution without ORM abstractions.","status":"active","version":"0.6.3","language":"javascript","source_language":"en","source_url":"https://github.com/scripting/sql","tags":["javascript"],"install":[{"cmd":"npm install davesql","lang":"bash","label":"npm"},{"cmd":"yarn add davesql","lang":"bash","label":"yarn"},{"cmd":"pnpm add davesql","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export only; use default import for ESM.","wrong":"const { davesql } = require('davesql')","symbol":"default","correct":"import davesql from 'davesql'"},{"note":"query is a method on the default export, not a named export.","wrong":"import { query } from 'davesql'","symbol":"query","correct":"import davesql from 'davesql'; davesql.query(...)"},{"note":"Likewise, execute is a method on the default export.","wrong":"const { execute } = require('davesql')","symbol":"execute","correct":"import davesql from 'davesql'; davesql.execute(...)"}],"quickstart":{"code":"import davesql from 'davesql';\n\nconst db = davesql.create({ file: ':memory:' });\n\nawait db.query('CREATE TABLE test (id INTEGER PRIMARY KEY, name TEXT)');\nawait db.query(\"INSERT INTO test (name) VALUES ('Hello')\");\nconst rows = await db.query('SELECT * FROM test');\nconsole.log(rows); // [{ id: 1, name: 'Hello' }]\n\nawait db.close();","lang":"typescript","description":"Shows basic usage: create in-memory database, create table, insert, select, and close."},"warnings":[{"fix":"Use async methods (query, execute) instead.","message":"Using synchronous methods (e.g., querySync) can block the event loop.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use a database-specific driver for MySQL, PostgreSQL, etc.","message":"Only supports SQLite; attempts to use with other databases will fail.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use davesql.create() or davesql directly, not new davesql().","message":"Default export may be mistaken for a constructor; it is already an object.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.6.3':17 'abstract':48 'api':12 'author':25 'base':23,32 'callback':31 'callback-bas':30 'current':19 'databas':14 'davesql':1 'depend':41 'design':39 'differenti':37 'direct':43 'execut':45 'infrequ':21 'interfac':5 'javascript':49 'lightweight':3 'minimalist':38 'need':27 'node.js':7 'oper':34 'orm':47 'project':8 'promis':36 'provid':9 'queri':15 'simplifi':11 'sql':4,44 'sqlite':33 'updat':22 'version':16 'without':46 'wrap':29 'zero':40","created_at":"2026-06-05T16:55:42.240207+00:00","updated_at":"2026-06-05T16:55:42.240207+00:00","problems":[{"fix":"Use davesql.create({ file: 'db.sqlite' }) or davesql.query(...).","cause":"Called default export as a function (e.g., davesql()) instead of accessing methods.","error":"TypeError: davesql is not a function"},{"fix":"Run npm install davesql and use import davesql from 'davesql'.","cause":"Package not installed or import path incorrect.","error":"Error: Cannot find module 'davesql'"},{"fix":"Initialize with const db = davesql.create({ file: 'db.sqlite' }); then db.query(...).","cause":"Calling query on uninitialized object (likely forgot to call create).","error":"TypeError: Cannot read properties of undefined (reading 'query')"}],"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":"https://github.com/scripting/sql#readme","github":"https://github.com/scripting/sql","docs":null,"changelog":null,"pypi":null,"npm":"davesql","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-05","next_check":"2026-09-03","install_tag":null}}