GenQL is a lightweight SQL query generation and formatting library for Node.js, designed to simplify dynamic SQL construction using model definitions. It is currently at version 2.0.1, with a stable release cadence. Unlike full-featured ORMs or query builders like Knex or Sequelize, GenQL focuses on generating SELECT, INSERT, and UPDATE queries based on a JSON model that defines fields, defaults, aliases, and private flags. It supports optional field prefixes, automatic exclusion of private or auto-generated columns, and offers helpers for value extraction and privacy filtering. Suitable for small to medium projects where a minimal, model-driven SQL helper is preferred over heavy abstractions. It is not actively maintained; the last release and commit were in 2019, and Travis CI badge indicates legacy infrastructure.
npm install genqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows instantiation with a JSON model and using _select to get field names with optional prefix.
Ensure model has table and columns properties as shown in the quickstart or the sample model.json.
Mark auto-increment fields with 'auto: true' to automatically exclude from INSERT queries.
Consider migrating to actively maintained query builders like Knex or Prisma for new projects.
Pass a valid model object: new GenQL({ table: '...', columns: [...] });Use const GenQL = require('genql'); (CommonJS) or import GenQL from 'genql' (ESM if supported).No dependency data recorded yet.