bigal 12.1.5 → 13.0.0-beta2
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/.devcontainer/devcontainer.json +16 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc.cjs +34 -0
- package/CHANGELOG.md +5 -0
- package/dist/index.cjs +2626 -0
- package/dist/index.d.cts +892 -0
- package/dist/index.d.mts +892 -0
- package/dist/index.d.ts +892 -0
- package/dist/index.mjs +2605 -0
- package/eslint.config.mjs +25 -0
- package/package.json +44 -35
- package/tsconfig.build.json +7 -0
- package/Entity.d.ts +0 -16
- package/Entity.js +0 -13
- package/Entity.js.map +0 -1
- package/IReadonlyRepository.d.ts +0 -36
- package/IReadonlyRepository.js +0 -3
- package/IReadonlyRepository.js.map +0 -1
- package/IRepository.d.ts +0 -99
- package/IRepository.js +0 -3
- package/IRepository.js.map +0 -1
- package/ReadonlyRepository.d.ts +0 -69
- package/ReadonlyRepository.js +0 -687
- package/ReadonlyRepository.js.map +0 -1
- package/Repository.d.ts +0 -69
- package/Repository.js +0 -171
- package/Repository.js.map +0 -1
- package/SqlHelper.d.ts +0 -144
- package/SqlHelper.js +0 -1081
- package/SqlHelper.js.map +0 -1
- package/decorators/ColumnBaseOptions.d.ts +0 -10
- package/decorators/ColumnBaseOptions.js +0 -3
- package/decorators/ColumnBaseOptions.js.map +0 -1
- package/decorators/ColumnCollectionOptions.d.ts +0 -15
- package/decorators/ColumnCollectionOptions.js +0 -3
- package/decorators/ColumnCollectionOptions.js.map +0 -1
- package/decorators/ColumnModelOptions.d.ts +0 -7
- package/decorators/ColumnModelOptions.js +0 -3
- package/decorators/ColumnModelOptions.js.map +0 -1
- package/decorators/ColumnTypeOptions.d.ts +0 -21
- package/decorators/ColumnTypeOptions.js +0 -3
- package/decorators/ColumnTypeOptions.js.map +0 -1
- package/decorators/TableOptions.d.ts +0 -14
- package/decorators/TableOptions.js +0 -3
- package/decorators/TableOptions.js.map +0 -1
- package/decorators/column.d.ts +0 -9
- package/decorators/column.js +0 -93
- package/decorators/column.js.map +0 -1
- package/decorators/createDateColumn.d.ts +0 -6
- package/decorators/createDateColumn.js +0 -50
- package/decorators/createDateColumn.js.map +0 -1
- package/decorators/index.d.ts +0 -6
- package/decorators/index.js +0 -23
- package/decorators/index.js.map +0 -1
- package/decorators/primaryColumn.d.ts +0 -8
- package/decorators/primaryColumn.js +0 -66
- package/decorators/primaryColumn.js.map +0 -1
- package/decorators/table.d.ts +0 -5
- package/decorators/table.js +0 -40
- package/decorators/table.js.map +0 -1
- package/decorators/updateDateColumn.d.ts +0 -6
- package/decorators/updateDateColumn.js +0 -51
- package/decorators/updateDateColumn.js.map +0 -1
- package/decorators/versionColumn.d.ts +0 -6
- package/decorators/versionColumn.js +0 -51
- package/decorators/versionColumn.js.map +0 -1
- package/errors/QueryError.d.ts +0 -8
- package/errors/QueryError.js +0 -13
- package/errors/QueryError.js.map +0 -1
- package/errors/index.d.ts +0 -1
- package/errors/index.js +0 -18
- package/errors/index.js.map +0 -1
- package/index.d.ts +0 -35
- package/index.js +0 -220
- package/index.js.map +0 -1
- package/metadata/ColumnBaseMetadata.d.ts +0 -93
- package/metadata/ColumnBaseMetadata.js +0 -19
- package/metadata/ColumnBaseMetadata.js.map +0 -1
- package/metadata/ColumnCollectionMetadata.d.ts +0 -36
- package/metadata/ColumnCollectionMetadata.js +0 -63
- package/metadata/ColumnCollectionMetadata.js.map +0 -1
- package/metadata/ColumnMetadata.d.ts +0 -4
- package/metadata/ColumnMetadata.js +0 -3
- package/metadata/ColumnMetadata.js.map +0 -1
- package/metadata/ColumnModelMetadata.d.ts +0 -18
- package/metadata/ColumnModelMetadata.js +0 -43
- package/metadata/ColumnModelMetadata.js.map +0 -1
- package/metadata/ColumnModifierMetadata.d.ts +0 -46
- package/metadata/ColumnModifierMetadata.js +0 -3
- package/metadata/ColumnModifierMetadata.js.map +0 -1
- package/metadata/ColumnTypeMetadata.d.ts +0 -43
- package/metadata/ColumnTypeMetadata.js +0 -26
- package/metadata/ColumnTypeMetadata.js.map +0 -1
- package/metadata/MetadataStorage.d.ts +0 -13
- package/metadata/MetadataStorage.js +0 -19
- package/metadata/MetadataStorage.js.map +0 -1
- package/metadata/ModelMetadata.d.ts +0 -36
- package/metadata/ModelMetadata.js +0 -81
- package/metadata/ModelMetadata.js.map +0 -1
- package/metadata/index.d.ts +0 -10
- package/metadata/index.js +0 -33
- package/metadata/index.js.map +0 -1
- package/query/Comparer.d.ts +0 -1
- package/query/Comparer.js +0 -3
- package/query/Comparer.js.map +0 -1
- package/query/CountArgs.d.ts +0 -7
- package/query/CountArgs.js +0 -3
- package/query/CountArgs.js.map +0 -1
- package/query/CountResult.d.ts +0 -5
- package/query/CountResult.js +0 -3
- package/query/CountResult.js.map +0 -1
- package/query/CreateOptions.d.ts +0 -9
- package/query/CreateOptions.js +0 -3
- package/query/CreateOptions.js.map +0 -1
- package/query/CreateUpdateOptions.d.ts +0 -4
- package/query/CreateUpdateOptions.js +0 -3
- package/query/CreateUpdateOptions.js.map +0 -1
- package/query/DeleteOptions.d.ts +0 -12
- package/query/DeleteOptions.js +0 -3
- package/query/DeleteOptions.js.map +0 -1
- package/query/DestroyResult.d.ts +0 -5
- package/query/DestroyResult.js +0 -3
- package/query/DestroyResult.js.map +0 -1
- package/query/DoNotReturnRecords.d.ts +0 -3
- package/query/DoNotReturnRecords.js +0 -3
- package/query/DoNotReturnRecords.js.map +0 -1
- package/query/FindArgs.d.ts +0 -6
- package/query/FindArgs.js +0 -3
- package/query/FindArgs.js.map +0 -1
- package/query/FindOneArgs.d.ts +0 -11
- package/query/FindOneArgs.js +0 -3
- package/query/FindOneArgs.js.map +0 -1
- package/query/FindOneResult.d.ts +0 -12
- package/query/FindOneResult.js +0 -3
- package/query/FindOneResult.js.map +0 -1
- package/query/FindResult.d.ts +0 -15
- package/query/FindResult.js +0 -3
- package/query/FindResult.js.map +0 -1
- package/query/OnConflictOptions.d.ts +0 -25
- package/query/OnConflictOptions.js +0 -3
- package/query/OnConflictOptions.js.map +0 -1
- package/query/PaginateOptions.d.ts +0 -4
- package/query/PaginateOptions.js +0 -3
- package/query/PaginateOptions.js.map +0 -1
- package/query/PopulateArgs.d.ts +0 -13
- package/query/PopulateArgs.js +0 -3
- package/query/PopulateArgs.js.map +0 -1
- package/query/ReturnSelect.d.ts +0 -5
- package/query/ReturnSelect.js +0 -3
- package/query/ReturnSelect.js.map +0 -1
- package/query/Sort.d.ts +0 -15
- package/query/Sort.js +0 -3
- package/query/Sort.js.map +0 -1
- package/query/WhereQuery.d.ts +0 -21
- package/query/WhereQuery.js +0 -3
- package/query/WhereQuery.js.map +0 -1
- package/query/index.d.ts +0 -15
- package/query/index.js +0 -32
- package/query/index.js.map +0 -1
- package/types/ClassLike.d.ts +0 -8
- package/types/ClassLike.js +0 -3
- package/types/ClassLike.js.map +0 -1
- package/types/CreateUpdateParams.d.ts +0 -9
- package/types/CreateUpdateParams.js +0 -3
- package/types/CreateUpdateParams.js.map +0 -1
- package/types/EntityPrimitiveOrId.d.ts +0 -2
- package/types/EntityPrimitiveOrId.js +0 -3
- package/types/EntityPrimitiveOrId.js.map +0 -1
- package/types/ExcludeEntityCollections.d.ts +0 -5
- package/types/ExcludeEntityCollections.js +0 -3
- package/types/ExcludeEntityCollections.js.map +0 -1
- package/types/ExcludeFunctions.d.ts +0 -4
- package/types/ExcludeFunctions.js +0 -3
- package/types/ExcludeFunctions.js.map +0 -1
- package/types/GetValueType.d.ts +0 -1
- package/types/GetValueType.js +0 -3
- package/types/GetValueType.js.map +0 -1
- package/types/IncludeFunctions.d.ts +0 -4
- package/types/IncludeFunctions.js +0 -3
- package/types/IncludeFunctions.js.map +0 -1
- package/types/IsValueOfType.d.ts +0 -1
- package/types/IsValueOfType.js +0 -3
- package/types/IsValueOfType.js.map +0 -1
- package/types/OmitEntityCollections.d.ts +0 -7
- package/types/OmitEntityCollections.js +0 -3
- package/types/OmitEntityCollections.js.map +0 -1
- package/types/OmitFunctions.d.ts +0 -7
- package/types/OmitFunctions.js +0 -3
- package/types/OmitFunctions.js.map +0 -1
- package/types/PickAsType.d.ts +0 -3
- package/types/PickAsType.js +0 -3
- package/types/PickAsType.js.map +0 -1
- package/types/PickByValueType.d.ts +0 -5
- package/types/PickByValueType.js +0 -3
- package/types/PickByValueType.js.map +0 -1
- package/types/PickFunctions.d.ts +0 -4
- package/types/PickFunctions.js +0 -3
- package/types/PickFunctions.js.map +0 -1
- package/types/Populated.d.ts +0 -9
- package/types/Populated.js +0 -3
- package/types/Populated.js.map +0 -1
- package/types/QueryResult.d.ts +0 -9
- package/types/QueryResult.js +0 -3
- package/types/QueryResult.js.map +0 -1
- package/types/QueryResultOptionalPopulated.d.ts +0 -9
- package/types/QueryResultOptionalPopulated.js +0 -3
- package/types/QueryResultOptionalPopulated.js.map +0 -1
- package/types/QueryResultPopulated.d.ts +0 -9
- package/types/QueryResultPopulated.js +0 -3
- package/types/QueryResultPopulated.js.map +0 -1
- package/types/index.d.ts +0 -17
- package/types/index.js +0 -34
- package/types/index.js.map +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Entity } from '../Entity';
|
|
2
|
-
import type { OmitEntityCollections, OmitFunctions } from '../types';
|
|
3
|
-
import type { WhereQuery } from './WhereQuery';
|
|
4
|
-
type OnConflictTargets<T extends Entity, K extends string & keyof OmitFunctions<OmitEntityCollections<T>> = string & keyof OmitFunctions<OmitEntityCollections<T>>> = K[] | {
|
|
5
|
-
columns: K[];
|
|
6
|
-
where: WhereQuery<T>;
|
|
7
|
-
};
|
|
8
|
-
export interface OnConflictIgnoreOptions<T extends Entity, K extends string & keyof OmitFunctions<OmitEntityCollections<T>> = string & keyof OmitFunctions<OmitEntityCollections<T>>> {
|
|
9
|
-
onConflict: {
|
|
10
|
-
action: 'ignore';
|
|
11
|
-
targets: OnConflictTargets<T, K>;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export interface OnConflictMergeOptions<T extends Entity, K extends string & keyof OmitFunctions<OmitEntityCollections<T>> = string & keyof OmitFunctions<OmitEntityCollections<T>>> {
|
|
15
|
-
onConflict: {
|
|
16
|
-
action: 'merge';
|
|
17
|
-
targets: OnConflictTargets<T, K>;
|
|
18
|
-
merge?: K[] | {
|
|
19
|
-
columns?: K[];
|
|
20
|
-
where: WhereQuery<T>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export type OnConflictOptions<T extends Entity, K extends string & keyof OmitFunctions<OmitEntityCollections<T>> = string & keyof OmitFunctions<OmitEntityCollections<T>>> = OnConflictIgnoreOptions<T, K> | OnConflictMergeOptions<T, K>;
|
|
25
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OnConflictOptions.js","sourceRoot":"./","sources":["query/OnConflictOptions.ts"],"names":[],"mappings":""}
|
package/query/PaginateOptions.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PaginateOptions.js","sourceRoot":"./","sources":["query/PaginateOptions.ts"],"names":[],"mappings":""}
|
package/query/PopulateArgs.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Pool } from 'postgres-pool';
|
|
2
|
-
import type { Entity } from '../Entity';
|
|
3
|
-
import type { OmitEntityCollections, OmitFunctions } from '../types';
|
|
4
|
-
import type { Sort } from './Sort';
|
|
5
|
-
import type { WhereQuery } from './WhereQuery';
|
|
6
|
-
export interface PopulateArgs<T extends Entity, K extends keyof T> {
|
|
7
|
-
where?: WhereQuery<T>;
|
|
8
|
-
select?: (K & string & keyof OmitFunctions<OmitEntityCollections<T>>)[];
|
|
9
|
-
sort?: Sort<T>;
|
|
10
|
-
skip?: number;
|
|
11
|
-
limit?: number;
|
|
12
|
-
pool?: Pool;
|
|
13
|
-
}
|
package/query/PopulateArgs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PopulateArgs.js","sourceRoot":"./","sources":["query/PopulateArgs.ts"],"names":[],"mappings":""}
|
package/query/ReturnSelect.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Entity } from '../Entity';
|
|
2
|
-
import type { OmitEntityCollections, OmitFunctions } from '../types';
|
|
3
|
-
export interface ReturnSelect<T extends Entity, K extends keyof OmitFunctions<OmitEntityCollections<T>> = keyof OmitFunctions<OmitEntityCollections<T>>> {
|
|
4
|
-
returnSelect: (K & string)[];
|
|
5
|
-
}
|
package/query/ReturnSelect.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReturnSelect.js","sourceRoot":"./","sources":["query/ReturnSelect.ts"],"names":[],"mappings":""}
|
package/query/Sort.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Entity } from '../Entity';
|
|
2
|
-
import type { ExcludeFunctions, OmitEntityCollections, OmitFunctions } from '../types';
|
|
3
|
-
export type SortString<T extends Entity> = `${string & keyof OmitFunctions<OmitEntityCollections<T>>} ASC` | `${string & keyof OmitFunctions<OmitEntityCollections<T>>} asc` | `${string & keyof OmitFunctions<OmitEntityCollections<T>>} DESC` | `${string & keyof OmitFunctions<OmitEntityCollections<T>>} desc` | `${string & keyof OmitFunctions<OmitEntityCollections<T>>}`;
|
|
4
|
-
type ValidateMultipleSorts<T extends Entity, TNextSortPart extends string, TPreviouslyValidatedSortString extends string, TSortString extends string> = TNextSortPart extends `, ${SortString<T>}${infer TRestSortPart}` ? TRestSortPart extends '' ? TSortString : ValidateMultipleSorts<T, TRestSortPart, TNextSortPart extends `${infer TValidatedSortPart}${TRestSortPart}` ? `${TPreviouslyValidatedSortString}${TValidatedSortPart}` : never, TSortString> : `${TPreviouslyValidatedSortString}, ${SortString<T>}`;
|
|
5
|
-
export type MultipleSortString<T extends Entity, TSortString extends string = string> = TSortString extends `${SortString<T>}${infer TRestSortPart}` ? TRestSortPart extends '' ? TSortString : ValidateMultipleSorts<T, TRestSortPart, TSortString extends `${infer TPreviouslyValidatedSortString}${TRestSortPart}` ? TPreviouslyValidatedSortString : never, TSortString> : SortString<T>;
|
|
6
|
-
export type SortObjectValue = -1 | 'asc' | 'desc' | 1;
|
|
7
|
-
export type SortObject<T extends Entity> = {
|
|
8
|
-
[K in keyof T as ExcludeFunctions<OmitEntityCollections<T>, K>]?: SortObjectValue;
|
|
9
|
-
};
|
|
10
|
-
export type Sort<T extends Entity> = MultipleSortString<T> | SortObject<T>;
|
|
11
|
-
export interface OrderBy<T extends Entity> {
|
|
12
|
-
propertyName: string & keyof OmitFunctions<OmitEntityCollections<T>>;
|
|
13
|
-
descending?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
package/query/Sort.js
DELETED
package/query/Sort.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sort.js","sourceRoot":"./","sources":["query/Sort.ts"],"names":[],"mappings":""}
|
package/query/WhereQuery.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Entity, NotEntityBrand } from '../Entity';
|
|
2
|
-
import type { ExcludeEntityCollections, ExcludeFunctions } from '../types';
|
|
3
|
-
type ExcludeUndefined<T> = Exclude<T, undefined>;
|
|
4
|
-
export type LiteralValues<TValue> = (TValue | null)[] | TValue | null;
|
|
5
|
-
export type WhereClauseValue<TValue> = TValue extends NotEntityBrand | undefined ? Exclude<TValue, NotEntityBrand | undefined> : Extract<TValue, Entity> extends undefined ? LiteralValues<ExcludeUndefined<TValue>> : (ExcludeUndefined<Exclude<TValue, Entity>> | null)[] | (Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null)[] | ExcludeUndefined<Exclude<TValue, Entity>> | Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null;
|
|
6
|
-
export type StringConstraint<TValue extends string> = {
|
|
7
|
-
[P in 'contains' | 'endsWith' | 'like' | 'startsWith']?: LiteralValues<ExcludeUndefined<TValue>>;
|
|
8
|
-
};
|
|
9
|
-
export type NumberOrDateConstraint<TValue extends Date | number> = {
|
|
10
|
-
[P in '<' | '<=' | '>' | '>=']?: LiteralValues<ExcludeUndefined<TValue>>;
|
|
11
|
-
};
|
|
12
|
-
export type NegatableConstraint<TValue> = TValue | {
|
|
13
|
-
'!': TValue;
|
|
14
|
-
};
|
|
15
|
-
export type WhereQueryStatement<TValue> = [TValue] extends [string] ? NegatableConstraint<StringConstraint<TValue> | WhereClauseValue<TValue>> : TValue extends string ? NegatableConstraint<StringConstraint<TValue> | WhereClauseValue<TValue>> : TValue extends Date | number ? NegatableConstraint<NumberOrDateConstraint<TValue> | WhereClauseValue<TValue>> : NegatableConstraint<WhereClauseValue<TValue>>;
|
|
16
|
-
export type WhereQuery<T extends Entity> = {
|
|
17
|
-
[K in keyof T as ExcludeEntityCollections<T[K], ExcludeFunctions<T[K], K>>]?: K extends 'id' ? WhereQueryStatement<T | T[K]> : T[K] extends (infer U)[] | undefined ? WhereQueryStatement<ExcludeUndefined<U>> : NegatableConstraint<LiteralValues<ExcludeUndefined<T[K]>>> | WhereQueryStatement<ExcludeUndefined<T[K]>>;
|
|
18
|
-
} & {
|
|
19
|
-
or?: WhereQuery<T>[];
|
|
20
|
-
};
|
|
21
|
-
export {};
|
package/query/WhereQuery.js
DELETED
package/query/WhereQuery.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WhereQuery.js","sourceRoot":"./","sources":["query/WhereQuery.ts"],"names":[],"mappings":""}
|
package/query/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from './Comparer';
|
|
2
|
-
export * from './CountResult';
|
|
3
|
-
export * from './CreateUpdateOptions';
|
|
4
|
-
export * from './DeleteOptions';
|
|
5
|
-
export * from './DestroyResult';
|
|
6
|
-
export * from './DoNotReturnRecords';
|
|
7
|
-
export * from './FindArgs';
|
|
8
|
-
export * from './FindOneArgs';
|
|
9
|
-
export * from './FindOneResult';
|
|
10
|
-
export * from './FindResult';
|
|
11
|
-
export * from './PaginateOptions';
|
|
12
|
-
export * from './PopulateArgs';
|
|
13
|
-
export * from './ReturnSelect';
|
|
14
|
-
export * from './Sort';
|
|
15
|
-
export * from './WhereQuery';
|
package/query/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Comparer"), exports);
|
|
18
|
-
__exportStar(require("./CountResult"), exports);
|
|
19
|
-
__exportStar(require("./CreateUpdateOptions"), exports);
|
|
20
|
-
__exportStar(require("./DeleteOptions"), exports);
|
|
21
|
-
__exportStar(require("./DestroyResult"), exports);
|
|
22
|
-
__exportStar(require("./DoNotReturnRecords"), exports);
|
|
23
|
-
__exportStar(require("./FindArgs"), exports);
|
|
24
|
-
__exportStar(require("./FindOneArgs"), exports);
|
|
25
|
-
__exportStar(require("./FindOneResult"), exports);
|
|
26
|
-
__exportStar(require("./FindResult"), exports);
|
|
27
|
-
__exportStar(require("./PaginateOptions"), exports);
|
|
28
|
-
__exportStar(require("./PopulateArgs"), exports);
|
|
29
|
-
__exportStar(require("./ReturnSelect"), exports);
|
|
30
|
-
__exportStar(require("./Sort"), exports);
|
|
31
|
-
__exportStar(require("./WhereQuery"), exports);
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
package/query/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"./","sources":["query/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,gDAA8B;AAC9B,wDAAsC;AACtC,kDAAgC;AAChC,kDAAgC;AAChC,uDAAqC;AACrC,6CAA2B;AAC3B,gDAA8B;AAC9B,kDAAgC;AAChC,+CAA6B;AAC7B,oDAAkC;AAClC,iDAA+B;AAC/B,iDAA+B;AAC/B,yCAAuB;AACvB,+CAA6B"}
|
package/types/ClassLike.d.ts
DELETED
package/types/ClassLike.js
DELETED
package/types/ClassLike.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClassLike.js","sourceRoot":"./","sources":["types/ClassLike.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Entity, NotEntityBrand } from '../Entity';
|
|
2
|
-
import type { ExcludeEntityCollections } from './ExcludeEntityCollections';
|
|
3
|
-
import type { ExcludeFunctions } from './ExcludeFunctions';
|
|
4
|
-
/**
|
|
5
|
-
* Changes all Entity value properties to Primitive (string|number) | Pick<Entity, 'id'>
|
|
6
|
-
*/
|
|
7
|
-
export type CreateUpdateParams<T extends Entity> = {
|
|
8
|
-
[K in keyof T as ExcludeEntityCollections<NonNullable<T[K]>, ExcludeFunctions<T[K], K>>]?: T[K] extends NotEntityBrand | undefined ? T[K] : Extract<T[K], Entity> extends undefined ? T[K] : Exclude<T[K], Entity> | Pick<Extract<T[K], Entity>, 'id'>;
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateUpdateParams.js","sourceRoot":"./","sources":["types/CreateUpdateParams.ts"],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { Entity } from '../Entity';
|
|
2
|
-
export type EntityPrimitiveOrId<T> = T extends [] ? T extends (infer U)[] ? EntityPrimitiveOrId<U>[] : T : Extract<NonNullable<T>, Entity> extends undefined ? T : Exclude<NonNullable<T>, Entity> | Pick<Extract<NonNullable<T>, Entity>, 'id'>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntityPrimitiveOrId.js","sourceRoot":"./","sources":["types/EntityPrimitiveOrId.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Entity, NotEntityBrand } from '../Entity';
|
|
2
|
-
/**
|
|
3
|
-
* Removes all entity collection properties. To be used as a re-map key function
|
|
4
|
-
*/
|
|
5
|
-
export type ExcludeEntityCollections<T, K extends PropertyKey> = T extends NotEntityBrand[] | undefined ? K : T extends Entity[] | undefined ? never : K;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExcludeEntityCollections.js","sourceRoot":"./","sources":["types/ExcludeEntityCollections.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExcludeFunctions.js","sourceRoot":"./","sources":["types/ExcludeFunctions.ts"],"names":[],"mappings":""}
|
package/types/GetValueType.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type GetValueType<T, TValueType> = T extends TValueType[] ? T extends (infer U)[] ? Extract<U, TValueType> : never : T extends TValueType ? T : never;
|
package/types/GetValueType.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GetValueType.js","sourceRoot":"./","sources":["types/GetValueType.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IncludeFunctions.js","sourceRoot":"./","sources":["types/IncludeFunctions.ts"],"names":[],"mappings":""}
|
package/types/IsValueOfType.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type IsValueOfType<T, K extends PropertyKey, TValueType> = T extends TValueType | TValueType[] | undefined ? K : never;
|
package/types/IsValueOfType.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsValueOfType.js","sourceRoot":"./","sources":["types/IsValueOfType.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OmitEntityCollections.js","sourceRoot":"./","sources":["types/OmitEntityCollections.ts"],"names":[],"mappings":""}
|
package/types/OmitFunctions.d.ts
DELETED
package/types/OmitFunctions.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OmitFunctions.js","sourceRoot":"./","sources":["types/OmitFunctions.ts"],"names":[],"mappings":""}
|
package/types/PickAsType.d.ts
DELETED
package/types/PickAsType.js
DELETED
package/types/PickAsType.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PickAsType.js","sourceRoot":"./","sources":["types/PickAsType.ts"],"names":[],"mappings":""}
|
package/types/PickByValueType.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PickByValueType.js","sourceRoot":"./","sources":["types/PickByValueType.ts"],"names":[],"mappings":""}
|
package/types/PickFunctions.d.ts
DELETED
package/types/PickFunctions.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PickFunctions.js","sourceRoot":"./","sources":["types/PickFunctions.ts"],"names":[],"mappings":""}
|
package/types/Populated.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Entity } from '../Entity';
|
|
2
|
-
import type { PickFunctions } from './PickFunctions';
|
|
3
|
-
import type { QueryResult } from './QueryResult';
|
|
4
|
-
/**
|
|
5
|
-
* Removes primitives from specified properties and make non-optional. Allow singular Entity properties to be null.
|
|
6
|
-
*/
|
|
7
|
-
export type Populated<T extends Entity, K extends keyof T, TPropertyType extends Entity, TPropertyKeys extends keyof TPropertyType> = {
|
|
8
|
-
[P in K]-?: Extract<T[P], Entity | Entity[]> extends Entity ? undefined extends T[P] ? QueryResult<Pick<TPropertyType, TPropertyKeys | keyof PickFunctions<TPropertyType> | 'id'>> | null : QueryResult<Pick<TPropertyType, TPropertyKeys | keyof PickFunctions<TPropertyType> | 'id'>> : QueryResult<Pick<TPropertyType, TPropertyKeys | keyof PickFunctions<TPropertyType> | 'id'>>[];
|
|
9
|
-
};
|
package/types/Populated.js
DELETED
package/types/Populated.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Populated.js","sourceRoot":"./","sources":["types/Populated.ts"],"names":[],"mappings":""}
|
package/types/QueryResult.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Entity, NotEntityBrand } from '../Entity';
|
|
2
|
-
import type { ExcludeEntityCollections } from './ExcludeEntityCollections';
|
|
3
|
-
/**
|
|
4
|
-
* Changes all properties with Entity values to Primitive (string|number). Removes any properties that with values
|
|
5
|
-
* of Entity arrays
|
|
6
|
-
*/
|
|
7
|
-
export type QueryResult<T extends Entity> = Extract<{
|
|
8
|
-
[K in keyof T as ExcludeEntityCollections<NonNullable<T[K]>, K>]: T[K] extends NotEntityBrand | undefined ? T[K] : Exclude<T[K], Entity>;
|
|
9
|
-
}, T>;
|
package/types/QueryResult.js
DELETED
package/types/QueryResult.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryResult.js","sourceRoot":"./","sources":["types/QueryResult.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Entity } from '../Entity';
|
|
2
|
-
import type { EntityPrimitiveOrId } from './EntityPrimitiveOrId';
|
|
3
|
-
import type { QueryResult } from './QueryResult';
|
|
4
|
-
/**
|
|
5
|
-
* Allows a QueryResult type with specific properties optionally populated. If the property is populated, only the id property is needed
|
|
6
|
-
*/
|
|
7
|
-
export type QueryResultOptionalPopulated<T extends Entity, K extends keyof T> = Omit<QueryResult<T>, K> & {
|
|
8
|
-
[P in K]-?: T[P] extends [] ? undefined extends T[P] ? EntityPrimitiveOrId<T[P]> | null : EntityPrimitiveOrId<T[P]> : EntityPrimitiveOrId<T[P]>;
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryResultOptionalPopulated.js","sourceRoot":"./","sources":["types/QueryResultOptionalPopulated.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Entity } from '../Entity';
|
|
2
|
-
import type { GetValueType } from './GetValueType';
|
|
3
|
-
import type { QueryResult } from './QueryResult';
|
|
4
|
-
/**
|
|
5
|
-
* Allows a QueryResult type with specific populated properties
|
|
6
|
-
*/
|
|
7
|
-
export type QueryResultPopulated<T extends Entity, K extends keyof T> = Omit<QueryResult<T>, K> & {
|
|
8
|
-
[P in K]-?: Extract<T[P], Entity | Entity[]> extends Entity ? undefined extends T[P] ? QueryResult<GetValueType<T[P], Entity>> | null : QueryResult<GetValueType<T[P], Entity>> : QueryResult<GetValueType<T[P], Entity>>[];
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryResultPopulated.js","sourceRoot":"./","sources":["types/QueryResultPopulated.ts"],"names":[],"mappings":""}
|
package/types/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './ClassLike';
|
|
2
|
-
export * from './CreateUpdateParams';
|
|
3
|
-
export * from './EntityPrimitiveOrId';
|
|
4
|
-
export * from './ExcludeEntityCollections';
|
|
5
|
-
export * from './ExcludeFunctions';
|
|
6
|
-
export * from './GetValueType';
|
|
7
|
-
export * from './IncludeFunctions';
|
|
8
|
-
export * from './IsValueOfType';
|
|
9
|
-
export * from './OmitEntityCollections';
|
|
10
|
-
export * from './OmitFunctions';
|
|
11
|
-
export * from './PickAsType';
|
|
12
|
-
export * from './PickByValueType';
|
|
13
|
-
export * from './PickFunctions';
|
|
14
|
-
export * from './Populated';
|
|
15
|
-
export * from './QueryResult';
|
|
16
|
-
export * from './QueryResultPopulated';
|
|
17
|
-
export * from './QueryResultOptionalPopulated';
|
package/types/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ClassLike"), exports);
|
|
18
|
-
__exportStar(require("./CreateUpdateParams"), exports);
|
|
19
|
-
__exportStar(require("./EntityPrimitiveOrId"), exports);
|
|
20
|
-
__exportStar(require("./ExcludeEntityCollections"), exports);
|
|
21
|
-
__exportStar(require("./ExcludeFunctions"), exports);
|
|
22
|
-
__exportStar(require("./GetValueType"), exports);
|
|
23
|
-
__exportStar(require("./IncludeFunctions"), exports);
|
|
24
|
-
__exportStar(require("./IsValueOfType"), exports);
|
|
25
|
-
__exportStar(require("./OmitEntityCollections"), exports);
|
|
26
|
-
__exportStar(require("./OmitFunctions"), exports);
|
|
27
|
-
__exportStar(require("./PickAsType"), exports);
|
|
28
|
-
__exportStar(require("./PickByValueType"), exports);
|
|
29
|
-
__exportStar(require("./PickFunctions"), exports);
|
|
30
|
-
__exportStar(require("./Populated"), exports);
|
|
31
|
-
__exportStar(require("./QueryResult"), exports);
|
|
32
|
-
__exportStar(require("./QueryResultPopulated"), exports);
|
|
33
|
-
__exportStar(require("./QueryResultOptionalPopulated"), exports);
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
package/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"./","sources":["types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,uDAAqC;AACrC,wDAAsC;AACtC,6DAA2C;AAC3C,qDAAmC;AACnC,iDAA+B;AAC/B,qDAAmC;AACnC,kDAAgC;AAChC,0DAAwC;AACxC,kDAAgC;AAChC,+CAA6B;AAC7B,oDAAkC;AAClC,kDAAgC;AAChC,8CAA4B;AAC5B,gDAA8B;AAC9B,yDAAuC;AACvC,iEAA+C"}
|