@uql/core 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +134 -187
- package/package.json +31 -26
- package/dist/CHANGELOG.md +0 -186
- package/dist/package.json +0 -131
- package/src/@types/index.d.ts +0 -1
- package/src/@types/jest.d.ts +0 -6
- package/src/browser/http/bus.spec.ts +0 -22
- package/src/browser/http/bus.ts +0 -17
- package/src/browser/http/http.spec.ts +0 -70
- package/src/browser/http/http.ts +0 -55
- package/src/browser/http/index.ts +0 -2
- package/src/browser/index.ts +0 -4
- package/src/browser/options.spec.ts +0 -37
- package/src/browser/options.ts +0 -18
- package/src/browser/querier/genericClientRepository.spec.ts +0 -105
- package/src/browser/querier/genericClientRepository.ts +0 -49
- package/src/browser/querier/httpQuerier.ts +0 -82
- package/src/browser/querier/index.ts +0 -3
- package/src/browser/querier/querier.util.spec.ts +0 -35
- package/src/browser/querier/querier.util.ts +0 -18
- package/src/browser/type/clientQuerier.ts +0 -45
- package/src/browser/type/clientQuerierPool.ts +0 -5
- package/src/browser/type/clientRepository.ts +0 -22
- package/src/browser/type/index.ts +0 -4
- package/src/browser/type/request.ts +0 -25
- package/src/dialect/abstractDialect.ts +0 -28
- package/src/dialect/abstractSqlDialect-spec.ts +0 -1309
- package/src/dialect/abstractSqlDialect.ts +0 -805
- package/src/dialect/index.ts +0 -3
- package/src/dialect/namingStrategy.spec.ts +0 -52
- package/src/dialect/queryContext.ts +0 -69
- package/src/entity/decorator/definition.spec.ts +0 -736
- package/src/entity/decorator/definition.ts +0 -265
- package/src/entity/decorator/entity.ts +0 -8
- package/src/entity/decorator/field.ts +0 -9
- package/src/entity/decorator/id.ts +0 -9
- package/src/entity/decorator/index.ts +0 -5
- package/src/entity/decorator/relation.spec.ts +0 -41
- package/src/entity/decorator/relation.ts +0 -34
- package/src/entity/index.ts +0 -1
- package/src/express/@types/express.d.ts +0 -8
- package/src/express/@types/index.d.ts +0 -1
- package/src/express/index.ts +0 -2
- package/src/express/querierMiddleware.ts +0 -217
- package/src/express/query.util.spec.ts +0 -40
- package/src/express/query.util.ts +0 -21
- package/src/index.ts +0 -9
- package/src/maria/index.ts +0 -3
- package/src/maria/mariaDialect.spec.ts +0 -207
- package/src/maria/mariaDialect.ts +0 -42
- package/src/maria/mariaQuerierPool.test.ts +0 -23
- package/src/maria/mariadbQuerier.test.ts +0 -23
- package/src/maria/mariadbQuerier.ts +0 -45
- package/src/maria/mariadbQuerierPool.ts +0 -21
- package/src/migrate/cli.ts +0 -301
- package/src/migrate/generator/index.ts +0 -4
- package/src/migrate/generator/mongoSchemaGenerator.spec.ts +0 -112
- package/src/migrate/generator/mongoSchemaGenerator.ts +0 -115
- package/src/migrate/generator/mysqlSchemaGenerator.spec.ts +0 -34
- package/src/migrate/generator/mysqlSchemaGenerator.ts +0 -92
- package/src/migrate/generator/postgresSchemaGenerator.spec.ts +0 -44
- package/src/migrate/generator/postgresSchemaGenerator.ts +0 -127
- package/src/migrate/generator/sqliteSchemaGenerator.spec.ts +0 -33
- package/src/migrate/generator/sqliteSchemaGenerator.ts +0 -81
- package/src/migrate/index.ts +0 -41
- package/src/migrate/introspection/index.ts +0 -4
- package/src/migrate/introspection/mongoIntrospector.spec.ts +0 -75
- package/src/migrate/introspection/mongoIntrospector.ts +0 -47
- package/src/migrate/introspection/mysqlIntrospector.spec.ts +0 -113
- package/src/migrate/introspection/mysqlIntrospector.ts +0 -278
- package/src/migrate/introspection/postgresIntrospector.spec.ts +0 -112
- package/src/migrate/introspection/postgresIntrospector.ts +0 -329
- package/src/migrate/introspection/sqliteIntrospector.spec.ts +0 -112
- package/src/migrate/introspection/sqliteIntrospector.ts +0 -296
- package/src/migrate/migrator-mongo.test.ts +0 -54
- package/src/migrate/migrator.spec.ts +0 -255
- package/src/migrate/migrator.test.ts +0 -94
- package/src/migrate/migrator.ts +0 -719
- package/src/migrate/namingStrategy.spec.ts +0 -22
- package/src/migrate/schemaGenerator-advanced.spec.ts +0 -138
- package/src/migrate/schemaGenerator.spec.ts +0 -190
- package/src/migrate/schemaGenerator.ts +0 -478
- package/src/migrate/storage/databaseStorage.spec.ts +0 -69
- package/src/migrate/storage/databaseStorage.ts +0 -100
- package/src/migrate/storage/index.ts +0 -2
- package/src/migrate/storage/jsonStorage.ts +0 -58
- package/src/migrate/type.ts +0 -1
- package/src/mongo/index.ts +0 -3
- package/src/mongo/mongoDialect.spec.ts +0 -251
- package/src/mongo/mongoDialect.ts +0 -238
- package/src/mongo/mongodbQuerier.test.ts +0 -45
- package/src/mongo/mongodbQuerier.ts +0 -256
- package/src/mongo/mongodbQuerierPool.test.ts +0 -25
- package/src/mongo/mongodbQuerierPool.ts +0 -24
- package/src/mysql/index.ts +0 -3
- package/src/mysql/mysql2Querier.test.ts +0 -20
- package/src/mysql/mysql2Querier.ts +0 -49
- package/src/mysql/mysql2QuerierPool.test.ts +0 -20
- package/src/mysql/mysql2QuerierPool.ts +0 -21
- package/src/mysql/mysqlDialect.spec.ts +0 -20
- package/src/mysql/mysqlDialect.ts +0 -16
- package/src/namingStrategy/defaultNamingStrategy.ts +0 -18
- package/src/namingStrategy/index.spec.ts +0 -36
- package/src/namingStrategy/index.ts +0 -2
- package/src/namingStrategy/snakeCaseNamingStrategy.ts +0 -15
- package/src/options.spec.ts +0 -41
- package/src/options.ts +0 -18
- package/src/postgres/index.ts +0 -3
- package/src/postgres/manual-types.d.ts +0 -4
- package/src/postgres/pgQuerier.test.ts +0 -25
- package/src/postgres/pgQuerier.ts +0 -45
- package/src/postgres/pgQuerierPool.test.ts +0 -28
- package/src/postgres/pgQuerierPool.ts +0 -21
- package/src/postgres/postgresDialect.spec.ts +0 -428
- package/src/postgres/postgresDialect.ts +0 -144
- package/src/querier/abstractQuerier-test.ts +0 -584
- package/src/querier/abstractQuerier.ts +0 -353
- package/src/querier/abstractQuerierPool-test.ts +0 -20
- package/src/querier/abstractQuerierPool.ts +0 -18
- package/src/querier/abstractSqlQuerier-spec.ts +0 -979
- package/src/querier/abstractSqlQuerier-test.ts +0 -21
- package/src/querier/abstractSqlQuerier.ts +0 -138
- package/src/querier/decorator/index.ts +0 -3
- package/src/querier/decorator/injectQuerier.spec.ts +0 -74
- package/src/querier/decorator/injectQuerier.ts +0 -45
- package/src/querier/decorator/serialized.spec.ts +0 -98
- package/src/querier/decorator/serialized.ts +0 -13
- package/src/querier/decorator/transactional.spec.ts +0 -240
- package/src/querier/decorator/transactional.ts +0 -56
- package/src/querier/index.ts +0 -4
- package/src/repository/genericRepository.spec.ts +0 -111
- package/src/repository/genericRepository.ts +0 -74
- package/src/repository/index.ts +0 -1
- package/src/sqlite/index.ts +0 -3
- package/src/sqlite/manual-types.d.ts +0 -4
- package/src/sqlite/sqliteDialect.spec.ts +0 -155
- package/src/sqlite/sqliteDialect.ts +0 -76
- package/src/sqlite/sqliteQuerier.spec.ts +0 -36
- package/src/sqlite/sqliteQuerier.test.ts +0 -21
- package/src/sqlite/sqliteQuerier.ts +0 -37
- package/src/sqlite/sqliteQuerierPool.test.ts +0 -12
- package/src/sqlite/sqliteQuerierPool.ts +0 -38
- package/src/test/entityMock.ts +0 -375
- package/src/test/index.ts +0 -3
- package/src/test/it.util.ts +0 -69
- package/src/test/spec.util.ts +0 -57
- package/src/type/entity.ts +0 -218
- package/src/type/index.ts +0 -9
- package/src/type/migration.ts +0 -241
- package/src/type/namingStrategy.ts +0 -17
- package/src/type/querier.ts +0 -143
- package/src/type/querierPool.ts +0 -26
- package/src/type/query.ts +0 -506
- package/src/type/repository.ts +0 -142
- package/src/type/universalQuerier.ts +0 -133
- package/src/type/utility.ts +0 -21
- package/src/util/dialect.util-extra.spec.ts +0 -96
- package/src/util/dialect.util.spec.ts +0 -23
- package/src/util/dialect.util.ts +0 -134
- package/src/util/index.ts +0 -5
- package/src/util/object.util.spec.ts +0 -29
- package/src/util/object.util.ts +0 -27
- package/src/util/raw.ts +0 -11
- package/src/util/sql.util-extra.spec.ts +0 -17
- package/src/util/sql.util.spec.ts +0 -208
- package/src/util/sql.util.ts +0 -104
- package/src/util/string.util.spec.ts +0 -46
- package/src/util/string.util.ts +0 -35
- package/tsconfig.build.json +0 -5
- package/tsconfig.json +0 -8
- /package/{dist/README.md → README.md} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,29 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [3.1.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* adjust relative paths for README and CHANGELOG in copyfiles script ([741c2ee](https://github.com/rogerpadilla/uql/commit/741c2ee8839376ca89a860a53950ef6b6d234596))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# [3.1.0](https://github.com/rogerpadilla/uql/compare/@uql/core@3.0.0...@uql/core@3.1.0) (2025-12-30)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Bug Fixes
|
|
21
|
-
|
|
22
|
-
* adjust relative paths for README and CHANGELOG in copyfiles script ([7a61a01](https://github.com/rogerpadilla/uql/commit/7a61a0135da2d0459e588cda7d94f324bb9eebca))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
# [3.0.0](https://github.com/rogerpadilla/uql/compare/@uql/core@2.0.0...@uql/core@3.0.0) (2025-12-30)
|
|
6
|
+
## [3.1.2](https://github.com/rogerpadilla/uql/compare/@uql/core@3.1.1...@uql/core@3.1.2) (2025-12-30)
|
|
29
7
|
|
|
30
8
|
**Note:** Version bump only for package @uql/core
|
|
31
9
|
|
|
@@ -33,233 +11,202 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
33
11
|
|
|
34
12
|
|
|
35
13
|
|
|
36
|
-
#
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### Features
|
|
40
|
-
|
|
41
|
-
* Add Bun.js compatibility to SQLite querier pool and refactor naming strategy test entities. ([9f1f1f5](https://github.com/rogerpadilla/uql/commit/9f1f1f52c1b0e70d6f8356ee2bd6eeb530b5b907))
|
|
42
|
-
* Add date handling and upsert tests to SQL dialects and remove bun coverage threshold. ([1edb0ed](https://github.com/rogerpadilla/uql/commit/1edb0ed329dc5a5c3e0b9a153b27260a519ccc4b))
|
|
43
|
-
* replace project logo with new SVG and refactor test expectations to use `expect.anything()`. ([88063e6](https://github.com/rogerpadilla/uql/commit/88063e63d33da41bbd6741f17d850e34daa3fc45))
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## 0.4.10 (2020-11-18)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## 0.4.9 (2020-11-18)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## 0.4.8 (2020-11-18)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## 0.4.7 (2020-11-18)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
## 0.4.6 (2020-11-16)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## 0.4.5 (2020-11-14)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
## 0.4.4 (2020-11-14)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
## 0.4.3 (2020-11-14)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
## 0.4.2 (2020-11-14)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## 0.3.6 (2020-10-02)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## 0.3.5 (2020-10-02)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
## 0.3.4 (2020-10-02)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## 0.3.3 (2020-10-02)
|
|
14
|
+
# Changelog
|
|
96
15
|
|
|
16
|
+
All notable changes to this project will be documented in this file. Please add new changes to the top.
|
|
97
17
|
|
|
18
|
+
date format is [yyyy-mm-dd]
|
|
98
19
|
|
|
99
|
-
##
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
### Bug Fixes
|
|
103
|
-
|
|
104
|
-
* return proper auto-generated id when inserting many records ([7080173](https://github.com/rogerpadilla/uql/commit/708017399b395e75e988a081976d08c8cde730fa))
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
## 0.3.1 (2020-10-01)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
# 0.3.0 (2020-10-01)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### Features
|
|
116
|
-
|
|
117
|
-
* **logger:** support for custom logger and logging-level ([#1](https://github.com/rogerpadilla/uql/issues/1)) ([4e02dd3](https://github.com/rogerpadilla/uql/commit/4e02dd33194f3c50fcbeea7f957e07661e61f44e))
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
## 0.2.8 (2020-09-29)
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
### Bug Fixes
|
|
125
|
-
|
|
126
|
-
* support negative project of properties ([13a6d03](https://github.com/rogerpadilla/uql/commit/13a6d03138210f232fea3b8d4cb9dfc462f4c07e))
|
|
127
|
-
* support negative project of properties ([0e669b5](https://github.com/rogerpadilla/uql/commit/0e669b569dee1bd2467cfa1636d425a89a2b8fc0))
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
## 0.2.7 (2020-09-27)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
### Bug Fixes
|
|
135
|
-
|
|
136
|
-
* support negative project of properties ([2c3f285](https://github.com/rogerpadilla/uql/commit/2c3f2856ae71d69aca19dc9fa1dd2ab8184c438b))
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
## 0.2.6 (2020-09-27)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
## 0.2.5 (2020-09-27)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
## 0.2.4 (2020-09-27)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
## 0.2.3 (2020-09-26)
|
|
153
|
-
|
|
154
|
-
|
|
20
|
+
## [3.1.1](https://github.com/rogerpadilla/uql/compare/@uql/core@3.1.0...@uql/core@3.1.1) (2025-12-30)
|
|
155
21
|
### Bug Fixes
|
|
22
|
+
* adjust relative paths for README and CHANGELOG in copyfiles script ([741c2ee](https://github.com/rogerpadilla/uql/commit/741c2ee8839376ca89a860a53950ef6b6d234596))
|
|
156
23
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
## 0.2.2 (2020-09-26)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
## 0.2.1 (2020-09-26)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
# 0.2.0 (2020-09-26)
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
### Features
|
|
173
|
-
|
|
174
|
-
* support for 'count' when querying multiple entities via API ([05d95b7](https://github.com/rogerpadilla/uql/commit/05d95b74746a923edbb9652d489c81c25a241d66))
|
|
175
|
-
* support for 'count' when querying multiple entities via API ([e147096](https://github.com/rogerpadilla/uql/commit/e1470963014331a3499ee2128e1dfd01c24df355))
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
## 0.1.21 (2020-09-21)
|
|
180
|
-
|
|
181
|
-
|
|
24
|
+
## [3.1.0](https://github.com/rogerpadilla/uql/compare/@uql/core@3.0.0...@uql/core@3.1.0) (2025-12-30)
|
|
182
25
|
### Bug Fixes
|
|
183
26
|
|
|
184
|
-
*
|
|
185
|
-
|
|
27
|
+
* adjust relative paths for README and CHANGELOG in copyfiles script ([7a61a01](https://github.com/rogerpadilla/uql/commit/7a61a0135da2d0459e588cda7d94f324bb9eebca))
|
|
186
28
|
|
|
29
|
+
## [3.0.0](https://github.com/rogerpadilla/uql/compare/@uql/core@2.0.0...@uql/core@3.0.0) (2025-12-30)
|
|
30
|
+
Reflect major changes in the package structure and dependencies.
|
|
187
31
|
|
|
188
|
-
## 0.
|
|
32
|
+
## [2.0.0] - 2025-12-29
|
|
33
|
+
- **Major Rebranding**: Rebranded the project from **Nukak** to **UQL** (Universal Query Language - this was the original name!).
|
|
34
|
+
- New Slogan: **"One Language. Frontend to Backend."**
|
|
35
|
+
- Project homepage: [uql.app](https://uql.app).
|
|
36
|
+
- **Package Unification**: Unified all database adapters (`mysql`, `postgres`, `maria`, `sqlite`, `mongo`) and `express` middleware into a single core package: `@uql/core`.
|
|
37
|
+
- **Scoped Naming**:
|
|
38
|
+
- `@uql/core`: The main ORM engine and all database adapters.
|
|
39
|
+
- `@uql/migrate`: The database migration system (formerly `nukak-migrate`).
|
|
40
|
+
- **Improved API Surface**:
|
|
41
|
+
- Database-specific logic is now accessible via sub-paths (e.g., `import { ... } from '@uql/core/postgres'`).
|
|
42
|
+
- Unified `NamingStrategy` and `QueryContext` across all unified adapters.
|
|
43
|
+
- **Build & Distribution**:
|
|
44
|
+
- Integrated `bunchee` for high-performance browser bundle generation (`@uql/core/browser`).
|
|
45
|
+
- Minimized core dependency footprint by moving database drivers to optional `peerDependencies`.
|
|
46
|
+
- **Enhanced Type Safety**: Fully updated internal type resolution to support the unified package structure.
|
|
189
47
|
|
|
48
|
+
## [1.8.0] - 2025-12-29
|
|
49
|
+
- **New Feature**: Added support for **Naming Strategies**.
|
|
50
|
+
- Automatically translate TypeScript entity and property names to database-specific identifiers (e.g., camelCase to snake_case).
|
|
51
|
+
- Built-in `DefaultNamingStrategy` and `SnakeCaseNamingStrategy`.
|
|
52
|
+
- Comprehensive support across all SQL dialects and MongoDB.
|
|
53
|
+
- **Refactoring**:
|
|
54
|
+
- Unified naming and metadata resolution logic into a new `AbstractDialect` base class shared by both DML (Dialects) and DDL (Schema Generators).
|
|
55
|
+
- Improved `MongoDialect` to respect naming strategies for collection and field names on both read and write operations.
|
|
190
56
|
|
|
191
|
-
|
|
57
|
+
## [1.7.0] - 2025-12-29
|
|
58
|
+
- **New Package**: Introduced `nukak-migrate` for database migrations.
|
|
59
|
+
- Supports version-controlled schema changes via local migration files.
|
|
60
|
+
- Automatic migration generation from entity definitions using schema introspection.
|
|
61
|
+
- Full support for PostgreSQL, MySQL, MariaDB, and SQLite.
|
|
62
|
+
- CLI tool for managing migrations (`up`, `down`, `status`, `generate`, `sync`).
|
|
63
|
+
- Database-backed migration tracking (Database or JSON storage).
|
|
64
|
+
- **Core Improvements**:
|
|
65
|
+
- Expanded `@Field()` decorator with schema metadata: `length`, `precision`, `scale`, `unique`, `index`, `columnType`, `defaultValue`, and `comment`.
|
|
66
|
+
- Added schema generation and introspection capabilities to SQL dialects.
|
|
192
67
|
|
|
193
|
-
|
|
68
|
+
## [1.6.0] - 2025-12-28
|
|
69
|
+
- **Architectural Change**: Migrated from "Values as Parameter" to "Context Object" pattern for SQL generation.
|
|
70
|
+
- This pattern centralizes query parameters and SQL fragments into a `QueryContext`, ensuring robust placeholder management and preventing out-of-sync parameter indices.
|
|
71
|
+
- Improved compatibility with PostgreSQL's indexed placeholders ($1, $2, etc.) and complex sub-queries.
|
|
72
|
+
- Standardized dialect interfaces to operate directly on the `QueryContext` for higher performance and cleaner code.
|
|
73
|
+
- Fixed linter issues and unified type safety for `raw()` SQL snippets across all drivers.
|
|
194
74
|
|
|
75
|
+
## [1.5.0] - 2025-12-28
|
|
76
|
+
- **BREAKING CHANGE**: Implemented "Sticky Connections" for performance. `Querier` instances now hold their connection until `release()` is explicitly called.
|
|
77
|
+
- If you manually retrieve a querier via `pool.getQuerier()`, you **MUST** call `await querier.release()` when finished, otherwise connections will leak.
|
|
78
|
+
- `Repositories` and `pool.transaction(...)` callbacks automatically handle this, so high-level usage remains unchanged.
|
|
79
|
+
- Unified serialization logic: `@Serialized()` decorator is now centralized in `AbstractSqlQuerier`, removing redundant overrides in drivers.
|
|
80
|
+
- Fixed MongoDB consistency: `beginTransaction`, `commitTransaction`, and `rollbackTransaction` are now serialized to prevent race conditions.
|
|
81
|
+
- Fix Cross-Dialect SQL JSON bug by moving PostgreSQL-specific casts to the appropriate dialect.
|
|
82
|
+
- Fix transaction race conditions by serializing transaction lifecycle methods and implementing an internal execution pattern.
|
|
195
83
|
|
|
84
|
+
## [1.4.16] - 2025-12-28
|
|
196
85
|
|
|
197
|
-
|
|
86
|
+
- Implement a "Serialized Task Queue" at the core of the framework to ensure database connections are thread-safe and race-condition free.
|
|
87
|
+
- Introduce `@Serialized()` decorator to simplify the serialization of database operations across all drivers.
|
|
198
88
|
|
|
89
|
+
## [1.4.14] - 2025-12-28
|
|
199
90
|
|
|
91
|
+
- Robust `upsert` implementation across all SQL dialects (PostgreSQL, MySQL, MariaDB, SQLite).
|
|
200
92
|
|
|
201
|
-
##
|
|
93
|
+
## [1.4.10] - 2025-12-27
|
|
202
94
|
|
|
95
|
+
- Improve types, tests, migrate from EsLint/Prettier to Biome, and update dependencies.
|
|
203
96
|
|
|
97
|
+
## [1.4.6] - 2024-11-06
|
|
204
98
|
|
|
205
|
-
|
|
99
|
+
- Update dependencies and improve readme.
|
|
206
100
|
|
|
101
|
+
## [1.4.5] - 2024-09-26
|
|
207
102
|
|
|
103
|
+
- Imperative transactions have to be closed manually.
|
|
208
104
|
|
|
209
|
-
##
|
|
105
|
+
## [1.4.4] - 2024-09-26
|
|
210
106
|
|
|
107
|
+
- Ensure own connection is always released even if exception occurs.
|
|
108
|
+
- Correct issue when empty or null list is passed to `insertMany` operations.
|
|
211
109
|
|
|
110
|
+
## [1.4.3] - 2024-09-25
|
|
212
111
|
|
|
213
|
-
|
|
112
|
+
- Ensure the connection is auto-released after `commit` or `rollback` runs.
|
|
113
|
+
- Update dependencies.
|
|
214
114
|
|
|
115
|
+
## [1.4.2] - 2024-09-20
|
|
215
116
|
|
|
117
|
+
- Fix projection of `@OneToMany` field when the 'one' side produces empty result.
|
|
118
|
+
- Update dependencies.
|
|
216
119
|
|
|
217
|
-
##
|
|
120
|
+
## [1.4.1] - 2024-08-21
|
|
218
121
|
|
|
122
|
+
- Add nukak-maku logo.
|
|
123
|
+
- Update dependencies (functionality keeps the same in this release).
|
|
219
124
|
|
|
125
|
+
## [1.4.0] - 2024-08-15
|
|
220
126
|
|
|
221
|
-
|
|
127
|
+
- Automatically release the querier unless it is inside a current transaction.
|
|
128
|
+
- Remove unnecessary wrapper for transactions from `AbstractQuerierPool` class.
|
|
222
129
|
|
|
130
|
+
## [1.3.3] - 2024-08-13
|
|
223
131
|
|
|
132
|
+
- Improve typings of first inserted ID.
|
|
224
133
|
|
|
225
|
-
##
|
|
134
|
+
## [1.3.2] - 2024-08-13
|
|
226
135
|
|
|
136
|
+
- Return the inserted IDs in the response of the queriers' `run` function.
|
|
227
137
|
|
|
138
|
+
## [1.3.1] - 2024-08-13
|
|
228
139
|
|
|
229
|
-
|
|
140
|
+
- Fix an issue related to the `$where` condition of selected relations missed in the final criteria for `@OneToMany` and `@ManyToMany` relationships.
|
|
230
141
|
|
|
142
|
+
## [1.3.0] - 2024-08-13
|
|
231
143
|
|
|
144
|
+
- Add support for `json` and `jsonb` fields. Automatically parse the JSON values when persisting with `JSON.parse` function.
|
|
145
|
+
- Improve type-safety in general.
|
|
146
|
+
- Move `getPersistables` inside dialect for higher reusability.
|
|
147
|
+
- Add support for `vector` fields.
|
|
232
148
|
|
|
233
|
-
##
|
|
149
|
+
## [1.2.0] - 2024-08-12
|
|
234
150
|
|
|
151
|
+
- Add support for `raw` in values (previously, it was only supported by `$select` and `$where` operators). Allows safe use of any SQL query/clause as the value in an insert or update operation that shouldn't be automatically escaped by the ORM.
|
|
235
152
|
|
|
153
|
+
## [1.1.0] - 2024-08-11
|
|
236
154
|
|
|
237
|
-
|
|
155
|
+
- Add support for `upsert` operations.
|
|
156
|
+
- Migrate SQLite package driver from `sqlite3` to `better-sqlite3` for better performance.
|
|
157
|
+
- Make Maria package to use the `RETURNING id` clause to get the inserted IDs.
|
|
238
158
|
|
|
159
|
+
## [1.0.1] - 2024-08-10
|
|
239
160
|
|
|
161
|
+
- Rename `$project` operator to `$select` for consistency with most established frameworks so far.
|
|
162
|
+
- Rename `$filter` operator to `$where` for consistency with most established frameworks so far.
|
|
240
163
|
|
|
241
|
-
## 0.
|
|
164
|
+
## [1.0.0] - 2024-08-10
|
|
242
165
|
|
|
166
|
+
- Allow to set a field as non-eager (i.e. lazy) with `eager: false` (by default fields are `eager: true`).
|
|
167
|
+
- Allow to set a field as non-updatable (i.e. insertable and read-only) with `updatable: false` (by default fields are `updatable: true`).
|
|
243
168
|
|
|
169
|
+
## [0.4.0] - 2023-11-06
|
|
244
170
|
|
|
245
|
-
|
|
171
|
+
- Move project inside query parameter [#63](https://github.com/rogerpadilla/nukak/pull/63)
|
|
246
172
|
|
|
173
|
+
## [0.3.3] - 2023-10-25
|
|
247
174
|
|
|
175
|
+
- Update usage example in the README.md.
|
|
248
176
|
|
|
249
|
-
## 0.
|
|
177
|
+
## [0.3.2] - 2023-10-24
|
|
250
178
|
|
|
179
|
+
- Improve usage examples in the README.md, and make the overview section more concise.
|
|
251
180
|
|
|
181
|
+
## [0.3.1] - 2023-10-19
|
|
252
182
|
|
|
253
|
-
|
|
183
|
+
1. Remove `$group` and `$having` as they detriment type safety as currently implemented (support may be redesigned later if required).
|
|
184
|
+
2. Improve type safety of `$project` operator.
|
|
185
|
+
3. Improve type safety of `$filter` operator.
|
|
186
|
+
4. Remove projection operators (`$count`, `$min`, `$max`, `$min`, and `$sum`) as they detriment type safety as currently implemented. This can be done via Virtual fields instead as currently supported for better type safety.
|
|
254
187
|
|
|
188
|
+
## [0.3.0] - 2023-10-18
|
|
255
189
|
|
|
190
|
+
- Add support for `transaction` operations using a QuerierPool.
|
|
191
|
+
Automatically wraps the code of the callback inside a transaction, and auto-releases the querier after running.
|
|
192
|
+
- Update dependencies.
|
|
256
193
|
|
|
257
|
-
|
|
194
|
+
```ts
|
|
195
|
+
const ids = await querierPool.transaction(async (querier) => {
|
|
196
|
+
const data = await querier.findMany(...);
|
|
197
|
+
const ids = await querier.insertMany(...);
|
|
198
|
+
return ids;
|
|
199
|
+
});
|
|
200
|
+
```
|
|
258
201
|
|
|
202
|
+
## [0.2.21] 2023-04-15
|
|
259
203
|
|
|
204
|
+
- fix(nukak-browser): check if ids are returned before use $in to delete them.
|
|
260
205
|
|
|
261
|
-
|
|
206
|
+
- Reuse community open-source npm packages to escape literal-values according to each DB vendor.
|
|
262
207
|
|
|
208
|
+
## [0.2.0] 2023-01-02
|
|
263
209
|
|
|
210
|
+
- Move projection to a new parameter to improve type inference of the results.
|
|
264
211
|
|
|
265
|
-
|
|
212
|
+
- Support dynamic operations while projecting fields, and move `$project` as an independent parameter in the `find*` functions [#55](https://github.com/rogerpadilla/nukak/pull/55).
|
package/package.json
CHANGED
|
@@ -3,40 +3,45 @@
|
|
|
3
3
|
"homepage": "https://uql.app",
|
|
4
4
|
"description": "One Language. Frontend to Backend.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "3.1.
|
|
6
|
+
"version": "3.1.2",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"main": "./index.js",
|
|
9
|
-
"types": "./index.d.ts",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
10
|
"bin": {
|
|
11
|
-
"uql-migrate": "./migrate/cli.js"
|
|
11
|
+
"uql-migrate": "./dist/migrate/cli.js"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
|
-
".": "./index.js",
|
|
15
|
-
"./dialect": "./dialect/index.js",
|
|
16
|
-
"./entity": "./entity/index.js",
|
|
17
|
-
"./querier": "./querier/index.js",
|
|
18
|
-
"./repository": "./repository/index.js",
|
|
19
|
-
"./type": "./type/index.js",
|
|
20
|
-
"./util": "./util/index.js",
|
|
21
|
-
"./namingStrategy": "./namingStrategy/index.js",
|
|
22
|
-
"./migrate": "./migrate/index.js",
|
|
23
|
-
"./options": "./options.js",
|
|
24
|
-
"./test": "./test/index.js",
|
|
25
|
-
"./mysql": "./mysql/index.js",
|
|
26
|
-
"./postgres": "./postgres/index.js",
|
|
27
|
-
"./maria": "./maria/index.js",
|
|
28
|
-
"./sqlite": "./sqlite/index.js",
|
|
29
|
-
"./mongo": "./mongo/index.js",
|
|
30
|
-
"./express": "./express/index.js",
|
|
14
|
+
".": "./dist/index.js",
|
|
15
|
+
"./dialect": "./dist/dialect/index.js",
|
|
16
|
+
"./entity": "./dist/entity/index.js",
|
|
17
|
+
"./querier": "./dist/querier/index.js",
|
|
18
|
+
"./repository": "./dist/repository/index.js",
|
|
19
|
+
"./type": "./dist/type/index.js",
|
|
20
|
+
"./util": "./dist/util/index.js",
|
|
21
|
+
"./namingStrategy": "./dist/namingStrategy/index.js",
|
|
22
|
+
"./migrate": "./dist/migrate/index.js",
|
|
23
|
+
"./options": "./dist/options.js",
|
|
24
|
+
"./test": "./dist/test/index.js",
|
|
25
|
+
"./mysql": "./dist/mysql/index.js",
|
|
26
|
+
"./postgres": "./dist/postgres/index.js",
|
|
27
|
+
"./maria": "./dist/maria/index.js",
|
|
28
|
+
"./sqlite": "./dist/sqlite/index.js",
|
|
29
|
+
"./mongo": "./dist/mongo/index.js",
|
|
30
|
+
"./express": "./dist/express/index.js",
|
|
31
31
|
"./browser": {
|
|
32
|
-
"types": "./browser/index.d.ts",
|
|
33
|
-
"import": "./browser/index.js",
|
|
34
|
-
"default": "./browser/uql-browser.min.js"
|
|
32
|
+
"types": "./dist/browser/index.d.ts",
|
|
33
|
+
"import": "./dist/browser/index.js",
|
|
34
|
+
"default": "./dist/browser/uql-browser.min.js"
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md",
|
|
40
|
+
"CHANGELOG.md"
|
|
41
|
+
],
|
|
37
42
|
"sideEffects": false,
|
|
38
43
|
"scripts": {
|
|
39
|
-
"copyfiles": "copyfiles -f
|
|
44
|
+
"copyfiles": "copyfiles -f ../../README.md ../../CHANGELOG.md .",
|
|
40
45
|
"compile.browser": "bunchee --clean false --no-dts ./src/browser/index.ts --sourcemap -o ./dist/browser/uql-browser.min.js",
|
|
41
46
|
"build": "bun run clean && tsc -b tsconfig.build.json && bun run compile.browser && bun run copyfiles",
|
|
42
47
|
"start": "tsc --watch",
|
|
@@ -127,5 +132,5 @@
|
|
|
127
132
|
"publishConfig": {
|
|
128
133
|
"access": "public"
|
|
129
134
|
},
|
|
130
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "a889fb94b7e8e23ad086777f1a73d7ae40cb0487"
|
|
131
136
|
}
|
package/dist/CHANGELOG.md
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. Please add new changes to the top.
|
|
4
|
-
|
|
5
|
-
date format is [yyyy-mm-dd]
|
|
6
|
-
## [2.0.0] - 2025-12-29
|
|
7
|
-
- **Major Rebranding**: Rebranded the project from **Nukak** to **UQL** (Universal Query Language - this was the original name!).
|
|
8
|
-
- New Slogan: **"One Language. Frontend to Backend."**
|
|
9
|
-
- Project homepage: [uql.app](https://uql.app).
|
|
10
|
-
- **Package Unification**: Unified all database adapters (`mysql`, `postgres`, `maria`, `sqlite`, `mongo`) and `express` middleware into a single core package: `@uql/core`.
|
|
11
|
-
- **Scoped Naming**:
|
|
12
|
-
- `@uql/core`: The main ORM engine and all database adapters.
|
|
13
|
-
- `@uql/migrate`: The database migration system (formerly `nukak-migrate`).
|
|
14
|
-
- **Improved API Surface**:
|
|
15
|
-
- Database-specific logic is now accessible via sub-paths (e.g., `import { ... } from '@uql/core/postgres'`).
|
|
16
|
-
- Unified `NamingStrategy` and `QueryContext` across all unified adapters.
|
|
17
|
-
- **Build & Distribution**:
|
|
18
|
-
- Integrated `bunchee` for high-performance browser bundle generation (`@uql/core/browser`).
|
|
19
|
-
- Minimized core dependency footprint by moving database drivers to optional `peerDependencies`.
|
|
20
|
-
- **Enhanced Type Safety**: Fully updated internal type resolution to support the unified package structure.
|
|
21
|
-
|
|
22
|
-
## [1.8.0] - 2025-12-29
|
|
23
|
-
- **New Feature**: Added support for **Naming Strategies**.
|
|
24
|
-
- Automatically translate TypeScript entity and property names to database-specific identifiers (e.g., camelCase to snake_case).
|
|
25
|
-
- Built-in `DefaultNamingStrategy` and `SnakeCaseNamingStrategy`.
|
|
26
|
-
- Comprehensive support across all SQL dialects and MongoDB.
|
|
27
|
-
- **Refactoring**:
|
|
28
|
-
- Unified naming and metadata resolution logic into a new `AbstractDialect` base class shared by both DML (Dialects) and DDL (Schema Generators).
|
|
29
|
-
- Improved `MongoDialect` to respect naming strategies for collection and field names on both read and write operations.
|
|
30
|
-
|
|
31
|
-
## [1.7.0] - 2025-12-29
|
|
32
|
-
- **New Package**: Introduced `nukak-migrate` for database migrations.
|
|
33
|
-
- Supports version-controlled schema changes via local migration files.
|
|
34
|
-
- Automatic migration generation from entity definitions using schema introspection.
|
|
35
|
-
- Full support for PostgreSQL, MySQL, MariaDB, and SQLite.
|
|
36
|
-
- CLI tool for managing migrations (`up`, `down`, `status`, `generate`, `sync`).
|
|
37
|
-
- Database-backed migration tracking (Database or JSON storage).
|
|
38
|
-
- **Core Improvements**:
|
|
39
|
-
- Expanded `@Field()` decorator with schema metadata: `length`, `precision`, `scale`, `unique`, `index`, `columnType`, `defaultValue`, and `comment`.
|
|
40
|
-
- Added schema generation and introspection capabilities to SQL dialects.
|
|
41
|
-
|
|
42
|
-
## [1.6.0] - 2025-12-28
|
|
43
|
-
- **Architectural Change**: Migrated from "Values as Parameter" to "Context Object" pattern for SQL generation.
|
|
44
|
-
- This pattern centralizes query parameters and SQL fragments into a `QueryContext`, ensuring robust placeholder management and preventing out-of-sync parameter indices.
|
|
45
|
-
- Improved compatibility with PostgreSQL's indexed placeholders ($1, $2, etc.) and complex sub-queries.
|
|
46
|
-
- Standardized dialect interfaces to operate directly on the `QueryContext` for higher performance and cleaner code.
|
|
47
|
-
- Fixed linter issues and unified type safety for `raw()` SQL snippets across all drivers.
|
|
48
|
-
|
|
49
|
-
## [1.5.0] - 2025-12-28
|
|
50
|
-
- **BREAKING CHANGE**: Implemented "Sticky Connections" for performance. `Querier` instances now hold their connection until `release()` is explicitly called.
|
|
51
|
-
- If you manually retrieve a querier via `pool.getQuerier()`, you **MUST** call `await querier.release()` when finished, otherwise connections will leak.
|
|
52
|
-
- `Repositories` and `pool.transaction(...)` callbacks automatically handle this, so high-level usage remains unchanged.
|
|
53
|
-
- Unified serialization logic: `@Serialized()` decorator is now centralized in `AbstractSqlQuerier`, removing redundant overrides in drivers.
|
|
54
|
-
- Fixed MongoDB consistency: `beginTransaction`, `commitTransaction`, and `rollbackTransaction` are now serialized to prevent race conditions.
|
|
55
|
-
- Fix Cross-Dialect SQL JSON bug by moving PostgreSQL-specific casts to the appropriate dialect.
|
|
56
|
-
- Fix transaction race conditions by serializing transaction lifecycle methods and implementing an internal execution pattern.
|
|
57
|
-
|
|
58
|
-
## [1.4.16] - 2025-12-28
|
|
59
|
-
|
|
60
|
-
- Implement a "Serialized Task Queue" at the core of the framework to ensure database connections are thread-safe and race-condition free.
|
|
61
|
-
- Introduce `@Serialized()` decorator to simplify the serialization of database operations across all drivers.
|
|
62
|
-
|
|
63
|
-
## [1.4.14] - 2025-12-28
|
|
64
|
-
|
|
65
|
-
- Robust `upsert` implementation across all SQL dialects (PostgreSQL, MySQL, MariaDB, SQLite).
|
|
66
|
-
|
|
67
|
-
## [1.4.10] - 2025-12-27
|
|
68
|
-
|
|
69
|
-
- Improve types, tests, migrate from EsLint/Prettier to Biome, and update dependencies.
|
|
70
|
-
|
|
71
|
-
## [1.4.6] - 2024-11-06
|
|
72
|
-
|
|
73
|
-
- Update dependencies and improve readme.
|
|
74
|
-
|
|
75
|
-
## [1.4.5] - 2024-09-26
|
|
76
|
-
|
|
77
|
-
- Imperative transactions have to be closed manually.
|
|
78
|
-
|
|
79
|
-
## [1.4.4] - 2024-09-26
|
|
80
|
-
|
|
81
|
-
- Ensure own connection is always released even if exception occurs.
|
|
82
|
-
- Correct issue when empty or null list is passed to `insertMany` operations.
|
|
83
|
-
|
|
84
|
-
## [1.4.3] - 2024-09-25
|
|
85
|
-
|
|
86
|
-
- Ensure the connection is auto-released after `commit` or `rollback` runs.
|
|
87
|
-
- Update dependencies.
|
|
88
|
-
|
|
89
|
-
## [1.4.2] - 2024-09-20
|
|
90
|
-
|
|
91
|
-
- Fix projection of `@OneToMany` field when the 'one' side produces empty result.
|
|
92
|
-
- Update dependencies.
|
|
93
|
-
|
|
94
|
-
## [1.4.1] - 2024-08-21
|
|
95
|
-
|
|
96
|
-
- Add nukak-maku logo.
|
|
97
|
-
- Update dependencies (functionality keeps the same in this release).
|
|
98
|
-
|
|
99
|
-
## [1.4.0] - 2024-08-15
|
|
100
|
-
|
|
101
|
-
- Automatically release the querier unless it is inside a current transaction.
|
|
102
|
-
- Remove unnecessary wrapper for transactions from `AbstractQuerierPool` class.
|
|
103
|
-
|
|
104
|
-
## [1.3.3] - 2024-08-13
|
|
105
|
-
|
|
106
|
-
- Improve typings of first inserted ID.
|
|
107
|
-
|
|
108
|
-
## [1.3.2] - 2024-08-13
|
|
109
|
-
|
|
110
|
-
- Return the inserted IDs in the response of the queriers' `run` function.
|
|
111
|
-
|
|
112
|
-
## [1.3.1] - 2024-08-13
|
|
113
|
-
|
|
114
|
-
- Fix an issue related to the `$where` condition of selected relations missed in the final criteria for `@OneToMany` and `@ManyToMany` relationships.
|
|
115
|
-
|
|
116
|
-
## [1.3.0] - 2024-08-13
|
|
117
|
-
|
|
118
|
-
- Add support for `json` and `jsonb` fields. Automatically parse the JSON values when persisting with `JSON.parse` function.
|
|
119
|
-
- Improve type-safety in general.
|
|
120
|
-
- Move `getPersistables` inside dialect for higher reusability.
|
|
121
|
-
- Add support for `vector` fields.
|
|
122
|
-
|
|
123
|
-
## [1.2.0] - 2024-08-12
|
|
124
|
-
|
|
125
|
-
- Add support for `raw` in values (previously, it was only supported by `$select` and `$where` operators). Allows safe use of any SQL query/clause as the value in an insert or update operation that shouldn't be automatically escaped by the ORM.
|
|
126
|
-
|
|
127
|
-
## [1.1.0] - 2024-08-11
|
|
128
|
-
|
|
129
|
-
- Add support for `upsert` operations.
|
|
130
|
-
- Migrate SQLite package driver from `sqlite3` to `better-sqlite3` for better performance.
|
|
131
|
-
- Make Maria package to use the `RETURNING id` clause to get the inserted IDs.
|
|
132
|
-
|
|
133
|
-
## [1.0.1] - 2024-08-10
|
|
134
|
-
|
|
135
|
-
- Rename `$project` operator to `$select` for consistency with most established frameworks so far.
|
|
136
|
-
- Rename `$filter` operator to `$where` for consistency with most established frameworks so far.
|
|
137
|
-
|
|
138
|
-
## [1.0.0] - 2024-08-10
|
|
139
|
-
|
|
140
|
-
- Allow to set a field as non-eager (i.e. lazy) with `eager: false` (by default fields are `eager: true`).
|
|
141
|
-
- Allow to set a field as non-updatable (i.e. insertable and read-only) with `updatable: false` (by default fields are `updatable: true`).
|
|
142
|
-
|
|
143
|
-
## [0.4.0] - 2023-11-06
|
|
144
|
-
|
|
145
|
-
- Move project inside query parameter [#63](https://github.com/rogerpadilla/nukak/pull/63)
|
|
146
|
-
|
|
147
|
-
## [0.3.3] - 2023-10-25
|
|
148
|
-
|
|
149
|
-
- Update usage example in the README.md.
|
|
150
|
-
|
|
151
|
-
## [0.3.2] - 2023-10-24
|
|
152
|
-
|
|
153
|
-
- Improve usage examples in the README.md, and make the overview section more concise.
|
|
154
|
-
|
|
155
|
-
## [0.3.1] - 2023-10-19
|
|
156
|
-
|
|
157
|
-
1. Remove `$group` and `$having` as they detriment type safety as currently implemented (support may be redesigned later if required).
|
|
158
|
-
2. Improve type safety of `$project` operator.
|
|
159
|
-
3. Improve type safety of `$filter` operator.
|
|
160
|
-
4. Remove projection operators (`$count`, `$min`, `$max`, `$min`, and `$sum`) as they detriment type safety as currently implemented. This can be done via Virtual fields instead as currently supported for better type safety.
|
|
161
|
-
|
|
162
|
-
## [0.3.0] - 2023-10-18
|
|
163
|
-
|
|
164
|
-
- Add support for `transaction` operations using a QuerierPool.
|
|
165
|
-
Automatically wraps the code of the callback inside a transaction, and auto-releases the querier after running.
|
|
166
|
-
- Update dependencies.
|
|
167
|
-
|
|
168
|
-
```ts
|
|
169
|
-
const ids = await querierPool.transaction(async (querier) => {
|
|
170
|
-
const data = await querier.findMany(...);
|
|
171
|
-
const ids = await querier.insertMany(...);
|
|
172
|
-
return ids;
|
|
173
|
-
});
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## [0.2.21] 2023-04-15
|
|
177
|
-
|
|
178
|
-
- fix(nukak-browser): check if ids are returned before use $in to delete them.
|
|
179
|
-
|
|
180
|
-
- Reuse community open-source npm packages to escape literal-values according to each DB vendor.
|
|
181
|
-
|
|
182
|
-
## [0.2.0] 2023-01-02
|
|
183
|
-
|
|
184
|
-
- Move projection to a new parameter to improve type inference of the results.
|
|
185
|
-
|
|
186
|
-
- Support dynamic operations while projecting fields, and move `$project` as an independent parameter in the `find*` functions [#55](https://github.com/rogerpadilla/nukak/pull/55).
|