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.
- package/CHANGELOG.md +25 -15
- package/dist/browser/uql-browser.min.js +1 -1
- package/dist/browser/uql-browser.min.js.map +1 -1
- package/dist/dialect/abstractSqlDialect.d.ts +2 -1
- package/dist/dialect/abstractSqlDialect.d.ts.map +1 -1
- package/dist/dialect/abstractSqlDialect.js +12 -0
- package/dist/dialect/abstractSqlDialect.js.map +1 -1
- package/dist/dialect/dialectConfig.d.ts +2 -0
- package/dist/dialect/dialectConfig.d.ts.map +1 -1
- package/dist/dialect/dialectConfig.js +5 -0
- package/dist/dialect/dialectConfig.js.map +1 -1
- package/dist/entity/decorator/definition.d.ts +1 -0
- package/dist/entity/decorator/definition.d.ts.map +1 -1
- package/dist/entity/decorator/definition.js +13 -3
- package/dist/entity/decorator/definition.js.map +1 -1
- package/dist/entity/decorator/index-decorator.d.ts.map +1 -1
- package/dist/entity/decorator/index-decorator.js +1 -14
- package/dist/entity/decorator/index-decorator.js.map +1 -1
- package/dist/express/querierMiddleware.d.ts +1 -1
- package/dist/express/querierMiddleware.d.ts.map +1 -1
- package/dist/express/querierMiddleware.js +3 -3
- package/dist/express/querierMiddleware.js.map +1 -1
- package/dist/libsql/libsqlQuerier.d.ts +2 -2
- package/dist/libsql/libsqlQuerier.d.ts.map +1 -1
- package/dist/libsql/libsqlQuerier.js +2 -2
- package/dist/libsql/libsqlQuerier.js.map +1 -1
- package/dist/maria/mariadbQuerierPool.d.ts +3 -1
- package/dist/maria/mariadbQuerierPool.d.ts.map +1 -1
- package/dist/maria/mariadbQuerierPool.js.map +1 -1
- package/dist/mongo/mongoDialect.d.ts +1 -1
- package/dist/mongo/mongoDialect.d.ts.map +1 -1
- package/dist/mongo/mongodbQuerier.d.ts +2 -2
- package/dist/mongo/mongodbQuerier.d.ts.map +1 -1
- package/dist/mongo/mongodbQuerier.js +2 -2
- package/dist/mongo/mongodbQuerier.js.map +1 -1
- package/dist/querier/abstractQuerier.d.ts +3 -3
- package/dist/querier/abstractQuerier.d.ts.map +1 -1
- package/dist/querier/abstractQuerier.js +2 -2
- package/dist/querier/abstractQuerier.js.map +1 -1
- package/dist/querier/abstractSqlQuerier.d.ts +2 -2
- package/dist/querier/abstractSqlQuerier.d.ts.map +1 -1
- package/dist/querier/abstractSqlQuerier.js +6 -3
- package/dist/querier/abstractSqlQuerier.js.map +1 -1
- package/dist/querier/decorator/log.d.ts.map +1 -1
- package/dist/querier/decorator/log.js.map +1 -1
- package/dist/querier/decorator/serialized.js.map +1 -1
- package/dist/querier/decorator/transactional.js.map +1 -1
- package/dist/sqlite/sqliteQuerierPool.d.ts.map +1 -1
- package/dist/sqlite/sqliteQuerierPool.js +6 -5
- package/dist/sqlite/sqliteQuerierPool.js.map +1 -1
- package/dist/type/querier.d.ts +9 -3
- package/dist/type/querier.d.ts.map +1 -1
- package/dist/type/querier.js.map +1 -1
- package/dist/util/raw.d.ts +14 -5
- package/dist/util/raw.d.ts.map +1 -1
- package/dist/util/raw.js +12 -3
- package/dist/util/raw.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
- **Fixed `IsolationLevel` Typo**: Corrected `'repeteable read'` → `'repeatable read'` in the `IsolationLevel` type.
|
|
20
29
|
|
|
21
|
-
|
|
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() {
|