Releases: sqlkit-dev/sqlkit
Releases · sqlkit-dev/sqlkit
Release list
2.0.0
2.0.0 — 2025-06-25
Repository configuration overhaul: single config object, optional read/write table split for views.
Breaking Changes
-
Repositoryconstructor — pass one config object instead of positional arguments.// Before (1.x) new Repository("users", executor, { logging: true }); // After (2.x) new Repository({ tableName: "users", executor, logging: true });
-
RepositoryOptionsremoved —loggingandexecutorlive onRepositoryConfigalongsidetableName.
Features
-
mutableTableName— read from a view (tableName) while inserting, updating, and deleting against a base table. Omit it to usetableNamefor all operations.new Repository({ tableName: "inventory__v_items", mutableTableName: "inventory_items", executor, });
Internal
- Publish workflow uses
actions/setup-nodesoNPM_TOKENauth applies correctly in CI.
Full changelog: 1.0.19...HEAD
1.0.18
1.0.18 — 2025-06-25
PostgreSQL-focused release with a richer repository API, clearer npm packaging, and a contributor-friendly monorepo layout.
Features
findOne()— fetch a single row by where condition, or pass a full query payload (columns, order, joins) withlimit: 1applied automatically; returnsnullwhen nothing matches.- Column selection on
find()andpaginate()— passcolumns: ['id', 'email']to limit selected fields instead of always returning*. - Flexible
insert()— accept one object or an array in a single call; bulk inserts still use one round-trip. - Optional
count()filter — omitwhereto count all rows in the table. operationNamein repository logging — optional label onfind,update, anddeletelog output for easier tracing in development.
Fixes
- Quoted table identifiers — generated SQL now wraps table names in double quotes (
"users") everywhere (SELECT, INSERT, UPDATE, DELETE, JOIN, schema DDL, and foreign keys), so mixed-case table names behave correctly in PostgreSQL. PostgresAdaptererrors — database errors are thrown asSQLKITExceptionwith the original driver error attached ascausefor easier debugging.
Internal
- Repo restructured as a Bun workspaces monorepo: library in
packages/sqlkit, localapps/playgroundfor trying the API against PostgreSQL,docker composefor a test database, and CI switched to Bun. - Documentation and package metadata updated to describe sqlkit as a PostgreSQL query builder;
pgis listed as a peer dependency. - Contributor docs (
README.md,CLAUDE.md) updated for the new layout.
Full changelog: 1.0.12...HEAD
1.0.12
v1.0.0
Refactor select query builder to ensure join select clause is only in…