uql-orm 0.4.4 → 0.5.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 +26 -0
- package/dist/browser/uql-browser.min.js +45 -9
- package/dist/browser/uql-browser.min.js.map +1 -1
- package/dist/cockroachdb/cockroachDialect.d.ts +12 -0
- package/dist/cockroachdb/cockroachDialect.d.ts.map +1 -0
- package/dist/cockroachdb/cockroachDialect.js +13 -0
- package/dist/cockroachdb/cockroachDialect.js.map +1 -0
- package/dist/cockroachdb/crdbQuerier.d.ts +14 -0
- package/dist/cockroachdb/crdbQuerier.d.ts.map +1 -0
- package/dist/cockroachdb/crdbQuerier.js +35 -0
- package/dist/cockroachdb/crdbQuerier.js.map +1 -0
- package/dist/cockroachdb/crdbQuerierPool.d.ts +14 -0
- package/dist/cockroachdb/crdbQuerierPool.d.ts.map +1 -0
- package/dist/cockroachdb/crdbQuerierPool.js +20 -0
- package/dist/cockroachdb/crdbQuerierPool.js.map +1 -0
- package/dist/cockroachdb/index.d.ts +4 -0
- package/dist/cockroachdb/index.d.ts.map +1 -0
- package/dist/cockroachdb/index.js +4 -0
- package/dist/cockroachdb/index.js.map +1 -0
- package/dist/dialect/dialectConfig.d.ts +6 -0
- package/dist/dialect/dialectConfig.d.ts.map +1 -1
- package/dist/dialect/dialectConfig.js +46 -1
- package/dist/dialect/dialectConfig.js.map +1 -1
- package/dist/migrate/migrator.d.ts.map +1 -1
- package/dist/migrate/migrator.js +1 -0
- package/dist/migrate/migrator.js.map +1 -1
- package/dist/postgres/postgresDialect.d.ts +2 -2
- package/dist/postgres/postgresDialect.d.ts.map +1 -1
- package/dist/postgres/postgresDialect.js +2 -2
- package/dist/postgres/postgresDialect.js.map +1 -1
- package/dist/schema/canonicalType.d.ts.map +1 -1
- package/dist/schema/canonicalType.js +39 -34
- package/dist/schema/canonicalType.js.map +1 -1
- package/dist/type/query.d.ts +1 -1
- package/dist/type/query.d.ts.map +1 -1
- package/package.json +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
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.5.0](https://github.com/rogerpadilla/uql/compare/uql-orm@0.4.5...uql-orm@0.5.0) (2026-03-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add CockroachDB support with a new dialect, querier, and Docker Compose configuration, extending PostgreSQL's base implementation. ([34b94e5](https://github.com/rogerpadilla/uql/commit/34b94e5ed25fa5e68a0ab868085bb8a157990574))
|
|
12
|
+
* Add CockroachDB support with native upsert and mapped driver execution. ([2b2538e](https://github.com/rogerpadilla/uql/commit/2b2538e2d6317a4729342c794cce73e6229ab038))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
1
18
|
# Changelog
|
|
2
19
|
|
|
3
20
|
All notable changes to this project will be documented in this file. Please add new changes to the top.
|
|
4
21
|
|
|
5
22
|
date format is [yyyy-mm-dd]
|
|
6
23
|
|
|
24
|
+
## [0.4.5] - 2026-03-14
|
|
25
|
+
### New Features
|
|
26
|
+
- **CockroachDB Support**: Added first-class support for `cockroachdb` dialect, leveraging its PostgreSQL wire-compatibility. Includes native `upsert` support and seamlessly mapped driver execution.
|
|
27
|
+
|
|
28
|
+
### Testing
|
|
29
|
+
- **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.
|
|
30
|
+
- Docker Postgres image switched to `pgvector/pgvector:pg18` for pgvector extension support.
|
|
31
|
+
- Test DDL generator now handles `vector`, `halfvec`, and `sparsevec` column types.
|
|
32
|
+
|
|
7
33
|
## [0.4.4] - 2026-03-14
|
|
8
34
|
### Dependencies
|
|
9
35
|
- **Vite 7 → 8**: Upgraded to Vite 8 (powered by Rolldown), replacing the `vite-tsconfig-paths` plugin with Vite's built-in `resolve.tsconfigPaths` option.
|
|
@@ -30,7 +30,7 @@ var _dec, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, /**
|
|
|
30
30
|
* auto-generating the primary-key's value when inserting.
|
|
31
31
|
*/ _init_pk1, _init_name4, _init_description2, _initProto6, _dec32, _initClass6, _BaseEntity5, _dec33, _dec34, _dec35, _dec36, _dec37, _init_name5, _init_percentage, _init_categoryId, _init_category, _init_description3, _initProto7, _dec38, _initClass7, _BaseEntity6, _dec39, _dec40, _dec41, _init_name6, _init_measureUnits, /**
|
|
32
32
|
* `onDelete` callback allows to specify which field will be used when deleting/querying this entity.
|
|
33
|
-
*/ _init_deletedAt, _initProto8, _dec42, _initClass8, _BaseEntity7, _dec43, _dec44, _dec45, _dec46, _init_name7, _init_categoryId1, _init_category1, _init_deletedAt1, _initProto9, _dec47, _initClass9, _BaseEntity8, _dec48, _dec49, _dec50, _init_name8, _init_address, _init_description4, _initProto10, _dec51, _initClass10, _BaseEntity9, _dec52, _dec53, _dec54, _dec55, _dec56, _dec57, _dec58, _dec59, _dec60, _dec61, _dec62, _dec63, _dec64, _dec65, _dec66, _init_name9, _init_description5, _init_code, _init_buyLedgerAccountId, _init_buyLedgerAccount, _init_saleLedgerAccountId, _init_saleLedgerAccount, _init_taxId, _init_tax, _init_measureUnitId, _init_measureUnit, _init_salePrice, _init_inventoryable, _init_tags, _init_tagsCount, _initProto11, _dec67, _initClass11, _BaseEntity10, _dec68, _dec69, _dec70, _init_name10, _init_items, _init_itemsCount, _initProto12, _dec71, _initClass12, _dec72, _dec73, _dec74, _init_id2, _init_itemId, _init_tagId, _initProto13, _dec75, _initClass13, _BaseEntity11, _dec76, _dec77, _dec78, _init_itemAdjustments, _init_date, _init_description6, _initProto14, _dec79, _initClass14, _BaseEntity12, _dec80, _dec81, _dec82, _dec83, _dec84, _dec85, _dec86, _dec87, _init_itemId1, _init_item, _init_number, _init_buyPrice, _init_storehouseId, _init_storehouse, _init_inventoryAdjustmentId, _init_inventoryAdjustment, _initProto15;
|
|
33
|
+
*/ _init_deletedAt, _initProto8, _dec42, _initClass8, _BaseEntity7, _dec43, _dec44, _dec45, _dec46, _init_name7, _init_categoryId1, _init_category1, _init_deletedAt1, _initProto9, _dec47, _initClass9, _BaseEntity8, _dec48, _dec49, _dec50, _init_name8, _init_address, _init_description4, _initProto10, _dec51, _initClass10, _BaseEntity9, _dec52, _dec53, _dec54, _dec55, _dec56, _dec57, _dec58, _dec59, _dec60, _dec61, _dec62, _dec63, _dec64, _dec65, _dec66, _init_name9, _init_description5, _init_code, _init_buyLedgerAccountId, _init_buyLedgerAccount, _init_saleLedgerAccountId, _init_saleLedgerAccount, _init_taxId, _init_tax, _init_measureUnitId, _init_measureUnit, _init_salePrice, _init_inventoryable, _init_tags, _init_tagsCount, _initProto11, _dec67, _initClass11, _BaseEntity10, _dec68, _dec69, _dec70, _init_name10, _init_items, _init_itemsCount, _initProto12, _dec71, _initClass12, _dec72, _dec73, _dec74, _init_id2, _init_itemId, _init_tagId, _initProto13, _dec75, _initClass13, _BaseEntity11, _dec76, _dec77, _dec78, _init_itemAdjustments, _init_date, _init_description6, _initProto14, _dec79, _initClass14, _BaseEntity12, _dec80, _dec81, _dec82, _dec83, _dec84, _dec85, _dec86, _dec87, _init_itemId1, _init_item, _init_number, _init_buyPrice, _init_storehouseId, _init_storehouse, _init_inventoryAdjustmentId, _init_inventoryAdjustment, _initProto15, _dec88, _initClass15, _dec89, _dec90, _dec91, _init_id3, _init_name11, _init_vec, _initProto16;
|
|
34
34
|
_dec = Id(), _dec1 = Field({
|
|
35
35
|
references: ()=>_Company
|
|
36
36
|
}), _dec2 = ManyToOne({
|
|
@@ -772,6 +772,42 @@ class ItemAdjustment extends (_BaseEntity12 = BaseEntity) {
|
|
|
772
772
|
super(...args), this.itemId = (_initProto15(this), _init_itemId1(this)), this.item = _init_item(this), this.number = _init_number(this), this.buyPrice = _init_buyPrice(this), this.storehouseId = _init_storehouseId(this), this.storehouse = _init_storehouse(this), this.inventoryAdjustmentId = _init_inventoryAdjustmentId(this), this.inventoryAdjustment = _init_inventoryAdjustment(this);
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
|
+
let _VectorItem;
|
|
776
|
+
_dec88 = Entity(), _dec89 = Id(), _dec90 = Field(), _dec91 = Field({
|
|
777
|
+
type: 'vector',
|
|
778
|
+
dimensions: 3
|
|
779
|
+
});
|
|
780
|
+
class VectorItem {
|
|
781
|
+
static{
|
|
782
|
+
({ e: [_init_id3, _init_name11, _init_vec, _initProto16], c: [_VectorItem, _initClass15] } = _apply_decs_2203_r(this, [
|
|
783
|
+
[
|
|
784
|
+
_dec89,
|
|
785
|
+
0,
|
|
786
|
+
"id"
|
|
787
|
+
],
|
|
788
|
+
[
|
|
789
|
+
_dec90,
|
|
790
|
+
0,
|
|
791
|
+
"name"
|
|
792
|
+
],
|
|
793
|
+
[
|
|
794
|
+
_dec91,
|
|
795
|
+
0,
|
|
796
|
+
"vec"
|
|
797
|
+
]
|
|
798
|
+
], [
|
|
799
|
+
_dec88
|
|
800
|
+
]));
|
|
801
|
+
}
|
|
802
|
+
static{
|
|
803
|
+
_initClass15();
|
|
804
|
+
}
|
|
805
|
+
constructor(){
|
|
806
|
+
this.id = (_initProto16(this), _init_id3(this));
|
|
807
|
+
this.name = _init_name11(this);
|
|
808
|
+
this.vec = _init_vec(this);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
775
811
|
|
|
776
812
|
const holder = globalThis;
|
|
777
813
|
const metaKey = Symbol.for('uql-orm/entity/decorator');
|
|
@@ -960,14 +996,14 @@ function getDdlForTable(entity, querier, primaryKeyType) {
|
|
|
960
996
|
let propSql = querier.dialect.escapeId(field.name) + ' ';
|
|
961
997
|
if (field.isId) {
|
|
962
998
|
propSql += field.onInsert ? `${insertableIdType} PRIMARY KEY` : primaryKeyType;
|
|
999
|
+
} else if (field.type === 'vector' || field.type === 'halfvec' || field.type === 'sparsevec') {
|
|
1000
|
+
propSql += field.dimensions ? `${field.type}(${field.dimensions})` : field.type;
|
|
1001
|
+
} else if (field.type === Number) {
|
|
1002
|
+
propSql += 'BIGINT';
|
|
1003
|
+
} else if (field.type === Date) {
|
|
1004
|
+
propSql += 'TIMESTAMP';
|
|
963
1005
|
} else {
|
|
964
|
-
|
|
965
|
-
propSql += 'BIGINT';
|
|
966
|
-
} else if (field.type === Date) {
|
|
967
|
-
propSql += 'TIMESTAMP';
|
|
968
|
-
} else {
|
|
969
|
-
propSql += defaultType;
|
|
970
|
-
}
|
|
1006
|
+
propSql += defaultType;
|
|
971
1007
|
}
|
|
972
1008
|
return propSql;
|
|
973
1009
|
});
|
|
@@ -5380,5 +5416,5 @@ const hooks = {
|
|
|
5380
5416
|
afterAll
|
|
5381
5417
|
};
|
|
5382
5418
|
|
|
5383
|
-
export { BaseEntity, _Company as Company, _InventoryAdjustment as InventoryAdjustment, _Item as Item, _ItemAdjustment as ItemAdjustment, _ItemTag as ItemTag, _LedgerAccount as LedgerAccount, _MeasureUnit as MeasureUnit, _MeasureUnitCategory as MeasureUnitCategory, _Profile as Profile, _Storehouse as Storehouse, _Tag as Tag, _Tax as Tax, _TaxCategory as TaxCategory, _User as User, _UserWithNonUpdatableId as UserWithNonUpdatableId, clearTables, createSpec, createTables, dropTables };
|
|
5419
|
+
export { BaseEntity, _Company as Company, _InventoryAdjustment as InventoryAdjustment, _Item as Item, _ItemAdjustment as ItemAdjustment, _ItemTag as ItemTag, _LedgerAccount as LedgerAccount, _MeasureUnit as MeasureUnit, _MeasureUnitCategory as MeasureUnitCategory, _Profile as Profile, _Storehouse as Storehouse, _Tag as Tag, _Tax as Tax, _TaxCategory as TaxCategory, _User as User, _UserWithNonUpdatableId as UserWithNonUpdatableId, _VectorItem as VectorItem, clearTables, createSpec, createTables, dropTables };
|
|
5384
5420
|
//# sourceMappingURL=uql-browser.min.js.map
|