uql-orm 0.12.0 → 0.14.0

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.
Files changed (238) hide show
  1. package/CHANGELOG.md +104 -48
  2. package/README.md +1 -0
  3. package/dist/browser/http/http.d.ts.map +1 -1
  4. package/dist/browser/http/http.js.map +1 -1
  5. package/dist/browser/querier/httpQuerier.d.ts.map +1 -1
  6. package/dist/browser/querier/httpQuerier.js +2 -2
  7. package/dist/browser/querier/httpQuerier.js.map +1 -1
  8. package/dist/browser/type/clientQuerier.d.ts +2 -2
  9. package/dist/browser/uql-browser.min.js +2 -2
  10. package/dist/browser/uql-browser.min.js.map +5 -5
  11. package/dist/bunSql/bunSqlPostgresDialect.d.ts.map +1 -1
  12. package/dist/bunSql/bunSqlPostgresDialect.js.map +1 -1
  13. package/dist/bunSql/bunSqlQuerier.d.ts.map +1 -1
  14. package/dist/bunSql/bunSqlQuerier.js.map +1 -1
  15. package/dist/bunSql/bunSqlQuerierPool.d.ts.map +1 -1
  16. package/dist/bunSql/bunSqlQuerierPool.js.map +1 -1
  17. package/dist/cockroachdb/crdbQuerierPool.d.ts.map +1 -1
  18. package/dist/context/context.browser.d.ts +7 -0
  19. package/dist/context/context.browser.d.ts.map +1 -0
  20. package/dist/context/context.browser.js +28 -0
  21. package/dist/context/context.browser.js.map +1 -0
  22. package/dist/context/context.d.ts +15 -0
  23. package/dist/context/context.d.ts.map +1 -0
  24. package/dist/context/context.js +21 -0
  25. package/dist/context/context.js.map +1 -0
  26. package/dist/context/securityError.d.ts +5 -0
  27. package/dist/context/securityError.d.ts.map +1 -0
  28. package/dist/context/securityError.js +5 -0
  29. package/dist/context/securityError.js.map +1 -0
  30. package/dist/d1/d1Querier.d.ts.map +1 -1
  31. package/dist/d1/d1Querier.js.map +1 -1
  32. package/dist/d1/d1QuerierPool.d.ts.map +1 -1
  33. package/dist/dialect/abstractDialect.d.ts.map +1 -1
  34. package/dist/dialect/abstractDialect.js.map +1 -1
  35. package/dist/dialect/abstractSqlDialect.d.ts +3 -1
  36. package/dist/dialect/abstractSqlDialect.d.ts.map +1 -1
  37. package/dist/dialect/abstractSqlDialect.js +23 -23
  38. package/dist/dialect/abstractSqlDialect.js.map +1 -1
  39. package/dist/dialect/mysqlLikeSqlDialect.d.ts.map +1 -1
  40. package/dist/dialect/mysqlLikeSqlDialect.js.map +1 -1
  41. package/dist/dialect/queryContext.d.ts.map +1 -1
  42. package/dist/dialect/queryContext.js.map +1 -1
  43. package/dist/entity/decorator/entity.d.ts.map +1 -1
  44. package/dist/entity/decorator/field.d.ts.map +1 -1
  45. package/dist/entity/decorator/filter.d.ts +8 -0
  46. package/dist/entity/decorator/filter.d.ts.map +1 -0
  47. package/dist/entity/decorator/filter.js +12 -0
  48. package/dist/entity/decorator/filter.js.map +1 -0
  49. package/dist/entity/decorator/id.d.ts.map +1 -1
  50. package/dist/entity/decorator/id.js.map +1 -1
  51. package/dist/entity/decorator/index-decorator.d.ts.map +1 -1
  52. package/dist/entity/decorator/index-decorator.js.map +1 -1
  53. package/dist/entity/decorator/index.d.ts +2 -1
  54. package/dist/entity/decorator/index.d.ts.map +1 -1
  55. package/dist/entity/decorator/index.js +2 -1
  56. package/dist/entity/decorator/index.js.map +1 -1
  57. package/dist/entity/decorator/relation.d.ts.map +1 -1
  58. package/dist/entity/metadata/definition.d.ts +2 -1
  59. package/dist/entity/metadata/definition.d.ts.map +1 -1
  60. package/dist/entity/metadata/definition.js +40 -7
  61. package/dist/entity/metadata/definition.js.map +1 -1
  62. package/dist/entity/test-helpers.d.ts +1 -1
  63. package/dist/entity/test-helpers.d.ts.map +1 -1
  64. package/dist/entity/test-helpers.js +1 -0
  65. package/dist/entity/test-helpers.js.map +1 -1
  66. package/dist/express/querierMiddleware.js.map +1 -1
  67. package/dist/http/contract.d.ts +25 -25
  68. package/dist/http/contract.d.ts.map +1 -1
  69. package/dist/http/fetchHandler.js.map +1 -1
  70. package/dist/http/handler.d.ts +10 -4
  71. package/dist/http/handler.d.ts.map +1 -1
  72. package/dist/http/handler.js +21 -16
  73. package/dist/http/handler.js.map +1 -1
  74. package/dist/http/query.d.ts +1 -1
  75. package/dist/http/query.d.ts.map +1 -1
  76. package/dist/http/query.js +21 -3
  77. package/dist/http/query.js.map +1 -1
  78. package/dist/index.d.ts +1 -0
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +1 -0
  81. package/dist/index.js.map +1 -1
  82. package/dist/libsql/libsqlQuerier.d.ts.map +1 -1
  83. package/dist/libsql/libsqlQuerier.js.map +1 -1
  84. package/dist/libsql/libsqlQuerierPool.d.ts +1 -1
  85. package/dist/libsql/libsqlQuerierPool.d.ts.map +1 -1
  86. package/dist/libsql/libsqlQuerierPool.js +1 -1
  87. package/dist/maria/mariaDialect.d.ts.map +1 -1
  88. package/dist/maria/mariaDialect.js.map +1 -1
  89. package/dist/maria/mariadbQuerier.d.ts.map +1 -1
  90. package/dist/maria/mariadbQuerierPool.d.ts.map +1 -1
  91. package/dist/maria/mariadbQuerierPool.js +1 -1
  92. package/dist/migrate/builder/columnBuilder.d.ts.map +1 -1
  93. package/dist/migrate/builder/columnBuilder.js.map +1 -1
  94. package/dist/migrate/builder/expressions.d.ts.map +1 -1
  95. package/dist/migrate/builder/expressions.js.map +1 -1
  96. package/dist/migrate/builder/migrationBuilder.d.ts.map +1 -1
  97. package/dist/migrate/builder/migrationBuilder.js.map +1 -1
  98. package/dist/migrate/builder/tableBuilder.d.ts.map +1 -1
  99. package/dist/migrate/builder/tableBuilder.js.map +1 -1
  100. package/dist/migrate/cli.d.ts +1 -1
  101. package/dist/migrate/cli.js +1 -1
  102. package/dist/migrate/codegen/entityCodeGenerator.d.ts.map +1 -1
  103. package/dist/migrate/codegen/entityCodeGenerator.js.map +1 -1
  104. package/dist/migrate/codegen/entityMerger.d.ts.map +1 -1
  105. package/dist/migrate/codegen/entityMerger.js +1 -1
  106. package/dist/migrate/codegen/entityMerger.js.map +1 -1
  107. package/dist/migrate/codegen/migrationCodeGenerator.d.ts.map +1 -1
  108. package/dist/migrate/codegen/migrationCodeGenerator.js.map +1 -1
  109. package/dist/migrate/codegen/smartRelationDetector.d.ts.map +1 -1
  110. package/dist/migrate/codegen/smartRelationDetector.js.map +1 -1
  111. package/dist/migrate/drift/driftDetector.d.ts.map +1 -1
  112. package/dist/migrate/drift/driftDetector.js.map +1 -1
  113. package/dist/migrate/generator/mongoSchemaGenerator.d.ts.map +1 -1
  114. package/dist/migrate/generator/mongoSchemaGenerator.js.map +1 -1
  115. package/dist/migrate/introspection/abstractSqlSchemaIntrospector.d.ts.map +1 -1
  116. package/dist/migrate/introspection/baseSqlIntrospector.d.ts.map +1 -1
  117. package/dist/migrate/introspection/baseSqlIntrospector.js.map +1 -1
  118. package/dist/migrate/introspection/mongoIntrospector.d.ts.map +1 -1
  119. package/dist/migrate/introspection/mongoIntrospector.js.map +1 -1
  120. package/dist/migrate/introspection/mysqlIntrospector.d.ts.map +1 -1
  121. package/dist/migrate/introspection/mysqlIntrospector.js.map +1 -1
  122. package/dist/migrate/introspection/postgresIntrospector.d.ts.map +1 -1
  123. package/dist/migrate/introspection/postgresIntrospector.js.map +1 -1
  124. package/dist/migrate/introspection/sqliteIntrospector.d.ts.map +1 -1
  125. package/dist/migrate/introspection/sqliteIntrospector.js.map +1 -1
  126. package/dist/migrate/migrator.d.ts.map +1 -1
  127. package/dist/migrate/migrator.js.map +1 -1
  128. package/dist/migrate/schemaGenerator.d.ts.map +1 -1
  129. package/dist/migrate/schemaGenerator.js.map +1 -1
  130. package/dist/migrate/storage/databaseStorage.d.ts.map +1 -1
  131. package/dist/migrate/storage/databaseStorage.js.map +1 -1
  132. package/dist/migrate/storage/jsonStorage.d.ts.map +1 -1
  133. package/dist/migrate/sync/schemaSync.d.ts.map +1 -1
  134. package/dist/migrate/sync/schemaSync.js.map +1 -1
  135. package/dist/mongo/mongoDialect.d.ts +7 -5
  136. package/dist/mongo/mongoDialect.d.ts.map +1 -1
  137. package/dist/mongo/mongoDialect.js +20 -19
  138. package/dist/mongo/mongoDialect.js.map +1 -1
  139. package/dist/mongo/mongodbQuerier.d.ts +5 -5
  140. package/dist/mongo/mongodbQuerier.d.ts.map +1 -1
  141. package/dist/mongo/mongodbQuerier.js +28 -28
  142. package/dist/mongo/mongodbQuerier.js.map +1 -1
  143. package/dist/mongo/mongodbQuerierPool.d.ts.map +1 -1
  144. package/dist/mysql/mysql2Querier.d.ts.map +1 -1
  145. package/dist/mysql/mysql2QuerierPool.d.ts.map +1 -1
  146. package/dist/namingStrategy/defaultNamingStrategy.d.ts.map +1 -1
  147. package/dist/namingStrategy/snakeCaseNamingStrategy.d.ts.map +1 -1
  148. package/dist/neon/neonQuerierPool.d.ts.map +1 -1
  149. package/dist/nestjs/index.d.ts +1 -0
  150. package/dist/nestjs/index.d.ts.map +1 -1
  151. package/dist/nestjs/index.js +1 -0
  152. package/dist/nestjs/index.js.map +1 -1
  153. package/dist/nestjs/uqlContextInterceptor.d.ts +14 -0
  154. package/dist/nestjs/uqlContextInterceptor.d.ts.map +1 -0
  155. package/dist/nestjs/uqlContextInterceptor.js +26 -0
  156. package/dist/nestjs/uqlContextInterceptor.js.map +1 -0
  157. package/dist/nestjs/uqlModule.d.ts +32 -11
  158. package/dist/nestjs/uqlModule.d.ts.map +1 -1
  159. package/dist/nestjs/uqlModule.js +30 -11
  160. package/dist/nestjs/uqlModule.js.map +1 -1
  161. package/dist/postgres/abstractPgQuerier.d.ts.map +1 -1
  162. package/dist/postgres/abstractPgQuerierPool.d.ts +1 -1
  163. package/dist/postgres/abstractPgQuerierPool.d.ts.map +1 -1
  164. package/dist/postgres/abstractPgQuerierPool.js +1 -1
  165. package/dist/postgres/abstractPgQuerierPool.js.map +1 -1
  166. package/dist/postgres/pgDialect.d.ts.map +1 -1
  167. package/dist/postgres/pgDialect.js.map +1 -1
  168. package/dist/postgres/pgQuerierPool.d.ts.map +1 -1
  169. package/dist/postgres/postgresDialect.d.ts.map +1 -1
  170. package/dist/postgres/postgresDialect.js.map +1 -1
  171. package/dist/postgres/postgresWireDriverCapabilities.d.ts +1 -1
  172. package/dist/postgres/postgresWireDriverCapabilities.js +1 -1
  173. package/dist/querier/abstractPoolQuerier.d.ts.map +1 -1
  174. package/dist/querier/abstractPoolQuerier.js.map +1 -1
  175. package/dist/querier/abstractQuerier.d.ts +29 -26
  176. package/dist/querier/abstractQuerier.d.ts.map +1 -1
  177. package/dist/querier/abstractQuerier.js +48 -43
  178. package/dist/querier/abstractQuerier.js.map +1 -1
  179. package/dist/querier/abstractQuerierPool.d.ts.map +1 -1
  180. package/dist/querier/abstractQuerierPool.js.map +1 -1
  181. package/dist/querier/abstractSqlQuerier.d.ts +6 -6
  182. package/dist/querier/abstractSqlQuerier.d.ts.map +1 -1
  183. package/dist/querier/abstractSqlQuerier.js +16 -14
  184. package/dist/querier/abstractSqlQuerier.js.map +1 -1
  185. package/dist/querier/decorator/injectQuerier.d.ts.map +1 -1
  186. package/dist/querier/decorator/injectQuerier.js +1 -1
  187. package/dist/querier/decorator/log.d.ts.map +1 -1
  188. package/dist/querier/decorator/serialized.d.ts.map +1 -1
  189. package/dist/querier/decorator/transactional.d.ts.map +1 -1
  190. package/dist/querier/decorator/transactional.js +1 -1
  191. package/dist/querier/decorator/transactional.js.map +1 -1
  192. package/dist/schema/schemaAST.d.ts.map +1 -1
  193. package/dist/schema/schemaASTBuilder.d.ts +2 -2
  194. package/dist/schema/schemaASTBuilder.d.ts.map +1 -1
  195. package/dist/schema/schemaASTBuilder.js +2 -2
  196. package/dist/schema/schemaASTBuilder.js.map +1 -1
  197. package/dist/schema/schemaASTDiffer.d.ts.map +1 -1
  198. package/dist/schema/schemaASTDiffer.js.map +1 -1
  199. package/dist/sqlite/sqliteDialect.d.ts.map +1 -1
  200. package/dist/sqlite/sqliteDialect.js.map +1 -1
  201. package/dist/sqlite/sqliteQuerier.d.ts.map +1 -1
  202. package/dist/sqlite/sqliteQuerier.js.map +1 -1
  203. package/dist/sqlite/sqliteQuerierPool.d.ts.map +1 -1
  204. package/dist/sqlite/sqliteQuerierPool.js.map +1 -1
  205. package/dist/type/entity.d.ts +10 -6
  206. package/dist/type/entity.d.ts.map +1 -1
  207. package/dist/type/querier.d.ts +23 -16
  208. package/dist/type/querier.d.ts.map +1 -1
  209. package/dist/type/querier.js.map +1 -1
  210. package/dist/type/querierPool.d.ts +1 -1
  211. package/dist/type/query.d.ts +71 -21
  212. package/dist/type/query.d.ts.map +1 -1
  213. package/dist/type/query.js.map +1 -1
  214. package/dist/type/universalQuerier.d.ts +1 -1
  215. package/dist/util/ansiSqlLiteral.d.ts +1 -1
  216. package/dist/util/ansiSqlLiteral.js +1 -1
  217. package/dist/util/ansiSqlLiteral.js.map +1 -1
  218. package/dist/util/dialect.util.d.ts +23 -4
  219. package/dist/util/dialect.util.d.ts.map +1 -1
  220. package/dist/util/dialect.util.js +70 -0
  221. package/dist/util/dialect.util.js.map +1 -1
  222. package/dist/util/filters.util.d.ts +11 -0
  223. package/dist/util/filters.util.d.ts.map +1 -0
  224. package/dist/util/filters.util.js +12 -0
  225. package/dist/util/filters.util.js.map +1 -0
  226. package/dist/util/index.d.ts +1 -0
  227. package/dist/util/index.d.ts.map +1 -1
  228. package/dist/util/index.js +1 -0
  229. package/dist/util/index.js.map +1 -1
  230. package/dist/util/logger.d.ts +1 -1
  231. package/dist/util/logger.d.ts.map +1 -1
  232. package/dist/util/logger.js +1 -1
  233. package/dist/util/logger.js.map +1 -1
  234. package/dist/util/raw.d.ts +1 -1
  235. package/dist/util/raw.js +1 -1
  236. package/dist/util/sql.util.js +1 -1
  237. package/dist/util/sql.util.js.map +1 -1
  238. package/package.json +22 -10
package/CHANGELOG.md CHANGED
@@ -4,18 +4,74 @@ All notable changes to this project will be documented in this file. Please add
4
4
 
5
5
  date format is [yyyy-mm-dd]
6
6
 
7
+ ## [0.14.0] - 2026-07-08
8
+
9
+ Query filters, multi-tenancy / row-level security, and soft-delete restore. Upgrade straight from 0.12.0 - 0.13.0 was pulled before anyone could install it (its root import dragged `node:async_hooks` into browser bundles), so 0.14.0 is the first published build of these features and bundles cleanly on the client again.
10
+
11
+ ### Features
12
+
13
+ - **Query filters** - attach a named condition to an entity and it applies to every query automatically until you turn it off. Great for "active only" or visibility rules:
14
+
15
+ ```ts
16
+ @Filter('active', { condition: { status: 'active' }, default: false })
17
+ @Entity()
18
+ class Task {}
19
+
20
+ querier.findMany(Task, {}, { filters: { active: true } }); // on for this call
21
+ querier.findMany(Task, {}, { filters: false }); // all filters off
22
+ ```
23
+
24
+ - **Multi-tenancy / row-level security** - mark a filter `security` and resolve it from a per-request context. It applies to every query (relations and cascades included), can't be turned off, and a client can't widen it with their own `$where`:
25
+
26
+ ```ts
27
+ @Filter('tenant', {
28
+ // no tenant in context -> the query throws instead of running unscoped
29
+ condition: (ctx) => (ctx?.tenantId != null ? { companyId: ctx.tenantId } : undefined),
30
+ security: true,
31
+ })
32
+ @Entity()
33
+ class Invoice {}
34
+
35
+ await withContext({ tenantId }, () => querier.findMany(Invoice, {}));
36
+ ```
37
+
38
+ Set the context once at the HTTP boundary and every request is scoped automatically:
39
+
40
+ ```ts
41
+ createRequestHandler({ getContext: (req) => ({ tenantId: req.user.tenantId }) });
42
+ // NestJS: UqlModule.forRoot({ pool, getContext: (req) => ({ tenantId: req.user.tenantId }) })
43
+ ```
44
+
45
+ - **Restore soft-deleted rows** - `restoreOneById` / `restoreMany` bring rows back. Include trashed rows in any read with `withDeleted()`, or list only trashed ones with a plain query (`{ $where: { deletedAt: { $ne: null } } }`). Reads and updates take an options argument now too, so these toggles work on every operation, not just delete.
46
+
47
+ - **NestJS `forRootAsync`** - build the pool from injected providers such as `ConfigService`.
48
+
49
+ ### Breaking Changes
50
+
51
+ - **Permanent deletes now use `hardDelete`** (was `{ softDelete: false }`). With a soft-delete field, delete soft-deletes by default; pass `{ hardDelete: true }` to remove rows for good. Over HTTP, `DELETE ?hardDelete=true` (was `?softDelete=true`):
52
+
53
+ ```ts
54
+ await querier.deleteOneById(User, id); // soft delete
55
+ await querier.deleteOneById(User, id, { hardDelete: true }); // permanent
56
+ ```
57
+
58
+ ### Bug Fixes
59
+
60
+ - Soft-delete now works on **subclasses** that inherit the soft-delete field from a base entity.
61
+ - A cascading delete no longer throws when a related entity isn't soft-deletable - it's removed instead; MongoDB delete behavior now matches SQL.
62
+
7
63
  ## [0.12.0] - 2026-07-06
8
64
 
9
65
  ### Breaking Changes
10
66
 
11
- - **`softDelete` moves from `@Entity` to `@Field`.** Mark the field itself `@Field({ softDelete: true })` instead of naming it on the entity (`@Entity({ softDelete: 'deletedAt' })`). This makes the field reference typo-proof (it's the decorated property, not a string) and lets the marker carry the value stamped on delete: `true` stamps the current timestamp (`new Date()`), or pass a callback for anything else, e.g. `@Field({ softDelete: () => Date.now() })` for an epoch-millis column. The stamp goes through the same value formatter as `onInsert`/`onUpdate`, so a `QueryRaw` (e.g. `() => raw(() => 'NOW()')`) is emitted inline. At most one field per entity may be marked. Reads still filter deleted rows via `<field> IS NULL`, and the `deleteMany(..., { softDelete })` query option is unchanged.
67
+ - **`softDelete` moves from `@Entity` to `@Field`.** Mark the field itself - `@Field({ softDelete: true })` - instead of naming it on the entity (`@Entity({ softDelete: 'deletedAt' })`). This makes the field reference typo-proof (it's the decorated property, not a string) and lets the marker carry the value stamped on delete: `true` stamps the current timestamp (`new Date()`), or pass a callback for anything else, e.g. `@Field({ softDelete: () => Date.now() })` for an epoch-millis column. The stamp goes through the same value formatter as `onInsert`/`onUpdate`, so a `QueryRaw` (e.g. `() => raw(() => 'NOW()')`) is emitted inline. At most one field per entity may be marked. Reads still filter deleted rows via `<field> IS NULL`, and the `deleteMany(..., { softDelete })` query option is unchanged.
12
68
 
13
69
  ## [0.11.0] - 2026-07-06
14
70
 
15
71
  ### Breaking Changes
16
72
 
17
- - **`softDelete` is configured by field name instead of `boolean`**: use `@Entity({ softDelete: 'deletedAt' })` naming the timestamp field instead of `@Entity({ softDelete: true })` paired with `@Field({ onDelete: Date.now })`. On delete, the named field is stamped with `Date.now()`.
18
- - **Removed `onDelete` and `foreignKey` from `@Field` options** (`FieldOptions`). `onDelete` was only a soft-delete marker, now superseded by the entity-level `softDelete` above; `foreignKey` was non-functional (never read) foreign keys are derived from `references`/relations.
73
+ - **`softDelete` is configured by field name instead of `boolean`**: use `@Entity({ softDelete: 'deletedAt' })` - naming the timestamp field - instead of `@Entity({ softDelete: true })` paired with `@Field({ onDelete: Date.now })`. On delete, the named field is stamped with `Date.now()`.
74
+ - **Removed `onDelete` and `foreignKey` from `@Field` options** (`FieldOptions`). `onDelete` was only a soft-delete marker, now superseded by the entity-level `softDelete` above; `foreignKey` was non-functional (never read) - foreign keys are derived from `references`/relations.
19
75
 
20
76
  ### Features
21
77
 
@@ -26,7 +82,7 @@ date format is [yyyy-mm-dd]
26
82
  ### Bug Fixes
27
83
 
28
84
  - **Dropped idle connections no longer crash the process**: `pg`-based pools (Postgres, CockroachDB, Neon) now handle the pool's `'error'` event instead of leaving it unhandled. Postgres and CockroachDB also default to `keepAlive: true`, so idle connections drop less often to begin with.
29
- - **Foreign key columns now match their referenced primary key type**: `@Field({ references: () => User })` with no explicit `type` fell back to the TypeScript property type (e.g. `string` TEXT) instead of `User`'s actual primary key type (e.g. `UUID`), which could fail inserts and joins. Explicit types are still respected.
85
+ - **Foreign key columns now match their referenced primary key type**: `@Field({ references: () => User })` with no explicit `type` fell back to the TypeScript property type (e.g. `string` -> TEXT) instead of `User`'s actual primary key type (e.g. `UUID`), which could fail inserts and joins. Explicit types are still respected.
30
86
 
31
87
  ## [0.10.1] - 2026-07-03
32
88
 
@@ -36,7 +92,7 @@ date format is [yyyy-mm-dd]
36
92
 
37
93
  ### Bug Fixes
38
94
 
39
- - **`uql-orm@0.10.0` on npm shipped only the browser bundle** (5 files; `dist/index.js` missing, so every server-side import failed). The package build shared the repo root's `tsBuildInfoFile` (introduced 2026-06-29 in an unrelated config cleanup): after `clean` wiped `dist`, `tsc -b` trusted the stale build info and emitted nothing, and the release published the partial `dist`. The build info is now package-local and the errant root-level one has been removed entirely, restoring the isolation each package had before that cleanup. `prepack` no longer checks two hardcoded files (which would have missed this exact failure neither covered `uql-orm/migrate`); it now verifies every path declared in `main`, `types`, `bin`, and `exports` exists in `dist` before packing, derived straight from `package.json` so the check can't go stale as exports are added. Use 0.10.1 instead of 0.10.0.
95
+ - **`uql-orm@0.10.0` on npm shipped only the browser bundle** (5 files; `dist/index.js` missing, so every server-side import failed). The package build shared the repo root's `tsBuildInfoFile` (introduced 2026-06-29 in an unrelated config cleanup): after `clean` wiped `dist`, `tsc -b` trusted the stale build info and emitted nothing, and the release published the partial `dist`. The build info is now package-local and the errant root-level one has been removed entirely, restoring the isolation each package had before that cleanup. `prepack` no longer checks two hardcoded files (which would have missed this exact failure - neither covered `uql-orm/migrate`); it now verifies every path declared in `main`, `types`, `bin`, and `exports` exists in `dist` before packing, derived straight from `package.json` so the check can't go stale as exports are added. Use 0.10.1 instead of 0.10.0.
40
96
 
41
97
  ## [0.10.0] - 2026-07-02
42
98
 
@@ -76,7 +132,7 @@ date format is [yyyy-mm-dd]
76
132
  ### Bug Fixes
77
133
 
78
134
  - **`$entity` dual-API restored**: Querier read/delete methods (`findOne`, `findMany`, `findManyAndCount`, `count`, `deleteMany`, `findManyStream`) now use TypeScript overloads instead of union types, enabling correct entity inference for both `(Entity, query)` and `({ $entity: Entity, ...query })` call patterns.
79
- - **`$select` / `$exclude` overlap resolved**: Both are now structurally identical map types (`{ [K in FieldKey<E>]?: BooleanLike }`) whitelist (`$select`) vs. blacklist (`$exclude`). `$exclude` reverted to map form (was incorrectly changed to array), matching runtime `Object.entries()` usage.
135
+ - **`$select` / `$exclude` overlap resolved**: Both are now structurally identical map types (`{ [K in FieldKey<E>]?: BooleanLike }`) - whitelist (`$select`) vs. blacklist (`$exclude`). `$exclude` reverted to map form (was incorrectly changed to array), matching runtime `Object.entries()` usage.
80
136
  - **`$exclude` JSDoc**: Updated comment from "array of field names" to map syntax `{ name: true }`.
81
137
 
82
138
  ### Security
@@ -103,7 +159,7 @@ date format is [yyyy-mm-dd]
103
159
  ### Dependencies
104
160
 
105
161
  - Updated dev and prod dependencies.
106
- - Docker images bumped: MySQL `9.6` `9.7`, MariaDB `12.3-rc` `12.3` (now stable).
162
+ - Docker images bumped: MySQL `9.6` -> `9.7`, MariaDB `12.3-rc` -> `12.3` (now stable).
107
163
 
108
164
  ## [0.8.5] - 2026-05-24
109
165
 
@@ -147,13 +203,13 @@ date format is [yyyy-mm-dd]
147
203
 
148
204
  ### Bug Fixes
149
205
 
150
- - **[#86](https://github.com/rogerpadilla/uql/issues/86) Invalid generated migration TypeScript with LibSQL**: `uql-migrate generate:entities` embedded SQL inside a JS **template literal**; SQLite/LibSQL identifier quotes use **backticks**, which **terminated** the outer literal and produced invalid `.ts` (so `uql-migrate up` could not even load the migration). Generated files now use **`JSON.stringify`** for each `querier.run(...)` argument (double-quoted string literals), so SQL may contain backticks, `"`, newlines, `${` inside string data, etc., without breaking TypeScript.
206
+ - **[#86](https://github.com/rogerpadilla/uql/issues/86) - Invalid generated migration TypeScript with LibSQL**: `uql-migrate generate:entities` embedded SQL inside a JS **template literal**; SQLite/LibSQL identifier quotes use **backticks**, which **terminated** the outer literal and produced invalid `.ts` (so `uql-migrate up` could not even load the migration). Generated files now use **`JSON.stringify`** for each `querier.run(...)` argument (double-quoted string literals), so SQL may contain backticks, `"`, newlines, `${` inside string data, etc., without breaking TypeScript.
151
207
 
152
- - **[#87](https://github.com/rogerpadilla/uql/issues/87) `uql-migrate` against libsql + sqld (HTTP) with multiple statements in one `run`**: **sqld** does not accept **multiple SQL statements** in a single `execute` / `run` call; a migration that bundled `CREATE TABLE …;` and `CREATE INDEX …;` in one string failed at runtime even when the TypeScript was valid. **Entity-generated migrations** now emit **one `await querier.run("")` per statement**, and **`Migrator` / `syncForce` / `autoSync` / `MigrationBuilder`** apply create-table DDL **statement-by-statement**, matching sqlds behavior.
208
+ - **[#87](https://github.com/rogerpadilla/uql/issues/87) - `uql-migrate` against libsql + sqld (HTTP) with multiple statements in one `run`**: **sqld** does not accept **multiple SQL statements** in a single `execute` / `run` call; a migration that bundled `CREATE TABLE ...;` and `CREATE INDEX ...;` in one string failed at runtime even when the TypeScript was valid. **Entity-generated migrations** now emit **one `await querier.run("...")` per statement**, and **`Migrator` / `syncForce` / `autoSync` / `MigrationBuilder`** apply create-table DDL **statement-by-statement**, matching sqld's behavior.
153
209
 
154
210
  ### Breaking Changes
155
211
 
156
- - **`SchemaGenerator` create-table DDL** (supports the [#87](https://github.com/rogerpadilla/uql/issues/87) fix end-to-end): **`generateCreateTable`**, **`generateCreateTableFromNode`**, and **`generateCreateTableFromDefinition`** now return **`string[]`** one string per logical statement (`CREATE EXTENSION` if needed, `CREATE TABLE`, each separate `CREATE INDEX`, ). They used to return a **single** newline-joined `string`. **Migrate custom code** by taking the array and either calling `querier.run(stmt)` for each element or using **`.join('\n')`** when you need one script blob. **`MongoSchemaGenerator`** uses the same signatures; each method returns a **one-element** array containing the JSON sync command string.
212
+ - **`SchemaGenerator` create-table DDL** (supports the [#87](https://github.com/rogerpadilla/uql/issues/87) fix end-to-end): **`generateCreateTable`**, **`generateCreateTableFromNode`**, and **`generateCreateTableFromDefinition`** now return **`string[]`** - one string per logical statement (`CREATE EXTENSION` if needed, `CREATE TABLE`, each separate `CREATE INDEX`, ...). They used to return a **single** newline-joined `string`. **Migrate custom code** by taking the array and either calling `querier.run(stmt)` for each element or using **`.join('\n')`** when you need one script blob. **`MongoSchemaGenerator`** uses the same signatures; each method returns a **one-element** array containing the JSON sync command string.
157
213
 
158
214
  ## [0.8.0] - 2026-04-03
159
215
 
@@ -163,7 +219,7 @@ date format is [yyyy-mm-dd]
163
219
 
164
220
  ### Breaking Changes (Internal API)
165
221
 
166
- - **Entity metadata registry**: Runtime storage uses `Symbol.for('uql-orm/entity/metadata')` (replaces `uql-orm/entity/decorator`). Code that reached into `globalThis` with the old symbol will not see entities registered under the new key. Deep imports of `.../entity/decorator/definition.js` should use `.../entity/metadata/definition.js`. **`getOrCreateMeta` removed** use **`ensureMeta`** from the same module if you need imperative get or init behavior.
222
+ - **Entity metadata registry**: Runtime storage uses `Symbol.for('uql-orm/entity/metadata')` (replaces `uql-orm/entity/decorator`). Code that reached into `globalThis` with the old symbol will not see entities registered under the new key. Deep imports of `.../entity/decorator/definition.js` should use `.../entity/metadata/definition.js`. **`getOrCreateMeta` removed** - use **`ensureMeta`** from the same module if you need imperative "get or init" behavior.
167
223
 
168
224
  ## [0.7.10] - 2026-04-02
169
225
 
@@ -184,13 +240,13 @@ date format is [yyyy-mm-dd]
184
240
  ## [0.7.7] - 2026-03-31
185
241
 
186
242
  ### Breaking Changes (Internal API)
187
- - **Pools and config**: `QuerierPool` exposes `dialect` (renamed from `dialectInstance`). The engine id string is `dialect.dialectName` (replacing the old `dialect` property on the dialect instance). Removed top-level `dialect` from `Config` and `MigratorOptions`—migrations and `uql-migrate` use **`pool.dialect.dialectName`** only.
243
+ - **Pools and config**: `QuerierPool` exposes `dialect` (renamed from `dialectInstance`). The engine id string is `dialect.dialectName` (replacing the old `dialect` property on the dialect instance). Removed top-level `dialect` from `Config` and `MigratorOptions`-migrations and `uql-migrate` use **`pool.dialect.dialectName`** only.
188
244
  - **Dialect API**: Removed `dialectConfig` / `DialectConfig` from the public dialect barrel. Configure behavior with `DialectOptions`, `DialectFeatures` on `AbstractDialect.features`, and **per-driver dialect classes** attached to each pool.
189
245
 
190
246
  ### Improvements
191
247
 
192
248
  - **Per-driver dialect classes**: Pools use explicit dialect types (e.g. `PgDialect`, `NeonDialect`, `MySql2Dialect`, `BetterSqlite3Dialect`, `LibsqlDialect`, `D1SqliteDialect`, `MongodbNativeDialect`, `BunSqlPostgresDialect`). Migrator and schema generation read **`pool.dialect.dialectName`** instead of a separate config field.
193
- - **PostgreSQL (`pg` vs Bun SQL)**: `PgDialect` uses base Postgres defaults (native JS arrays for `ANY`/`ALL`, `$n::jsonb` for JSON). Bun SQL Postgres uses `BunSqlPostgresDialect` with `POSTGRES_WIRE_DRIVER_CAPABILITIES` from `uql-orm/postgres/wireCapabilities` plus `explicitJsonCast` where Buns bindings require `( $n::text )::jsonb` and array literal encoding.
249
+ - **PostgreSQL (`pg` vs Bun SQL)**: `PgDialect` uses base Postgres defaults (native JS arrays for `ANY`/`ALL`, `$n::jsonb` for JSON). Bun SQL Postgres uses `BunSqlPostgresDialect` with `POSTGRES_WIRE_DRIVER_CAPABILITIES` from `uql-orm/postgres/wireCapabilities` plus `explicitJsonCast` where Bun's bindings require `( $n::text )::jsonb` and array literal encoding.
194
250
  - **Migrations CLI**: Exported **`assertCliConfig`** (`uql-orm/migrate`) validates the default-exported config shape before commands run.
195
251
  - **Escaping**: Inlined **`escapeAnsiSqlLiteral`** for Postgres/SQLite literal escaping; dropped **`sqlstring-sqlite`** from those code paths. Prefer bound parameters for user input in production.
196
252
  - **Types and tests**: `Config.pool` is typed as `QuerierPool<Querier, AbstractDialect>`. **`createMockQuerierPool`** is available from `uql-orm/test`.
@@ -238,7 +294,7 @@ date format is [yyyy-mm-dd]
238
294
  - **Bun SQL Support**: Added a first-class adapter for Bun's unified `sql` driver (`uql-orm/bunSql`). A single `BunSqlQuerierPool` infers the UQL dialect from `SQL.Options` (URL, `adapter`, or `filename`) and routes SQL generation to PostgreSQL, MySQL, MariaDB, SQLite, or CockroachDB ASTs. Includes dialect-aware option normalization (`inferDialect`, `normalizeBunOpts`), row/insert-id normalization for Bun result shapes, and a minimal `pool.query` shim for pg-compatible consumers.
239
295
 
240
296
  ### Breaking Changes
241
- - **`$ne` is null-safe everywhere**: Non-null `$ne` now uses dialect-native null-safe inequality so rows with `NULL` in the compared column are included when they differ from the bound value (PostgreSQL/CockroachDB: `IS DISTINCT FROM`; SQLite: `IS NOT`; MySQL/MariaDB: `NOT (col <=> ?)`). This matches typical ORM expectations and fixes subtle missing rows bugs versus plain `<>` SQL. Queries that relied on SQLs three-valued logic excluding `NULL` from `$ne` matches may return more rows; use `{$ne: null}` / `$isNull` / `$isNotNull` explicitly for null-only filters.
297
+ - **`$ne` is null-safe everywhere**: Non-null `$ne` now uses dialect-native null-safe inequality so rows with `NULL` in the compared column are included when they differ from the bound value (PostgreSQL/CockroachDB: `IS DISTINCT FROM`; SQLite: `IS NOT`; MySQL/MariaDB: `NOT (col <=> ?)`). This matches typical ORM expectations and fixes subtle "missing rows" bugs versus plain `<>` SQL. Queries that relied on SQL's three-valued logic excluding `NULL` from `$ne` matches may return more rows; use `{$ne: null}` / `$isNull` / `$isNotNull` explicitly for null-only filters.
242
298
 
243
299
  ### Security
244
300
  - **SQL Injection Prevention for JSON**: Hardened JSON-path operators across all SQL dialects with strict identifier and key escaping.
@@ -277,14 +333,14 @@ date format is [yyyy-mm-dd]
277
333
  - **CockroachDB Support**: Added first-class support for `cockroachdb` dialect, leveraging its PostgreSQL wire-compatibility. Includes native `upsert` support and seamlessly mapped driver execution.
278
334
 
279
335
  ### Testing
280
- - **Vector search integration tests**: Added 7 end-to-end tests for `findMany` with `$sort: { $vector }` against a real Postgres+pgvector database covers cosine/L2 similarity ordering, `$project` distance projection, filter+sort combo, `$limit`, and empty-table edge case.
336
+ - **Vector search integration tests**: Added 7 end-to-end tests for `findMany` with `$sort: { $vector }` against a real Postgres+pgvector database - covers cosine/L2 similarity ordering, `$project` distance projection, filter+sort combo, `$limit`, and empty-table edge case.
281
337
  - Docker Postgres image switched to `pgvector/pgvector:pg18` for pgvector extension support.
282
338
  - Test DDL generator now handles `vector`, `halfvec`, and `sparsevec` column types.
283
339
 
284
340
  ## [0.4.4] - 2026-03-14
285
341
  ### Dependencies
286
- - **Vite 7 8**: Upgraded to Vite 8 (powered by Rolldown), replacing the `vite-tsconfig-paths` plugin with Vite's built-in `resolve.tsconfigPaths` option.
287
- - **TypeScript 5.9 6.0**: Upgraded to TypeScript 6.0.1-rc. Removed 6 redundant compiler options now default in TS6: `strict`, `strictNullChecks`, `noImplicitAny`, `esModuleInterop`, `allowSyntheticDefaultImports`, `useDefineForClassFields`.
342
+ - **Vite 7 -> 8**: Upgraded to Vite 8 (powered by Rolldown), replacing the `vite-tsconfig-paths` plugin with Vite's built-in `resolve.tsconfigPaths` option.
343
+ - **TypeScript 5.9 -> 6.0**: Upgraded to TypeScript 6.0.1-rc. Removed 6 redundant compiler options now default in TS6: `strict`, `strictNullChecks`, `noImplicitAny`, `esModuleInterop`, `allowSyntheticDefaultImports`, `useDefineForClassFields`.
288
344
  - Removed `vite-tsconfig-paths` (replaced by built-in Vite 8 feature).
289
345
 
290
346
  ## [0.4.1] - 2026-03-13
@@ -293,7 +349,7 @@ date format is [yyyy-mm-dd]
293
349
 
294
350
  ## [0.4.0] - 2026-03-13
295
351
  ### New Features
296
- - **`findManyStream()` Cursor-Based Async Iteration**: Stream query results row-by-row via `for await...of`. No relation-filling or lifecycle hooks optimized for raw throughput on large result sets.
352
+ - **`findManyStream()` - Cursor-Based Async Iteration**: Stream query results row-by-row via `for await...of`. No relation-filling or lifecycle hooks - optimized for raw throughput on large result sets.
297
353
  ```ts
298
354
  for await (const user of querier.findManyStream(User, { $where: { active: true } })) {
299
355
  process.stdout.write(user.name + '\n');
@@ -301,11 +357,11 @@ date format is [yyyy-mm-dd]
301
357
  ```
302
358
  Supports both the classic `(Entity, query)` and `$entity`-field dual-API patterns.
303
359
  - **Native Streaming for All Major Drivers**: Each driver now uses its optimal streaming API instead of falling back to `internalAll()`:
304
- - **SQLite** (`better-sqlite3`): `.iterate()` sync, zero-copy row iteration.
305
- - **MongoDB**: `FindCursor` async iterable native driver cursor with `buildFindCursor` helper (extracted from `findMany` for DRY reuse).
306
- - **MariaDB**: `queryStream()` first-class streaming API since v3.0, with backpressure.
307
- - **PostgreSQL**: `pg-query-stream` server-side cursors via optional peer dependency.
308
- - **MySQL2**: `Connection.query().stream()` Readable stream from non-promise connection.
360
+ - **SQLite** (`better-sqlite3`): `.iterate()` - sync, zero-copy row iteration.
361
+ - **MongoDB**: `FindCursor` async iterable - native driver cursor with `buildFindCursor` helper (extracted from `findMany` for DRY reuse).
362
+ - **MariaDB**: `queryStream()` - first-class streaming API since v3.0, with backpressure.
363
+ - **PostgreSQL**: `pg-query-stream` - server-side cursors via optional peer dependency.
364
+ - **MySQL2**: `Connection.query().stream()` - Readable stream from non-promise connection.
309
365
  - **LibSQL / D1 / Neon**: Graceful fallback to `internalAll()` (HTTP-based, no streaming API).
310
366
 
311
367
  ### Breaking Changes
@@ -320,7 +376,7 @@ date format is [yyyy-mm-dd]
320
376
 
321
377
  ## [0.3.2] - 2026-03-12
322
378
  ### Improvements
323
- - **Upsert `created` Flag**: added `created?: boolean` to `QueryUpdateResult` `true` when the record was inserted, `false` when updated. Supported on PostgreSQL, MySQL, and MongoDB. Returns `undefined` on SQLite and MariaDB where the driver cannot determine this.
379
+ - **Upsert `created` Flag**: added `created?: boolean` to `QueryUpdateResult` - `true` when the record was inserted, `false` when updated. Supported on PostgreSQL, MySQL, and MongoDB. Returns `undefined` on SQLite and MariaDB where the driver cannot determine this.
324
380
 
325
381
  ### Bug Fixes
326
382
  - **MongoDB `upsertOne`**: Fixed `firstId` always being `undefined` on insert by switching from `returnDocument: 'before'` to `returnDocument: 'after'`.
@@ -330,7 +386,7 @@ date format is [yyyy-mm-dd]
330
386
 
331
387
  ## [0.3.1] - 2026-03-12
332
388
  ### New Features
333
- - **MongoDB Atlas Vector Search**: Semantic search now supports MongoDB via the [`$vectorSearch`](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-stage/) aggregation pipeline stage. Same `$sort` API UQL internally translates to Atlas's native vector search with optimal pre-filtering (`$where` `$vectorSearch.filter`), score projection via `$meta: 'vectorSearchScore'`, and secondary sort support. Configure with `@Index(['embedding'], { type: 'vectorSearch', name: 'my_index' })`.
389
+ - **MongoDB Atlas Vector Search**: Semantic search now supports MongoDB via the [`$vectorSearch`](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-stage/) aggregation pipeline stage. Same `$sort` API - UQL internally translates to Atlas's native vector search with optimal pre-filtering (`$where` -> `$vectorSearch.filter`), score projection via `$meta: 'vectorSearchScore'`, and secondary sort support. Configure with `@Index(['embedding'], { type: 'vectorSearch', name: 'my_index' })`.
334
390
 
335
391
  ## [0.3.0] - 2026-03-12
336
392
  ### New Features
@@ -352,7 +408,7 @@ date format is [yyyy-mm-dd]
352
408
 
353
409
  ## [0.2.7] - 2026-03-11
354
410
  ### New Features
355
- - **More `$size` Comparison Operators**: `$size` now accepts comparison operator objects in addition to exact numbers e.g. `{ $size: { $gte: 2 } }`, `{ $size: { $gt: 0, $lte: 5 } }`, `{ $size: { $between: [1, 10] } }`. Supported operators: `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between`.
411
+ - **More `$size` Comparison Operators**: `$size` now accepts comparison operator objects in addition to exact numbers - e.g. `{ $size: { $gte: 2 } }`, `{ $size: { $gt: 0, $lte: 5 } }`, `{ $size: { $between: [1, 10] } }`. Supported operators: `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$between`.
356
412
  - **Relation Count Filtering**: `$size` on to-many relations (OneToMany, ManyToMany) now generates efficient `COUNT(*)` subqueries. E.g. `{ tags: { $size: { $gte: 2 } } }` produces `WHERE (SELECT COUNT(*) FROM ...) >= $1`.
357
413
 
358
414
  ### Test Coverage
@@ -360,7 +416,7 @@ date format is [yyyy-mm-dd]
360
416
 
361
417
  ## [0.2.6] - 2026-03-11
362
418
  ### Documentation
363
- - **README Migrations & Synchronization**: Rewrote the section with an entity-first intro explaining that UQL auto-generates migrations from entities. Reordered CLI commands to lead with `generate:entities`, renumbered usage examples, and added a concrete quick-start snippet.
419
+ - **README - Migrations & Synchronization**: Rewrote the section with an entity-first intro explaining that UQL auto-generates migrations from entities. Reordered CLI commands to lead with `generate:entities`, renumbered usage examples, and added a concrete quick-start snippet.
364
420
 
365
421
  ## [0.2.5] - 2026-03-11
366
422
  ### Branding
@@ -378,7 +434,7 @@ date format is [yyyy-mm-dd]
378
434
  - **Aggregate Queries guide**: Added dedicated [aggregate documentation page](https://uql-orm.dev/querying/aggregate) covering `$group`, `$having`, `$where` vs `$having`, sorting/pagination, and `$distinct`.
379
435
  - **README**: Added Aggregate Queries to features table, new §4 subsection with code examples and generated SQL, and "Learn more" link.
380
436
  - **Querier methods table**: Added `aggregate()` to the website's querier reference.
381
- - **Simplified tsconfig**: Removed `module`/`target` from recommended config only decorator flags are UQL-specific. Added Pure ESM note.
437
+ - **Simplified tsconfig**: Removed `module`/`target` from recommended config - only decorator flags are UQL-specific. Added Pure ESM note.
382
438
 
383
439
  ## [0.2.2] - 2026-03-09
384
440
  ### New Features
@@ -390,8 +446,8 @@ date format is [yyyy-mm-dd]
390
446
  $sort: { total: -1 },
391
447
  });
392
448
  ```
393
- - **SQL**: Generates `SELECT GROUP BY HAVING ORDER BY` with proper escaping and parameterization.
394
- - **MongoDB**: Generates a full aggregation pipeline (`$match $group $project $match $sort $skip $limit`).
449
+ - **SQL**: Generates `SELECT ... GROUP BY ... HAVING ... ORDER BY` with proper escaping and parameterization.
450
+ - **MongoDB**: Generates a full aggregation pipeline (`$match -> $group -> $project -> $match -> $sort -> $skip -> $limit`).
395
451
  - **`$distinct` support**: Added `$distinct` option to `Query<E>` for `SELECT DISTINCT` queries.
396
452
 
397
453
  ### Bug Fixes
@@ -407,8 +463,8 @@ date format is [yyyy-mm-dd]
407
463
  - **`compareFieldOperator` compaction**: Reduced from 142 to 85 lines (−40%) by extracting `COMPARE_OP_MAP` (simple comparison operators), `LIKE_OP_MAP` (8 string/LIKE operators), and unifying `$in`/`$nin` into a single code path.
408
464
  - **`saveRelation` split**: Decomposed the 61-line monolith into a dispatcher + 3 focused helpers by cardinality: `saveToMany` (1:M + M:M), `saveOneToOne` (1:1), `saveManyToOne` (M:1).
409
465
  - **`buildAggregateStages` complexity reduction**: Extracted `buildHavingFilter()` helper from the MongoDB aggregation pipeline builder, bringing cognitive complexity under the linter threshold.
410
- - **`deleteMany` DRY**: Eliminated duplicated `emitHook internalDeleteMany deleteRelations` logic by reusing the `resolveEntityAndQuery()` pattern.
411
- - **`directionMap` deduplication**: Extracted the `asc/desc 1/-1` mapping into a static `SORT_DIRECTION_MAP` constant shared by `sort()` and `aggregateSort()`.
466
+ - **`deleteMany` DRY**: Eliminated duplicated `emitHook -> internalDeleteMany -> deleteRelations` logic by reusing the `resolveEntityAndQuery()` pattern.
467
+ - **`directionMap` deduplication**: Extracted the `asc/desc -> 1/-1` mapping into a static `SORT_DIRECTION_MAP` constant shared by `sort()` and `aggregateSort()`.
412
468
  - **`parseGroupMap` shared utility**: Eliminated `$group` parsing duplication between SQL and MongoDB dialects with a single generator function in `dialect.util.ts`.
413
469
  - **`transformOperators` compaction**: Replaced verbose `if/else if` chains with a static `MONGO_COMPARISON_OP_MAP` lookup, and absorbed `$like`/`$ilike` into `REGEX_OP_MAP`.
414
470
  - **`putChildrenInParents` simplification**: Simplified child-grouping loop using explicit initialization pattern.
@@ -452,14 +508,14 @@ date format is [yyyy-mm-dd]
452
508
  - **Typed `raw()` Return**: `raw()` now returns `QueryRaw` instead of `any`, enabling IDE autocompletion and compile-time validation.
453
509
 
454
510
  ### Bug Fixes
455
- - **Fixed `IsolationLevel` Typo**: Corrected `'repeteable read'` `'repeatable read'` in the `IsolationLevel` type.
511
+ - **Fixed `IsolationLevel` Typo**: Corrected `'repeteable read'` -> `'repeatable read'` in the `IsolationLevel` type.
456
512
 
457
513
  ### Security
458
514
  - **`raw()` Safety Documentation**: Added JSDoc warning that `raw()` bypasses SQL parameterization, with guidance to use `$where` operators for user-supplied data.
459
515
 
460
516
  ## [0.1.4] - 2026-03-08
461
517
  ### Bug Fixes
462
- - **Fixed Virtual Field Alias in Relations**: `getRawValue` was missing a dot separator in prefixed aliases and had a stale dotunderscore replacement from the old convention. Added tests to prevent regressions.
518
+ - **Fixed Virtual Field Alias in Relations**: `getRawValue` was missing a dot separator in prefixed aliases and had a stale dot->underscore replacement from the old convention. Added tests to prevent regressions.
463
519
 
464
520
  ## [0.1.3] - 2026-03-08
465
521
  ### Code Quality
@@ -475,10 +531,10 @@ date format is [yyyy-mm-dd]
475
531
 
476
532
  ## [0.1.0] - 2026-03-08
477
533
  ### Package Rename
478
- - **Renamed `@uql/core` `uql-orm`**: The package is now published as an unscoped name for better SEO, discoverability, and simpler install commands (`npm install uql-orm`).
479
- - **Version Reset to `0.1.0`**: Fresh start to reflect UQL's modern, fast-moving nature. All functionality from `@uql/core@3.15.0` is preserved this is a rename, not a rewrite.
534
+ - **Renamed `@uql/core` -> `uql-orm`**: The package is now published as an unscoped name for better SEO, discoverability, and simpler install commands (`npm install uql-orm`).
535
+ - **Version Reset to `0.1.0`**: Fresh start to reflect UQL's modern, fast-moving nature. All functionality from `@uql/core@3.15.0` is preserved - this is a rename, not a rewrite.
480
536
  - **New Homepage**: [uql-orm.dev](https://uql-orm.dev)
481
- - **Migration**: Update your imports from `@uql/core` `uql-orm` (e.g., `import { Entity } from 'uql-orm'`). Sub-path imports follow the same pattern (e.g., `uql-orm/postgres`, `uql-orm/migrate`).
537
+ - **Migration**: Update your imports from `@uql/core` -> `uql-orm` (e.g., `import { Entity } from 'uql-orm'`). Sub-path imports follow the same pattern (e.g., `uql-orm/postgres`, `uql-orm/migrate`).
482
538
 
483
539
  ## [3.15.0] - 2026-03-07
484
540
  ### New Features
@@ -509,7 +565,7 @@ date format is [yyyy-mm-dd]
509
565
 
510
566
  ### Architecture
511
567
  - **Renamed Internal Methods**: `insertMany`/`updateMany` in `AbstractSqlQuerier` and `MongodbQuerier` are now `internalInsertMany`/`internalUpdateMany` (protected). Public `insertMany`/`updateMany` in `AbstractQuerier` wrap them with hook emission.
512
- - **New Utility**: `runHooks()` in `util/hook.util.ts` lightweight hook invocation engine using `entity.prototype[method].call(payload, ctx)`.
568
+ - **New Utility**: `runHooks()` in `util/hook.util.ts` - lightweight hook invocation engine using `entity.prototype[method].call(payload, ctx)`.
513
569
  - **Hook Inheritance**: Entity hooks are inherited from parent classes (parent hooks execute first).
514
570
 
515
571
  ### Test Coverage
@@ -518,7 +574,7 @@ date format is [yyyy-mm-dd]
518
574
  ## [3.14.0] - 2026-03-07
519
575
  ### Type Safety
520
576
  - **Map-Only `$select`**: `$select` now only accepts the map form (e.g., `{ id: true, name: true }`), removing the less type-safe array form. Relation selections are now additive in map form.
521
- - **Stricter `$and`/`$or`/`$not`/`$nor`**: Logical operators now only accept `QueryWhereMap | QueryRaw` elements bare ID values (e.g., `$or: [5]`) must use the explicit form `$or: [{ id: 5 }]`. This restores TypeScript's excess property checking inside logical clauses.
577
+ - **Stricter `$and`/`$or`/`$not`/`$nor`**: Logical operators now only accept `QueryWhereMap | QueryRaw` elements - bare ID values (e.g., `$or: [5]`) must use the explicit form `$or: [{ id: 5 }]`. This restores TypeScript's excess property checking inside logical clauses.
522
578
  - **Wider JSON Array Operators**: `$elemMatch` and `$all` now accept JSON fields without requiring `as any` casts, thanks to widened fallback types for non-array field types. Removed 6 unnecessary `as any` casts from tests.
523
579
 
524
580
  ### Refactoring
@@ -531,7 +587,7 @@ date format is [yyyy-mm-dd]
531
587
  - **Semantic `RawRow` Type**: Introduced `RawRow` as a reusable semantic alias for raw database result rows, replacing scattered `Record<string, unknown>` and `any` across queriers, introspection, and SQL utilities.
532
588
  - **Typed MySQL Driver**: Replaced `any` in MySQL2 querier with proper `ResultSetHeader` type from the driver.
533
589
  - **Smarter `$select` Validation**: Field and relation selections are now validated simultaneously, catching invalid property names at compile time.
534
- - **Stricter Null Comparisons**: `null` is now only accepted in `$eq` and `$ne` operators invalid comparisons like `$gt: null` are caught at compile time.
590
+ - **Stricter Null Comparisons**: `null` is now only accepted in `$eq` and `$ne` operators - invalid comparisons like `$gt: null` are caught at compile time.
535
591
  - **Typed `defaultValue`**: Entity field defaults are now type-checked instead of accepting `any`.
536
592
 
537
593
  ### API Surface & DX
@@ -544,7 +600,7 @@ date format is [yyyy-mm-dd]
544
600
  - **DRY `compareJsonPath`**: Simplified from 6 parameters to 3, removing redundant internal calls.
545
601
  - **DRY `extractInsertResult`**: Shared utility for INSERT result ID extraction across all RETURNING-based drivers (pg, neon, maria), eliminating duplicated logic.
546
602
  - **Eliminated Type Casts**: Replaced `Record<string, unknown>` casts with proper type guards across the dialect layer.
547
- - **Typo Fix**: Renamed `buldQueryWhereAsMap` `buildQueryWhereAsMap`.
603
+ - **Typo Fix**: Renamed `buldQueryWhereAsMap` -> `buildQueryWhereAsMap`.
548
604
 
549
605
  ## [3.13.0] - 2026-03-07
550
606
  ### New Features
@@ -597,8 +653,8 @@ date format is [yyyy-mm-dd]
597
653
  - **raw() String Prefix Fix**: String-based `raw()` values in `$and`/`$or` are no longer incorrectly table-prefixed (e.g., `raw("kind IS NOT NULL")` previously produced `resource.kind IS NOT NULL` instead of `kind IS NOT NULL`).
598
654
 
599
655
  ### Improvements & Refactoring
600
- - **DRY JSON Config**: Extracted `getBaseJsonConfig()` in each dialect `$elemMatch` and dot-notation now compose from a single config source, eliminating ~20 lines of duplication.
601
- - **Extracted `normalizeWhereValue()`**: Deduplicated the `Array→$in / objectpassthrough / scalar→$eq` normalization used by both regular field and JSON path comparisons.
656
+ - **DRY JSON Config**: Extracted `getBaseJsonConfig()` in each dialect - `$elemMatch` and dot-notation now compose from a single config source, eliminating ~20 lines of duplication.
657
+ - **Extracted `normalizeWhereValue()`**: Deduplicated the `Array->$in / object->passthrough / scalar->$eq` normalization used by both regular field and JSON path comparisons.
602
658
  - **Cleaner Dot-Notation Detection**: Uses `indexOf`+`slice` instead of two `split('.')` calls for efficient dot-path parsing.
603
659
  - **Relation Safety Guard**: `compareRelation()` now throws a descriptive `TypeError` if `rel.references` is missing, instead of a cryptic undefined crash.
604
660
  - **TypeScript 6 Compatibility**: Fixed `QueryWhereMap` circular type reference and expanded `QueryWhereOptions.clause` union.
@@ -613,7 +669,7 @@ date format is [yyyy-mm-dd]
613
669
 
614
670
  ## [3.11.0] - 2026-02-21
615
671
  ### New Features
616
- - **Scoped Querier**: Added `pool.withQuerier(callback)` the non-transactional counterpart to `pool.transaction()`. Acquires a querier, runs the callback, and guarantees release via `try/finally`. Useful for scoping connection lifetime without transaction overhead.
672
+ - **Scoped Querier**: Added `pool.withQuerier(callback)` - the non-transactional counterpart to `pool.transaction()`. Acquires a querier, runs the callback, and guarantees release via `try/finally`. Useful for scoping connection lifetime without transaction overhead.
617
673
 
618
674
  ```ts
619
675
  const users = await pool.withQuerier(async (querier) => {
@@ -633,10 +689,10 @@ date format is [yyyy-mm-dd]
633
689
  - **Branch coverage improved from ~88% to 90%** with targeted tests across `schemaAST`, `entityMerger`, `driftDetector`, `canonicalType`, and `tableBuilder`.
634
690
 
635
691
  ### Dependencies
636
- - `@biomejs/biome` 2.3.15 2.4.2
637
- - `rimraf` 6.1.2 6.1.3
638
- - `mariadb` 3.4.5 3.5.1
639
- - `mysql2` 3.17.1 3.17.2
692
+ - `@biomejs/biome` 2.3.15 -> 2.4.2
693
+ - `rimraf` 6.1.2 -> 6.1.3
694
+ - `mariadb` 3.4.5 -> 3.5.1
695
+ - `mysql2` 3.17.1 -> 3.17.2
640
696
 
641
697
  ## [3.9.2] - 2026-02-13
642
698
  ### Improvements & Refactoring
package/README.md CHANGED
@@ -38,6 +38,7 @@ Full docs: **[uql-orm.dev](https://uql-orm.dev)**
38
38
  | Type-safe queries with autocomplete | [Querying](https://uql-orm.dev/querying/querier) |
39
39
  | Entity-first migrations & autoSync | [Migrations](https://uql-orm.dev/migrations) |
40
40
  | Soft-delete, lifecycle hooks, relations | [Entities](https://uql-orm.dev/entities/basic) |
41
+ | Query filters, multi-tenancy & row-level security | [Filters](https://uql-orm.dev/querying/filters) · [Multi-tenancy](https://uql-orm.dev/multi-tenancy) |
41
42
  | Aggregate queries, grouping, HAVING | [Aggregate](https://uql-orm.dev/querying/aggregate) |
42
43
  | Semantic search & vector similarity | [Semantic Search](https://uql-orm.dev/ai-semantic-search) |
43
44
  | Streaming, transactions, raw SQL | [Querying](https://uql-orm.dev/querying/querier) |
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/browser/http/http.ts"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AAO,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,cAAc,iDAG/D;IAED,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,GAAE,YAAY,GAAG,cAAmB,2CAIzF;IAED,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,GAAE,YAAY,GAAG,cAAmB,2CAIzF;IAED,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,UAE7B;IAED,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,cAAc,sCAK5F;IAED,SAAS,CAAC,YAAY,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAKxE;CACF"}
@@ -56,12 +56,12 @@ export class HttpQuerier {
56
56
  }
57
57
  deleteOneById(entity, id, opts = {}) {
58
58
  const basePath = this.getBasePath(entity);
59
- const qs = opts.softDelete ? stringifyQuery({ softDelete: opts.softDelete }) : '';
59
+ const qs = opts.hardDelete ? stringifyQuery({ hardDelete: opts.hardDelete }) : '';
60
60
  return remove(`${basePath}/${id}${qs}`, this.buildOptions(opts));
61
61
  }
62
62
  deleteMany(entity, q, opts = {}) {
63
63
  const basePath = this.getBasePath(entity);
64
- const qs = stringifyQuery(opts.softDelete ? { ...q, softDelete: opts.softDelete } : q);
64
+ const qs = stringifyQuery(opts.hardDelete ? { ...q, hardDelete: opts.hardDelete } : q);
65
65
  return remove(`${basePath}${qs}`, this.buildOptions(opts));
66
66
  }
67
67
  getBasePath(entity) {
@@ -1 +1 @@
1
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AAE,OAAO,EAAE,EAAE,CAAC;IACrF,CAAC;CACF"}
@@ -2,11 +2,11 @@ import type { RequestSuccessResponse } from '../../http/contract.js';
2
2
  import type { IdValue, Query, QueryOne, QueryOptions, QuerySearch, Type, UpdatePayload } from '../../type/index.js';
3
3
  import type { RequestOptions } from './request.js';
4
4
  /**
5
- * Client-side querier mirrors {@link UniversalQuerier} method names and semantics but with two structural differences:
5
+ * Client-side querier - mirrors {@link UniversalQuerier} method names and semantics but with two structural differences:
6
6
  * 1. Every return type is wrapped in `RequestSuccessResponse<T>` (adds `data`/`count` envelope).
7
7
  * 2. Every method accepts an extra `opts?: RequestOptions` parameter.
8
8
  *
9
- * These differences prevent clean `extends UniversalQuerier` TypeScript does not support
9
+ * These differences prevent clean `extends UniversalQuerier` - TypeScript does not support
10
10
  * higher-kinded type wrappers, so the interfaces are kept in sync by convention.
11
11
  * @see UniversalQuerier for the server-side contract with direct return types.
12
12
  */
@@ -1,4 +1,4 @@
1
- var $=[];function X(f){for(let F of $)F(f)}function D(f){$.push(f);let F=$.length-1;return()=>{$.splice(F,1)}}class J extends Error{status;constructor(f,F){super(f);this.status=F;this.name="RequestError"}}function I(f,F){return V(f,{method:"get"},F)}function H(f,F,x){let K=JSON.stringify(F);return V(f,{method:"post",body:K},x)}function N(f,F,x){let K=JSON.stringify(F);return V(f,{method:"patch",body:K},x)}function T(f,F,x){let K=JSON.stringify(F);return V(f,{method:"put",body:K},x)}function k(f,F){return V(f,{method:"delete"},F)}function c(f,F,x){let K=JSON.stringify(F);return V(f,{method:"QUERY",body:K},x)}function V(f,F,x){if(X({phase:"start",opts:x}),F.headers={accept:"application/json","content-type":"application/json",...x?.headers},x?.signal)F.signal=x.signal;return fetch(f,F).then((K)=>K.json().then((Q)=>{if(K.status>=200&&K.status<300)return X({phase:"success",opts:x}),Q;let M=Q,G={message:M?.error?.message??K.statusText,code:M?.error?.code??K.status};throw X({phase:"error",error:G,opts:x}),new J(G.message,G.code)})).finally(()=>{X({phase:"complete",opts:x})})}function A(f){return f?Object.keys(f):[]}function L(f){let F=f.charAt(0).toLowerCase();for(let x=1;x<f.length;++x)F+=f[x]===f[x].toUpperCase()?"-"+f[x].toLowerCase():f[x];return F}var B={findMany:{method:"GET",path:""},findOne:{method:"GET",path:"/one"},count:{method:"GET",path:"/count"},findOneById:{method:"GET",path:"/:id"},insertOne:{method:"POST",path:""},insertMany:{method:"POST",path:"/many"},saveOne:{method:"PUT",path:""},saveMany:{method:"PUT",path:"/many"},updateMany:{method:"PATCH",path:""},updateOneById:{method:"PATCH",path:"/:id"},deleteOneById:{method:"DELETE",path:"/:id"},deleteMany:{method:"DELETE",path:""}},C=A(B),d=new Map(C.filter((f)=>B[f].method==="GET"&&B[f].path!=="/:id").map((f)=>[B[f].path,f]));function j(f){return L(f.name)}function W(f){if(!f)return"";let F=new URLSearchParams;for(let K of A(f)){let Q=f[K];if(Q===void 0)continue;F.append(K,typeof Q==="object"&&Q!==null?JSON.stringify(Q):String(Q))}let x=F.toString();return x?`?${x}`:""}class z{basePath;defaults;constructor(f,F={}){this.basePath=f;this.defaults=F}findOneById(f,F,x,K){let Q=this.getBasePath(f),Z=W(x);return I(`${Q}/${F}${Z}`,this.buildOptions(K))}findOne(f,F,x){return this.read(`${this.getBasePath(f)}${B.findOne.path}`,F,x)}findMany(f,F,x){let K={...F};if(x?.count)K.count=!0;return this.read(this.getBasePath(f),K,x)}findManyAndCount(f,F,x){return this.findMany(f,F,{...x,count:!0})}count(f,F,x){return this.read(`${this.getBasePath(f)}${B.count.path}`,F,x)}insertOne(f,F,x){let K=this.getBasePath(f);return H(K,F,this.buildOptions(x))}insertMany(f,F,x){let K=this.getBasePath(f);return H(`${K}${B.insertMany.path}`,F,this.buildOptions(x))}updateOneById(f,F,x,K){let Q=this.getBasePath(f);return N(`${Q}/${F}`,x,this.buildOptions(K))}updateMany(f,F,x,K){let Q=this.getBasePath(f),Z=W(F);return N(`${Q}${Z}`,x,this.buildOptions(K))}saveOne(f,F,x){let K=this.getBasePath(f);return T(K,F,this.buildOptions(x))}saveMany(f,F,x){let K=this.getBasePath(f);return T(`${K}${B.saveMany.path}`,F,this.buildOptions(x))}deleteOneById(f,F,x={}){let K=this.getBasePath(f),Q=x.softDelete?W({softDelete:x.softDelete}):"";return k(`${K}/${F}${Q}`,this.buildOptions(x))}deleteMany(f,F,x={}){let K=this.getBasePath(f),Q=W(x.softDelete?{...F,softDelete:x.softDelete}:F);return k(`${K}${Q}`,this.buildOptions(x))}getBasePath(f){return`${this.basePath}/${j(f)}`}read(f,F,x){if(this.defaults.readMethod==="QUERY")return c(f,F??{},this.buildOptions(x));return I(`${f}${W(F)}`,this.buildOptions(x))}buildOptions(f){if(!this.defaults.headers&&!f?.headers)return f;return{...f,headers:{...this.defaults.headers,...f?.headers}}}}var Y={getQuerier:()=>new z("/api")};function o(f){Y=f}function P(){return Y}function r(){return P().getQuerier()}export{o as setQuerierPool,k as remove,c as query,T as put,H as post,N as patch,D as on,X as notify,P as getQuerierPool,r as getQuerier,I as get,J as RequestError,z as HttpQuerier};
1
+ var G=[];function Z(f){for(let F of G)F(f)}function g(f){G.push(f);let F=G.length-1;return()=>{G.splice(F,1)}}class J extends Error{status;constructor(f,F){super(f);this.status=F;this.name="RequestError"}}function A(f,F){return V(f,{method:"get"},F)}function H(f,F,x){let K=JSON.stringify(F);return V(f,{method:"post",body:K},x)}function T(f,F,x){let K=JSON.stringify(F);return V(f,{method:"patch",body:K},x)}function z(f,F,x){let K=JSON.stringify(F);return V(f,{method:"put",body:K},x)}function M(f,F){return V(f,{method:"delete"},F)}function j(f,F,x){let K=JSON.stringify(F);return V(f,{method:"QUERY",body:K},x)}function V(f,F,x){if(Z({phase:"start",opts:x}),F.headers={accept:"application/json","content-type":"application/json",...x?.headers},x?.signal)F.signal=x.signal;return fetch(f,F).then((K)=>K.json().then((Q)=>{if(K.status>=200&&K.status<300)return Z({phase:"success",opts:x}),Q;let c=Q,W={message:c?.error?.message??K.statusText,code:c?.error?.code??K.status};throw Z({phase:"error",error:W,opts:x}),new J(W.message,W.code)})).finally(()=>{Z({phase:"complete",opts:x})})}function I(f){return f?Object.keys(f):[]}function k(f){let F=f.charAt(0).toLowerCase();for(let x=1;x<f.length;++x)F+=f[x]===f[x].toUpperCase()?"-"+f[x].toLowerCase():f[x];return F}var B={findMany:{method:"GET",path:""},findOne:{method:"GET",path:"/one"},count:{method:"GET",path:"/count"},findOneById:{method:"GET",path:"/:id"},insertOne:{method:"POST",path:""},insertMany:{method:"POST",path:"/many"},saveOne:{method:"PUT",path:""},saveMany:{method:"PUT",path:"/many"},updateMany:{method:"PATCH",path:""},updateOneById:{method:"PATCH",path:"/:id"},deleteOneById:{method:"DELETE",path:"/:id"},deleteMany:{method:"DELETE",path:""}},Y=I(B),h=new Map(Y.filter((f)=>B[f].method==="GET"&&B[f].path!=="/:id").map((f)=>[B[f].path,f]));function L(f){return k(f.name)}var P=["$select","$populate","$exclude","$where","$sort"],i=new Set([...P,"$skip","$limit","hardDelete","count"]);function X(f){if(!f)return"";let F=new URLSearchParams;for(let K of I(f)){let Q=f[K];if(Q===void 0)continue;F.append(K,typeof Q==="object"&&Q!==null?JSON.stringify(Q):String(Q))}let x=F.toString();return x?`?${x}`:""}class N{basePath;defaults;constructor(f,F={}){this.basePath=f;this.defaults=F}findOneById(f,F,x,K){let Q=this.getBasePath(f),$=X(x);return A(`${Q}/${F}${$}`,this.buildOptions(K))}findOne(f,F,x){return this.read(`${this.getBasePath(f)}${B.findOne.path}`,F,x)}findMany(f,F,x){let K={...F};if(x?.count)K.count=!0;return this.read(this.getBasePath(f),K,x)}findManyAndCount(f,F,x){return this.findMany(f,F,{...x,count:!0})}count(f,F,x){return this.read(`${this.getBasePath(f)}${B.count.path}`,F,x)}insertOne(f,F,x){let K=this.getBasePath(f);return H(K,F,this.buildOptions(x))}insertMany(f,F,x){let K=this.getBasePath(f);return H(`${K}${B.insertMany.path}`,F,this.buildOptions(x))}updateOneById(f,F,x,K){let Q=this.getBasePath(f);return T(`${Q}/${F}`,x,this.buildOptions(K))}updateMany(f,F,x,K){let Q=this.getBasePath(f),$=X(F);return T(`${Q}${$}`,x,this.buildOptions(K))}saveOne(f,F,x){let K=this.getBasePath(f);return z(K,F,this.buildOptions(x))}saveMany(f,F,x){let K=this.getBasePath(f);return z(`${K}${B.saveMany.path}`,F,this.buildOptions(x))}deleteOneById(f,F,x={}){let K=this.getBasePath(f),Q=x.hardDelete?X({hardDelete:x.hardDelete}):"";return M(`${K}/${F}${Q}`,this.buildOptions(x))}deleteMany(f,F,x={}){let K=this.getBasePath(f),Q=X(x.hardDelete?{...F,hardDelete:x.hardDelete}:F);return M(`${K}${Q}`,this.buildOptions(x))}getBasePath(f){return`${this.basePath}/${L(f)}`}read(f,F,x){if(this.defaults.readMethod==="QUERY")return j(f,F??{},this.buildOptions(x));return A(`${f}${X(F)}`,this.buildOptions(x))}buildOptions(f){if(!this.defaults.headers&&!f?.headers)return f;return{...f,headers:{...this.defaults.headers,...f?.headers}}}}var C={getQuerier:()=>new N("/api")};function p(f){C=f}function D(){return C}function s(){return D().getQuerier()}export{p as setQuerierPool,M as remove,j as query,z as put,H as post,T as patch,g as on,Z as notify,D as getQuerierPool,s as getQuerier,A as get,J as RequestError,N as HttpQuerier};
2
2
 
3
- //# debugId=6FE96F1E0134475464756E2164756E21
3
+ //# debugId=68C91E4CC01154B364756E2164756E21
4
4
  //# sourceMappingURL=uql-browser.min.js.map