uql-orm 0.1.4 → 0.2.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 (58) hide show
  1. package/CHANGELOG.md +25 -15
  2. package/dist/browser/uql-browser.min.js +1 -1
  3. package/dist/browser/uql-browser.min.js.map +1 -1
  4. package/dist/dialect/abstractSqlDialect.d.ts +2 -1
  5. package/dist/dialect/abstractSqlDialect.d.ts.map +1 -1
  6. package/dist/dialect/abstractSqlDialect.js +12 -0
  7. package/dist/dialect/abstractSqlDialect.js.map +1 -1
  8. package/dist/dialect/dialectConfig.d.ts +2 -0
  9. package/dist/dialect/dialectConfig.d.ts.map +1 -1
  10. package/dist/dialect/dialectConfig.js +5 -0
  11. package/dist/dialect/dialectConfig.js.map +1 -1
  12. package/dist/entity/decorator/definition.d.ts +1 -0
  13. package/dist/entity/decorator/definition.d.ts.map +1 -1
  14. package/dist/entity/decorator/definition.js +13 -3
  15. package/dist/entity/decorator/definition.js.map +1 -1
  16. package/dist/entity/decorator/index-decorator.d.ts.map +1 -1
  17. package/dist/entity/decorator/index-decorator.js +1 -14
  18. package/dist/entity/decorator/index-decorator.js.map +1 -1
  19. package/dist/express/querierMiddleware.d.ts +1 -1
  20. package/dist/express/querierMiddleware.d.ts.map +1 -1
  21. package/dist/express/querierMiddleware.js +3 -3
  22. package/dist/express/querierMiddleware.js.map +1 -1
  23. package/dist/libsql/libsqlQuerier.d.ts +2 -2
  24. package/dist/libsql/libsqlQuerier.d.ts.map +1 -1
  25. package/dist/libsql/libsqlQuerier.js +2 -2
  26. package/dist/libsql/libsqlQuerier.js.map +1 -1
  27. package/dist/maria/mariadbQuerierPool.d.ts +3 -1
  28. package/dist/maria/mariadbQuerierPool.d.ts.map +1 -1
  29. package/dist/maria/mariadbQuerierPool.js.map +1 -1
  30. package/dist/mongo/mongoDialect.d.ts +1 -1
  31. package/dist/mongo/mongoDialect.d.ts.map +1 -1
  32. package/dist/mongo/mongodbQuerier.d.ts +2 -2
  33. package/dist/mongo/mongodbQuerier.d.ts.map +1 -1
  34. package/dist/mongo/mongodbQuerier.js +2 -2
  35. package/dist/mongo/mongodbQuerier.js.map +1 -1
  36. package/dist/querier/abstractQuerier.d.ts +3 -3
  37. package/dist/querier/abstractQuerier.d.ts.map +1 -1
  38. package/dist/querier/abstractQuerier.js +2 -2
  39. package/dist/querier/abstractQuerier.js.map +1 -1
  40. package/dist/querier/abstractSqlQuerier.d.ts +2 -2
  41. package/dist/querier/abstractSqlQuerier.d.ts.map +1 -1
  42. package/dist/querier/abstractSqlQuerier.js +6 -3
  43. package/dist/querier/abstractSqlQuerier.js.map +1 -1
  44. package/dist/querier/decorator/log.d.ts.map +1 -1
  45. package/dist/querier/decorator/log.js.map +1 -1
  46. package/dist/querier/decorator/serialized.js.map +1 -1
  47. package/dist/querier/decorator/transactional.js.map +1 -1
  48. package/dist/sqlite/sqliteQuerierPool.d.ts.map +1 -1
  49. package/dist/sqlite/sqliteQuerierPool.js +6 -5
  50. package/dist/sqlite/sqliteQuerierPool.js.map +1 -1
  51. package/dist/type/querier.d.ts +9 -3
  52. package/dist/type/querier.d.ts.map +1 -1
  53. package/dist/type/querier.js.map +1 -1
  54. package/dist/util/raw.d.ts +14 -5
  55. package/dist/util/raw.d.ts.map +1 -1
  56. package/dist/util/raw.js +12 -3
  57. package/dist/util/raw.js.map +1 -1
  58. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,24 +1,34 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [0.1.4](https://github.com/rogerpadilla/uql/compare/uql-orm@0.1.3...uql-orm@0.1.4) (2026-03-08)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * Correct virtual field alias generation in `getRawValue` by ensuring proper dot separators and removing stale underscore replacement, with added tests for regression prevention. ([4071dd0](https://github.com/rogerpadilla/uql/commit/4071dd0f9f0b453a235cb75d1889a497417995d7))
12
-
1
+ # Changelog
13
2
 
3
+ All notable changes to this project will be documented in this file. Please add new changes to the top.
14
4
 
5
+ date format is [yyyy-mm-dd]
15
6
 
7
+ ## [0.2.0] - 2026-03-08
8
+ ### New Features
9
+ - **Transaction Isolation Levels**: `beginTransaction()` and `transaction()` now accept an optional `TransactionOptions` object with an `isolationLevel` property. Supports all standard SQL isolation levels: `read uncommitted`, `read committed`, `repeatable read`, and `serializable`.
10
+ - **PostgreSQL**: Uses inline syntax (`BEGIN TRANSACTION ISOLATION LEVEL ...`).
11
+ - **MySQL / MariaDB**: Uses the `SET TRANSACTION ISOLATION LEVEL` + `START TRANSACTION` two-statement pattern.
12
+ - **SQLite / LibSQL / MongoDB**: Isolation level is silently ignored (these databases do not support configurable isolation levels).
13
+ ```ts
14
+ await querier.beginTransaction({ isolationLevel: 'serializable' });
15
+ // or with the callback API
16
+ const result = await querier.transaction(async () => {
17
+ return querier.findMany(User, {});
18
+ }, { isolationLevel: 'read committed' });
19
+ ```
20
+ - **Config-Driven Dialect Strategy**: Added `isolationLevelStrategy` to `DialectConfig` (`'inline'` | `'set-before'` | `'none'`), enabling declarative per-dialect SQL generation without dialect-name branching.
16
21
 
17
- # Changelog
22
+ ## [0.1.5] - 2026-03-08
23
+ ### Type Safety
24
+ - **Eliminated `any` Types**: Replaced `any` with proper types across decorators (`serialized.ts`, `log.ts`, `transactional.ts`), Express middleware (`querierMiddleware.ts`), MongoDB dialect pipeline types, SQLite querier pool, and migrator. Remaining `any` usages are documented and justified (generic variance, `Reflect.getMetadata`).
25
+ - **Typed `raw()` Return**: `raw()` now returns `QueryRaw` instead of `any`, enabling IDE autocompletion and compile-time validation.
18
26
 
19
- All notable changes to this project will be documented in this file. Please add new changes to the top.
27
+ ### Bug Fixes
28
+ - **Fixed `IsolationLevel` Typo**: Corrected `'repeteable read'` → `'repeatable read'` in the `IsolationLevel` type.
20
29
 
21
- date format is [yyyy-mm-dd]
30
+ ### Security
31
+ - **`raw()` Safety Documentation**: Added JSDoc warning that `raw()` bypasses SQL parameterization, with guidance to use `$where` operators for user-supplied data.
22
32
 
23
33
  ## [0.1.4] - 2026-03-08
24
34
  ### Bug Fixes
@@ -774,7 +774,7 @@ class ItemAdjustment extends (_BaseEntity12 = BaseEntity) {
774
774
  }
775
775
 
776
776
  const holder = globalThis;
777
- const metaKey = 'uql-orm/entity/decorator';
777
+ const metaKey = Symbol.for('uql-orm/entity/decorator');
778
778
  const metas = holder[metaKey] ?? new Map();
779
779
  holder[metaKey] = metas;
780
780
  function getEntities() {