A lightweight JavaScript/TypeScript library that generates SQL query strings from a chainable API. Version 1.0.0 provides methods to build SELECT, INSERT, UPDATE, DELETE queries with support for WHERE, JOIN, GROUP BY, ORDER BY, and LIMIT clauses. It is designed for Node.js environments and ships TypeScript declarations. The library is minimal with no dependencies, offering a simple alternative to full ORMs like knex.js for cases where raw SQL strings are needed. Release cadence is unknown, but the API covers basic CRUD operations with chaining.
npm install sql-gNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import sql-g and build a SELECT query with conditions, ordering, and limit using method chaining.
npm install sql-g
Use 'type': 'module' in package.json or use require() for CommonJS.
Ensure you call .getQuery() after building the query.
Use select([['field1'], ['field2']]) or select(['field1', 'field2']) (depends on version; check docs).
Refer to the actual implementation or test the API before relying on it.
Use default import: import sqlG from 'sql-g'
Run npm install sql-g
Use require('sql-g') or add 'type': 'module' to package.json.No dependency data recorded yet.