{"library":"o2sql","type":"library","category":null,"description":"o2sql is a lightweight JavaScript library for programmatically generating PostgreSQL queries with parameterized values. It provides a fluent API to build SELECT, INSERT, UPDATE, and DELETE statements, abstracting the SQL generation into an AST (Abstract Syntax Tree) that can be converted to `{ sql, values }` objects compatible with node-postgres (`pg`). Version 4.0.20 has no known breaking changes from earlier v4 releases. Key differentiators: simple, minimal API; automatic identifier quoting; direct integration with the `pg` library via `.toParams()`. It does not support MySQL despite the keyword.","language":"javascript","status":"active","version":"4.0.20","tags":["javascript","database","pg","postgres","postgresql","mysql","osql","o2sql"],"last_verified":"Fri Jun 05","install":[{"cmd":"npm install o2sql","imports":["const o2sql = new (require('o2sql'))();","import type { Ast } from 'o2sql'","const q = new (require('o2sql'))(); q.select(['id']).from('users').toParams();"]},{"cmd":"yarn add o2sql","imports":[]},{"cmd":"pnpm add o2sql","imports":[]}],"homepage":"https://github.com/qdechochen/o2sql#readme","github":"https://github.com/qdechochen/o2sql","docs":null,"changelog":null,"pypi":null,"npm":"o2sql","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}