# brianc/node-sql

SQL generation for node.js

Repository: https://github.com/brianc/node-sql
Canonical: https://ross.abutalabs.com/products/node-sql
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2024-08-24T20:44:34+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5500, "days_push": 739, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1040, forks 190 (observed 2026-08-28T04:03:20.420909+00:00)

## What it is
node-sql is a SQL string builder library for Node.js that lets developers define tables in JavaScript and compose parameterized SQL queries programmatically. It supports multiple SQL dialects including PostgreSQL, MySQL, Microsoft SQL Server, Oracle, and SQLite.

## Use cases
- build parameterized SQL queries in node.js without writing raw strings
- generate SQL for postgres, mysql, sqlite, mssql, or oracle from javascript
- compose reusable query fragments like joins and where clauses
- avoid SQL injection by generating parameterized queries
- define table schemas in javascript and query them fluently

## When to choose
- you want lightweight SQL generation without a full ORM
- you need composable, parameterized queries across multiple SQL dialects
- you prefer building queries programmatically in JavaScript

## When to avoid
- you need a full ORM with migrations, models, and relationships
- you want an actively developed library with modern features
- you need NoSQL or non-SQL database support

## Facets
- artifact type: library
- maturity: maintenance
- function: database, orm, serialization
- domain: databases, developer-tools, backend
- platform: -
- tags: sql-builder, query-builder, parameterized-queries, sql-dialects, postgres, mysql, sqlite, mssql, nodejs, javascript

## Member repositories
- brianc/node-sql (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:20.420909+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:03:28.741065+00:00, confidence not recorded.
  - readme: https://github.com/brianc/node-sql (fetched 2026-08-28T04:03:20.420909+00:00, sha 136dbcebdb3b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
