bigal 14.0.87 → 14.1.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 +6 -0
- package/dist/index.cjs +18 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +18 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# [14.1.0](https://github.com/bigalorm/bigal/compare/v14.0.87...v14.1.0) (2025-12-02)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- Add select as a return on FindResult and FindOneResult ([#223](https://github.com/bigalorm/bigal/issues/223)) ([7fa0e60](https://github.com/bigalorm/bigal/commit/7fa0e6047a53bbb901677246e3b31acdd41be636))
|
|
6
|
+
|
|
1
7
|
## [14.0.87](https://github.com/bigalorm/bigal/compare/v14.0.86...v14.0.87) (2025-11-30)
|
|
2
8
|
|
|
3
9
|
## [14.0.86](https://github.com/bigalorm/bigal/compare/v14.0.85...v14.0.86) (2025-11-29)
|
package/dist/index.cjs
CHANGED
|
@@ -1385,6 +1385,15 @@ class ReadonlyRepository {
|
|
|
1385
1385
|
const sorts = sort ? this._convertSortsToOrderBy(sort) : [];
|
|
1386
1386
|
const modelInstance = this;
|
|
1387
1387
|
return {
|
|
1388
|
+
/**
|
|
1389
|
+
* Columns to select from the entity
|
|
1390
|
+
* @param {string[]} keys - Columns to select from the entity
|
|
1391
|
+
* @returns Query instance
|
|
1392
|
+
*/
|
|
1393
|
+
select(keys) {
|
|
1394
|
+
select = new Set(keys);
|
|
1395
|
+
return this;
|
|
1396
|
+
},
|
|
1388
1397
|
/**
|
|
1389
1398
|
* Filters the query
|
|
1390
1399
|
* @param {object} value - Object representing the where query
|
|
@@ -1545,6 +1554,15 @@ ${stack ?? ""}`;
|
|
|
1545
1554
|
const sorts = sort ? this._convertSortsToOrderBy(sort) : [];
|
|
1546
1555
|
const modelInstance = this;
|
|
1547
1556
|
return {
|
|
1557
|
+
/**
|
|
1558
|
+
* Columns to select from the entity
|
|
1559
|
+
* @param {string[]} keys - Columns to select from the entity
|
|
1560
|
+
* @returns Query instance
|
|
1561
|
+
*/
|
|
1562
|
+
select(keys) {
|
|
1563
|
+
select = new Set(keys);
|
|
1564
|
+
return this;
|
|
1565
|
+
},
|
|
1548
1566
|
/**
|
|
1549
1567
|
* Filters the query
|
|
1550
1568
|
* @param {object} value - Object representing the where query
|
package/dist/index.d.cts
CHANGED
|
@@ -480,6 +480,7 @@ interface PopulateArgs<T extends Entity, K extends keyof T> {
|
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
interface FindOneResult<T extends Entity, TReturn> extends PromiseLike<TReturn | null> {
|
|
483
|
+
select<TKeys extends string & keyof T>(keys: TKeys[]): FindOneResult<T, Pick<T, TKeys>>;
|
|
483
484
|
where(args: WhereQuery<T>): FindOneResult<T, TReturn>;
|
|
484
485
|
populate<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T, TPopulateType extends GetValueType<T[TProperty], Entity>, TPopulateSelectKeys extends string & keyof TPopulateType>(propertyName: TProperty, options?: PopulateArgs<TPopulateType, TPopulateSelectKeys>): FindOneResult<T, Omit<TReturn, TProperty> & Populated<T, TProperty, TPopulateType, TPopulateSelectKeys>>;
|
|
485
486
|
sort(value?: Sort<T>): FindOneResult<T, TReturn>;
|
|
@@ -493,6 +494,7 @@ interface PaginateOptions {
|
|
|
493
494
|
}
|
|
494
495
|
|
|
495
496
|
interface FindResult<T extends Entity, TReturn> extends PromiseLike<TReturn[]> {
|
|
497
|
+
select<TKeys extends string & keyof T>(keys: TKeys[]): FindResult<T, Pick<T, TKeys>>;
|
|
496
498
|
where(args: WhereQuery<T>): FindResult<T, TReturn>;
|
|
497
499
|
populate<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T, TPopulateType extends GetValueType<T[TProperty], Entity>, TPopulateSelectKeys extends string & keyof TPopulateType>(propertyName: TProperty, options?: PopulateArgs<TPopulateType, TPopulateSelectKeys>): FindResult<T, Omit<TReturn, TProperty> & Populated<T, TProperty, TPopulateType, TPopulateSelectKeys>>;
|
|
498
500
|
sort(value?: Sort<T>): FindResult<T, TReturn>;
|
package/dist/index.d.mts
CHANGED
|
@@ -480,6 +480,7 @@ interface PopulateArgs<T extends Entity, K extends keyof T> {
|
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
interface FindOneResult<T extends Entity, TReturn> extends PromiseLike<TReturn | null> {
|
|
483
|
+
select<TKeys extends string & keyof T>(keys: TKeys[]): FindOneResult<T, Pick<T, TKeys>>;
|
|
483
484
|
where(args: WhereQuery<T>): FindOneResult<T, TReturn>;
|
|
484
485
|
populate<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T, TPopulateType extends GetValueType<T[TProperty], Entity>, TPopulateSelectKeys extends string & keyof TPopulateType>(propertyName: TProperty, options?: PopulateArgs<TPopulateType, TPopulateSelectKeys>): FindOneResult<T, Omit<TReturn, TProperty> & Populated<T, TProperty, TPopulateType, TPopulateSelectKeys>>;
|
|
485
486
|
sort(value?: Sort<T>): FindOneResult<T, TReturn>;
|
|
@@ -493,6 +494,7 @@ interface PaginateOptions {
|
|
|
493
494
|
}
|
|
494
495
|
|
|
495
496
|
interface FindResult<T extends Entity, TReturn> extends PromiseLike<TReturn[]> {
|
|
497
|
+
select<TKeys extends string & keyof T>(keys: TKeys[]): FindResult<T, Pick<T, TKeys>>;
|
|
496
498
|
where(args: WhereQuery<T>): FindResult<T, TReturn>;
|
|
497
499
|
populate<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T, TPopulateType extends GetValueType<T[TProperty], Entity>, TPopulateSelectKeys extends string & keyof TPopulateType>(propertyName: TProperty, options?: PopulateArgs<TPopulateType, TPopulateSelectKeys>): FindResult<T, Omit<TReturn, TProperty> & Populated<T, TProperty, TPopulateType, TPopulateSelectKeys>>;
|
|
498
500
|
sort(value?: Sort<T>): FindResult<T, TReturn>;
|
package/dist/index.d.ts
CHANGED
|
@@ -480,6 +480,7 @@ interface PopulateArgs<T extends Entity, K extends keyof T> {
|
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
interface FindOneResult<T extends Entity, TReturn> extends PromiseLike<TReturn | null> {
|
|
483
|
+
select<TKeys extends string & keyof T>(keys: TKeys[]): FindOneResult<T, Pick<T, TKeys>>;
|
|
483
484
|
where(args: WhereQuery<T>): FindOneResult<T, TReturn>;
|
|
484
485
|
populate<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T, TPopulateType extends GetValueType<T[TProperty], Entity>, TPopulateSelectKeys extends string & keyof TPopulateType>(propertyName: TProperty, options?: PopulateArgs<TPopulateType, TPopulateSelectKeys>): FindOneResult<T, Omit<TReturn, TProperty> & Populated<T, TProperty, TPopulateType, TPopulateSelectKeys>>;
|
|
485
486
|
sort(value?: Sort<T>): FindOneResult<T, TReturn>;
|
|
@@ -493,6 +494,7 @@ interface PaginateOptions {
|
|
|
493
494
|
}
|
|
494
495
|
|
|
495
496
|
interface FindResult<T extends Entity, TReturn> extends PromiseLike<TReturn[]> {
|
|
497
|
+
select<TKeys extends string & keyof T>(keys: TKeys[]): FindResult<T, Pick<T, TKeys>>;
|
|
496
498
|
where(args: WhereQuery<T>): FindResult<T, TReturn>;
|
|
497
499
|
populate<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T, TPopulateType extends GetValueType<T[TProperty], Entity>, TPopulateSelectKeys extends string & keyof TPopulateType>(propertyName: TProperty, options?: PopulateArgs<TPopulateType, TPopulateSelectKeys>): FindResult<T, Omit<TReturn, TProperty> & Populated<T, TProperty, TPopulateType, TPopulateSelectKeys>>;
|
|
498
500
|
sort(value?: Sort<T>): FindResult<T, TReturn>;
|
package/dist/index.mjs
CHANGED
|
@@ -1379,6 +1379,15 @@ class ReadonlyRepository {
|
|
|
1379
1379
|
const sorts = sort ? this._convertSortsToOrderBy(sort) : [];
|
|
1380
1380
|
const modelInstance = this;
|
|
1381
1381
|
return {
|
|
1382
|
+
/**
|
|
1383
|
+
* Columns to select from the entity
|
|
1384
|
+
* @param {string[]} keys - Columns to select from the entity
|
|
1385
|
+
* @returns Query instance
|
|
1386
|
+
*/
|
|
1387
|
+
select(keys) {
|
|
1388
|
+
select = new Set(keys);
|
|
1389
|
+
return this;
|
|
1390
|
+
},
|
|
1382
1391
|
/**
|
|
1383
1392
|
* Filters the query
|
|
1384
1393
|
* @param {object} value - Object representing the where query
|
|
@@ -1539,6 +1548,15 @@ ${stack ?? ""}`;
|
|
|
1539
1548
|
const sorts = sort ? this._convertSortsToOrderBy(sort) : [];
|
|
1540
1549
|
const modelInstance = this;
|
|
1541
1550
|
return {
|
|
1551
|
+
/**
|
|
1552
|
+
* Columns to select from the entity
|
|
1553
|
+
* @param {string[]} keys - Columns to select from the entity
|
|
1554
|
+
* @returns Query instance
|
|
1555
|
+
*/
|
|
1556
|
+
select(keys) {
|
|
1557
|
+
select = new Set(keys);
|
|
1558
|
+
return this;
|
|
1559
|
+
},
|
|
1542
1560
|
/**
|
|
1543
1561
|
* Filters the query
|
|
1544
1562
|
* @param {object} value - Object representing the where query
|