pqb 0.43.0 → 0.43.2
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/dist/index.d.ts +93 -37
- package/dist/index.js +569 -396
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +570 -397
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PoolConfig, Pool, PoolClient } from 'pg';
|
|
2
2
|
import * as orchid_core from 'orchid-core';
|
|
3
|
-
import { QueryResultRow, AdapterConfigBase, AdapterBase, QueryInput, SingleSqlItem, Sql, IsQuery, RecordUnknown, Expression, MaybeArray, TemplateLiteralArgs, EmptyObject, QueryColumns, QueryColumn, MaybePromise, FnUnknownToUnknown, QueryMetaBase, QueryReturnType, RecordString, ColumnsShapeBase, ColumnsParsers, PickQueryTable,
|
|
3
|
+
import { QueryResultRow, AdapterConfigBase, AdapterBase, QueryInput, SingleSqlItem, Sql, IsQuery, RecordUnknown, Expression, MaybeArray, TemplateLiteralArgs, EmptyObject, QueryColumns, QueryColumn, MaybePromise, FnUnknownToUnknown, QueryMetaBase, QueryReturnType, RecordString, ColumnsShapeBase, ColumnsParsers, PickQueryTable, HookSelect, BatchParsers, QueryLogObject, QueryLogger, QueryDataTransform, ExpressionChain, PickQueryShape, ColumnSchemaConfig, RawSQLBase, RawSQLValues, ExpressionTypeMethod, DynamicSQLArg, ExpressionData, StaticSQLArgs, SQLQueryArgs, PickQueryTableMetaResult, EmptyTuple, PickQueryMeta, PickQueryMetaResultReturnType, QueryColumnToNullable, QueryThenByQuery, SelectableBase, PickQueryMetaShape, PickQueryTableMetaResultShape, PickQueryMetaResultWindows, PickOutputTypeAndOperators, PickQueryResult, ValExpression, PickOutputType, QueryThen, DateColumnData, ColumnToCodeCtx, Code, TimeInterval, ColumnTypeSchemaArg, ColumnDataBase, ArrayMethodsData, ForeignKeyTable, ColumnNameOfTable, BaseNumberData, PickColumnBaseData, ColumnWithDefault, StringTypeData, PrimaryKeyColumn, ColumnTypeBase, ParseColumn, ParseNullColumn, EncodeColumn, QueryColumnsInit, QueryLogOptions, DefaultSelectColumns, DefaultSelectOutput, ColumnShapeInput, QueryThenShallowSimplifyArr, QueryCatch, TransactionState, QueryColumnOfDataType, PickQueryUniqueProperties, PickQueryMetaResult, PickQueryTableMetaResultInputType, UnionToIntersection, getValueKey, QueryThenByReturnType, PickQueryReturnType, QueryThenShallowSimplifyOptional, QueryThenShallowSimplify, PickQueryResultUniqueColumns, QueryInternalBase, PickType, RecordKeyTrue, ColumnShapeOutput, OperatorsNullable, PickQueryMetaReturnType, UniqueColumn, TimestampHelpers, ShallowSimplify, Codes, ColumnDataCheckBase } from 'orchid-core';
|
|
4
4
|
import { inspect } from 'node:util';
|
|
5
5
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
6
6
|
|
|
@@ -229,6 +229,7 @@ interface WindowDeclaration {
|
|
|
229
229
|
interface UnionItem {
|
|
230
230
|
a: Query | Expression;
|
|
231
231
|
k: UnionKind;
|
|
232
|
+
p?: boolean;
|
|
232
233
|
}
|
|
233
234
|
interface UnionSet {
|
|
234
235
|
b: Query;
|
|
@@ -338,7 +339,7 @@ interface HandleResult {
|
|
|
338
339
|
interface CommonQueryData {
|
|
339
340
|
adapter: Adapter;
|
|
340
341
|
shape: ColumnsShapeBase;
|
|
341
|
-
patchResult?(q: Query, queryResult: QueryResult): Promise<void>;
|
|
342
|
+
patchResult?(q: Query, hookSelect: HookSelect | undefined, queryResult: QueryResult): Promise<void>;
|
|
342
343
|
handleResult: HandleResult;
|
|
343
344
|
returnType: QueryReturnType;
|
|
344
345
|
returning?: boolean;
|
|
@@ -418,9 +419,17 @@ interface CommonQueryData {
|
|
|
418
419
|
};
|
|
419
420
|
all?: true;
|
|
420
421
|
chain?: ExpressionChain;
|
|
422
|
+
inCTE?: {
|
|
423
|
+
selectNum: boolean;
|
|
424
|
+
returning?: {
|
|
425
|
+
select?: string;
|
|
426
|
+
hookSelect?: HookSelect;
|
|
427
|
+
};
|
|
428
|
+
targetHookSelect: HookSelect;
|
|
429
|
+
};
|
|
421
430
|
}
|
|
422
431
|
interface SelectQueryData extends CommonQueryData {
|
|
423
|
-
type: undefined;
|
|
432
|
+
type: undefined | 'upsert';
|
|
424
433
|
distinct?: SelectableOrExpression[];
|
|
425
434
|
only?: boolean;
|
|
426
435
|
join?: JoinItem[];
|
|
@@ -430,6 +439,7 @@ interface SelectQueryData extends CommonQueryData {
|
|
|
430
439
|
union?: {
|
|
431
440
|
b: Query;
|
|
432
441
|
u: UnionItem[];
|
|
442
|
+
p?: boolean;
|
|
433
443
|
};
|
|
434
444
|
order?: OrderItem[];
|
|
435
445
|
returnsOne?: true;
|
|
@@ -1680,13 +1690,14 @@ declare class ColumnRefExpression<T extends QueryColumn> extends Expression<T> {
|
|
|
1680
1690
|
makeSQL(ctx: ToSQLCtx, quotedAs?: string): string;
|
|
1681
1691
|
}
|
|
1682
1692
|
declare class RefExpression<T extends QueryColumn> extends Expression<T> {
|
|
1683
|
-
q: QueryData;
|
|
1684
1693
|
ref: string;
|
|
1685
1694
|
result: {
|
|
1686
1695
|
value: T;
|
|
1687
1696
|
};
|
|
1688
|
-
|
|
1689
|
-
|
|
1697
|
+
q: QueryData;
|
|
1698
|
+
table?: string;
|
|
1699
|
+
constructor(value: T, query: Query, ref: string);
|
|
1700
|
+
makeSQL(ctx: ToSQLCtx): string;
|
|
1690
1701
|
}
|
|
1691
1702
|
type OrExpressionArg = QueryOrExpressionBooleanOrNullResult | undefined;
|
|
1692
1703
|
interface OrExpression extends Expression<BooleanQueryColumn>, OperatorsBoolean {
|
|
@@ -2835,13 +2846,15 @@ declare namespace TableData {
|
|
|
2835
2846
|
* - SET DEFAULT Set all the referencing columns, or a specified subset of the referencing columns, to their default values. A subset of columns can only be specified for ON DELETE actions. (There must be a row in the referenced table matching the default values, if they are not null, or the operation will fail.)
|
|
2836
2847
|
*/
|
|
2837
2848
|
type Action = 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT';
|
|
2838
|
-
interface
|
|
2839
|
-
name?: string;
|
|
2849
|
+
interface BaseOptions {
|
|
2840
2850
|
match?: Match;
|
|
2841
2851
|
onUpdate?: Action;
|
|
2842
2852
|
onDelete?: Action;
|
|
2843
2853
|
dropMode?: TableData.DropMode;
|
|
2844
2854
|
}
|
|
2855
|
+
interface Options extends BaseOptions {
|
|
2856
|
+
name?: string;
|
|
2857
|
+
}
|
|
2845
2858
|
}
|
|
2846
2859
|
export { };
|
|
2847
2860
|
}
|
|
@@ -2971,7 +2984,7 @@ declare const tableDataMethods: TableDataMethods<string>;
|
|
|
2971
2984
|
declare const parseTableData: (dataFn?: TableDataFn<unknown, any>) => TableData;
|
|
2972
2985
|
declare const parseTableDataInput: (tableData: TableData, item: TableDataInput) => void;
|
|
2973
2986
|
|
|
2974
|
-
interface NumberColumnData extends BaseNumberData {
|
|
2987
|
+
interface NumberColumnData extends BaseNumberData, ColumnData {
|
|
2975
2988
|
identity?: TableData.Identity;
|
|
2976
2989
|
}
|
|
2977
2990
|
interface SerialColumnData extends NumberColumnData {
|
|
@@ -4846,7 +4859,6 @@ declare class For {
|
|
|
4846
4859
|
|
|
4847
4860
|
type FromQuerySelf = PickQueryMetaTableShapeReturnTypeWithData;
|
|
4848
4861
|
type FromArg<T extends FromQuerySelf> = PickQueryTableMetaResult | Expression | Exclude<keyof T['withData'], symbol | number>;
|
|
4849
|
-
type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
4850
4862
|
type FromResult<T extends FromQuerySelf, Arg extends MaybeArray<FromArg<T>>> = Arg extends string ? T['withData'] extends WithDataItems ? {
|
|
4851
4863
|
[K in keyof T]: K extends 'meta' ? {
|
|
4852
4864
|
[K in keyof T['meta']]: K extends 'as' ? string | undefined : K extends 'selectable' ? SelectableFromShape<T['withData'][Arg]['shape'], Arg> : K extends 'kind' ? 'select' : T['meta'][K];
|
|
@@ -5481,29 +5493,24 @@ type SelectResultColumnsAndObj<T extends SelectSelf, Columns extends PropertyKey
|
|
|
5481
5493
|
[K in ('*' extends Columns[number] ? Exclude<Columns[number], '*'> | T['meta']['defaultSelect'] : Columns[number]) | keyof Obj as K extends Columns[number] ? T['meta']['selectable'][K]['as'] : K]: K extends keyof Obj ? SelectAsValueResult<T, Obj[K]> : T['meta']['selectable'][K]['column'];
|
|
5482
5494
|
} & (T['meta']['hasSelect'] extends (T['returnType'] extends 'value' | 'valueOrThrow' ? never : true) ? Omit<T['result'], Columns[number]> : unknown)> : T[K];
|
|
5483
5495
|
};
|
|
5484
|
-
type SelectAsMeta<
|
|
5496
|
+
type SelectAsMeta<Obj> = {
|
|
5485
5497
|
hasSelect: true;
|
|
5486
|
-
selectable: {
|
|
5487
|
-
[K in keyof
|
|
5498
|
+
selectable: UnionToIntersection<{
|
|
5499
|
+
[K in keyof Obj]: Obj[K] extends (q: never) => {
|
|
5488
5500
|
result: QueryColumns;
|
|
5489
|
-
returnType:
|
|
5490
|
-
} ?
|
|
5491
|
-
[
|
|
5492
|
-
as: K;
|
|
5493
|
-
column: ReturnType<Arg[K]>['result']['value'];
|
|
5494
|
-
};
|
|
5495
|
-
} : {
|
|
5496
|
-
[C in keyof ReturnType<Arg[K]>['result'] & string as `${K & string}.${C}`]: {
|
|
5501
|
+
returnType: infer R;
|
|
5502
|
+
} ? {
|
|
5503
|
+
[C in R extends 'value' | 'valueOrThrow' ? K : keyof ReturnType<Obj[K]>['result'] as R extends 'value' | 'valueOrThrow' ? K : `${K & string}.${C & string}`]: {
|
|
5497
5504
|
as: C;
|
|
5498
|
-
column: ReturnType<
|
|
5505
|
+
column: R extends 'value' | 'valueOrThrow' ? ReturnType<Obj[K]>['result']['value'] : ReturnType<Obj[K]>['result'][C];
|
|
5499
5506
|
};
|
|
5500
|
-
} :
|
|
5507
|
+
} : Obj[K] extends Expression ? {
|
|
5501
5508
|
[P in K]: {
|
|
5502
5509
|
as: K;
|
|
5503
|
-
column:
|
|
5510
|
+
column: Obj[K]['result']['value'];
|
|
5504
5511
|
};
|
|
5505
|
-
} :
|
|
5506
|
-
}[keyof
|
|
5512
|
+
} : never;
|
|
5513
|
+
}[keyof Obj]>;
|
|
5507
5514
|
};
|
|
5508
5515
|
type SelectAsValueResult<T extends SelectSelf, Arg> = Arg extends keyof T['meta']['selectable'] ? T['meta']['selectable'][Arg]['column'] : Arg extends Expression ? Arg['result']['value'] : Arg extends (q: never) => IsQuery ? SelectSubQueryResult<ReturnType<Arg>> : Arg extends (q: never) => Expression ? ReturnType<Arg>['result']['value'] : Arg extends (q: never) => IsQuery | Expression ? SelectSubQueryResult<Exclude<ReturnType<Arg>, Expression>> | Exclude<ReturnType<Arg>, IsQuery>['result']['value'] : never;
|
|
5509
5516
|
type SelectSubQueryResult<Arg extends SelectSelf> = Arg['returnType'] extends undefined | 'all' ? ColumnsShapeToObjectArray<Arg['result']> : Arg['returnType'] extends 'value' | 'valueOrThrow' ? Arg['result']['value'] : Arg['returnType'] extends 'pluck' ? ColumnsShapeToPluck<Arg['result']> : Arg['returnType'] extends 'one' ? ColumnsShapeToNullableObject<Arg['result']> : ColumnsShapeToObject<Arg['result']>;
|
|
@@ -6018,7 +6025,7 @@ type UnionArgs<T extends PickQueryResult> = ({
|
|
|
6018
6025
|
};
|
|
6019
6026
|
};
|
|
6020
6027
|
} | ((q: T) => Expression))[];
|
|
6021
|
-
declare const _queryUnion: <T extends PickQueryResult>(base: T, args: UnionArgs<T>, k: UnionKind) => T;
|
|
6028
|
+
declare const _queryUnion: <T extends PickQueryResult>(base: T, args: UnionArgs<T>, k: UnionKind, p?: boolean, m?: boolean) => T;
|
|
6022
6029
|
declare class Union {
|
|
6023
6030
|
/**
|
|
6024
6031
|
* Creates a union query, takes one or more queries or SQL expressions.
|
|
@@ -6765,9 +6772,7 @@ type UpsertThis = UpdateSelf & CreateSelf & QueryMetaHasWhere & {
|
|
|
6765
6772
|
};
|
|
6766
6773
|
declare class QueryUpsertOrCreate {
|
|
6767
6774
|
/**
|
|
6768
|
-
* `upsert` tries to update
|
|
6769
|
-
*
|
|
6770
|
-
* It will implicitly wrap queries in a transaction if it was not wrapped yet.
|
|
6775
|
+
* `upsert` tries to update a single record, and then it creates the record if it doesn't yet exist.
|
|
6771
6776
|
*
|
|
6772
6777
|
* `find` or `findBy` must precede `upsert` because it does not work with multiple updates.
|
|
6773
6778
|
*
|
|
@@ -6778,7 +6783,7 @@ declare class QueryUpsertOrCreate {
|
|
|
6778
6783
|
*
|
|
6779
6784
|
* `data` and `update` objects are of the same type that's expected by `update` method, `create` object is of type of `create` method argument.
|
|
6780
6785
|
*
|
|
6781
|
-
*
|
|
6786
|
+
* No values are returned by default, place `select` or `selectAll` before `upsert` to specify returning columns.
|
|
6782
6787
|
*
|
|
6783
6788
|
* ```ts
|
|
6784
6789
|
* await User.selectAll()
|
|
@@ -6855,6 +6860,9 @@ declare class QueryUpsertOrCreate {
|
|
|
6855
6860
|
* });
|
|
6856
6861
|
* ```
|
|
6857
6862
|
*
|
|
6863
|
+
* `upsert` works in the exact same way as [orCreate](#orCreate), but with `UPDATE` statement instead of `SELECT`.
|
|
6864
|
+
* it also performs a single query if the record exists, and two queries if there is no record yet.
|
|
6865
|
+
*
|
|
6858
6866
|
* @param data - `update` property for the data to update, `create` property for the data to create
|
|
6859
6867
|
*/
|
|
6860
6868
|
upsert<T extends UpsertThis, Update extends UpdateData<T>, BT extends CreateBelongsToData<T>>(this: T, data: {
|
|
@@ -6867,13 +6875,11 @@ declare class QueryUpsertOrCreate {
|
|
|
6867
6875
|
/**
|
|
6868
6876
|
* `orCreate` creates a record only if it was not found by conditions.
|
|
6869
6877
|
*
|
|
6870
|
-
* It will implicitly wrap queries in a transaction if it was not wrapped yet.
|
|
6871
|
-
*
|
|
6872
6878
|
* `find` or `findBy` must precede `orCreate`.
|
|
6873
6879
|
*
|
|
6874
6880
|
* It is accepting the same argument as `create` commands.
|
|
6875
6881
|
*
|
|
6876
|
-
*
|
|
6882
|
+
* No result is returned by default, place `get`, `select`, or `selectAll` before `orCreate` to specify returning columns.
|
|
6877
6883
|
*
|
|
6878
6884
|
* ```ts
|
|
6879
6885
|
* const user = await User.selectAll()
|
|
@@ -6884,7 +6890,7 @@ declare class QueryUpsertOrCreate {
|
|
|
6884
6890
|
* });
|
|
6885
6891
|
* ```
|
|
6886
6892
|
*
|
|
6887
|
-
* The data
|
|
6893
|
+
* The data can be returned from a function, it won't be called if the record was found:
|
|
6888
6894
|
*
|
|
6889
6895
|
* ```ts
|
|
6890
6896
|
* const user = await User.selectAll()
|
|
@@ -6895,6 +6901,35 @@ declare class QueryUpsertOrCreate {
|
|
|
6895
6901
|
* }));
|
|
6896
6902
|
* ```
|
|
6897
6903
|
*
|
|
6904
|
+
* `orCreate` works by performing just a single query in the case if the record exists, and one additional query when the record does not exist.
|
|
6905
|
+
*
|
|
6906
|
+
* At first, it performs a "find" query, the query cost is exact same as if you didn't use `orCreate`.
|
|
6907
|
+
*
|
|
6908
|
+
* Then, if the record wasn't found, it performs a single query with CTE expressions to try finding it again, for the case it was already created just a moment before,
|
|
6909
|
+
* and then it creates the record if it's still not found. Using such CTE allows to skip using transactions, while still conforming to atomicity.
|
|
6910
|
+
*
|
|
6911
|
+
* ```sql
|
|
6912
|
+
* -- first query
|
|
6913
|
+
* SELECT * FROM "table" WHERE "key" = 'value'
|
|
6914
|
+
*
|
|
6915
|
+
* -- the record could have been created in between these two queries
|
|
6916
|
+
*
|
|
6917
|
+
* -- second query
|
|
6918
|
+
* WITH find_row AS (
|
|
6919
|
+
* SELECT * FROM "table" WHERE "key" = 'value'
|
|
6920
|
+
* )
|
|
6921
|
+
* WITH insert_row AS (
|
|
6922
|
+
* INSERT INTO "table" ("key")
|
|
6923
|
+
* SELECT 'value'
|
|
6924
|
+
* -- skip the insert if the row already exists
|
|
6925
|
+
* WHERE NOT EXISTS (SELECT 1 FROM find_row)
|
|
6926
|
+
* RETURNING *
|
|
6927
|
+
* )
|
|
6928
|
+
* SELECT * FROM find_row
|
|
6929
|
+
* UNION ALL
|
|
6930
|
+
* SELECT * FROM insert_row
|
|
6931
|
+
* ```
|
|
6932
|
+
*
|
|
6898
6933
|
* @param data - the same data as for `create`, it may be returned from a callback
|
|
6899
6934
|
*/
|
|
6900
6935
|
orCreate<T extends UpsertThis, BT extends CreateBelongsToData<T>>(this: T, data: OrCreateArg<CreateData<T, BT>>): UpsertResult<T>;
|
|
@@ -7067,6 +7102,24 @@ type NarrowTypeResult<T extends PickQueryMetaResultReturnType, Narrow> = {
|
|
|
7067
7102
|
[P in keyof T['result'][K]]: P extends 'outputType' ? Narrow[K] extends T['result'][K]['outputType'] ? Narrow[K] : `narrowType() error: passed type does not exist in '${K & string}'s type union` : T['result'][K][P];
|
|
7068
7103
|
} : T['result'][K];
|
|
7069
7104
|
};
|
|
7105
|
+
type QueryIfResult<T extends PickQueryMetaResultReturnType, R extends PickQueryResult> = {
|
|
7106
|
+
[K in keyof T]: K extends 'result' ? {
|
|
7107
|
+
[K in keyof T['result'] | keyof R['result']]: K extends keyof T['result'] ? K extends keyof R['result'] ? R['result'][K] | T['result'][K] : T['result'][K] : R['result'][K];
|
|
7108
|
+
} : K extends 'then' ? QueryIfResultThen<T, R> : T[K];
|
|
7109
|
+
};
|
|
7110
|
+
type QueryIfResultThen<T extends PickQueryMetaResultReturnType, R extends PickQueryResult> = T['returnType'] extends undefined | 'all' ? QueryThenShallowSimplifyArr<{
|
|
7111
|
+
[K in keyof T['result']]: K extends keyof R['result'] ? T['result'][K]['outputType'] | R['result'][K]['outputType'] : T['result'][K]['outputType'];
|
|
7112
|
+
} & {
|
|
7113
|
+
[K in keyof R['result'] as K extends keyof T['result'] ? never : K]?: R['result'][K]['outputType'];
|
|
7114
|
+
}> : T['returnType'] extends 'one' ? QueryThenShallowSimplifyOptional<{
|
|
7115
|
+
[K in keyof T['result']]: K extends keyof R['result'] ? T['result'][K]['outputType'] | R['result'][K]['outputType'] : T['result'][K]['outputType'];
|
|
7116
|
+
} & {
|
|
7117
|
+
[K in keyof R['result'] as K extends keyof T['result'] ? never : K]?: R['result'][K]['outputType'];
|
|
7118
|
+
}> : T['returnType'] extends 'oneOrThrow' ? QueryThenShallowSimplify<{
|
|
7119
|
+
[K in keyof T['result']]: K extends keyof R['result'] ? T['result'][K]['outputType'] | R['result'][K]['outputType'] : T['result'][K]['outputType'];
|
|
7120
|
+
} & {
|
|
7121
|
+
[K in keyof R['result'] as K extends keyof T['result'] ? never : K]?: R['result'][K]['outputType'];
|
|
7122
|
+
}> : T['returnType'] extends 'value' ? QueryThen<T['result']['value']['outputType'] | R['result']['value']['outputType'] | undefined> : T['returnType'] extends 'valueOrThrow' ? QueryThen<T['result']['value']['outputType'] | R['result']['value']['outputType']> : T['returnType'] extends 'rows' ? QueryThen<(T['result'][keyof T['result']]['outputType'] | R['result'][keyof R['result']]['outputType'])[][]> : T['returnType'] extends 'pluck' ? QueryThen<(T['result']['pluck']['outputType'] | R['result']['pluck']['outputType'])[]> : QueryThen<void>;
|
|
7070
7123
|
type WrapQueryArg = FromQuerySelf;
|
|
7071
7124
|
interface QueryMethods<ColumnTypes> extends AsMethods, AggregateMethods, Select, FromMethods, Join, WithMethods, Union, JsonMethods, Create, Update, Delete, Transaction, For, Where, SearchMethods, Clear, Having, QueryLog, QueryHooks, QueryUpsertOrCreate, QueryGet, MergeQueryMethods, SqlMethod<ColumnTypes>, TransformMethods, QueryMap, ScopeMethods, SoftDeleteMethods, ExpressionMethods {
|
|
7072
7125
|
}
|
|
@@ -7628,6 +7681,9 @@ declare class QueryMethods<ColumnTypes> {
|
|
|
7628
7681
|
narrowType<T extends PickQueryMetaResultReturnType>(this: T): <Narrow>() => {
|
|
7629
7682
|
[K in keyof T]: K extends 'result' ? NarrowTypeResult<T, Narrow> : K extends 'then' ? QueryThenByQuery<T, NarrowTypeResult<T, Narrow>> : T[K];
|
|
7630
7683
|
};
|
|
7684
|
+
if<T extends PickQueryMetaResultReturnType, R extends PickQueryResult>(this: T, condition: boolean | null | undefined, fn: (q: T) => R & {
|
|
7685
|
+
returnType: T['returnType'];
|
|
7686
|
+
}): QueryIfResult<T, R>;
|
|
7631
7687
|
queryRelated<T extends PickQueryRelations, RelName extends keyof T['relations']>(this: T, relName: RelName, params: T['relations'][RelName]['relationConfig']['params']): T['relations'][RelName]['relationConfig']['maybeSingle'];
|
|
7632
7688
|
chain<T extends PickQueryMetaRelations, RelName extends keyof T['relations']>(this: T, relName: RelName): T['meta']['subQuery'] extends true ? T['relations'][RelName]['relationConfig']['maybeSingle'] : T['relations'][RelName]['relationConfig']['query'];
|
|
7633
7689
|
}
|
|
@@ -8470,7 +8526,7 @@ declare const columnForeignKeysToCode: (foreignKeys: TableData.ColumnReferences[
|
|
|
8470
8526
|
declare const foreignKeyArgumentToCode: ({ fnOrTable, foreignColumns, options, }: TableData.ColumnReferences, migration: boolean | undefined) => Codes;
|
|
8471
8527
|
declare const columnIndexesToCode: (items: Exclude<ColumnData['indexes'], undefined>) => Codes;
|
|
8472
8528
|
declare const columnExcludesToCode: (items: Exclude<ColumnData['excludes'], undefined>) => Codes;
|
|
8473
|
-
declare const columnCheckToCode: (ctx: ColumnToCodeCtx,
|
|
8529
|
+
declare const columnCheckToCode: (ctx: ColumnToCodeCtx, checks: ColumnDataCheckBase[]) => string;
|
|
8474
8530
|
declare const identityToCode: (identity: TableData.Identity, dataType?: string) => Codes;
|
|
8475
8531
|
declare const columnCode: (type: ColumnType, ctx: ColumnToCodeCtx, key: string, code: Code) => Code;
|
|
8476
8532
|
|
|
@@ -8675,4 +8731,4 @@ type CopyResult<T extends PickQueryMeta> = SetQueryKind<T, 'copy'>;
|
|
|
8675
8731
|
*/
|
|
8676
8732
|
declare function copyTableData<T extends PickQueryMetaShape>(query: T, arg: CopyArg<T>): CopyResult<T>;
|
|
8677
8733
|
|
|
8678
|
-
export { Adapter, type AdapterConfig, type AdapterOptions, type AddQueryDefaults, AfterCommitError, type AfterCommitErrorFulfilledResult, type AfterCommitErrorRejectedResult, type AfterCommitErrorResult, type AfterHook, type AggregateArgTypes, AggregateMethods, type AggregateOptions, type AliasOrTable, ArrayColumn, type ArrayColumnValue, type ArrayData, AsMethods, type AsQueryArg, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, type BooleanQueryColumn, BoxColumn, ByteaColumn, type ChangeCountArg, CidrColumn, CircleColumn, CitextColumn, Clear, type ClearStatement, type ColumnData, type ColumnDataGenerated, type ColumnFromDbParams, type ColumnInfoQueryData, ColumnRefExpression, ColumnType, type ColumnsByType, type ColumnsShape, type ColumnsShapeToNullableObject, type ColumnsShapeToObject, type ColumnsShapeToObjectArray, type ColumnsShapeToPluck, type CommonQueryData, ComputedColumn, type ComputedColumns, type ComputedColumnsFromOptions, type ComputedMethods, type ComputedOptionsFactory, type CopyOptions, type CopyQueryData, Create, type CreateBelongsToData, type CreateColumn, type CreateCtx, type CreateData, type CreateKind, type CreateMethodsNames, type CreateRelationsData, type CreateRelationsDataOmittingFKeys, type CreateResult, type CreateSelf, CustomTypeColumn, DateBaseColumn, DateColumn, type DateColumnInput, DateTimeBaseClass, DateTimeTzBaseClass, Db, type DbDomainArg, type DbDomainArgRecord, type DbExtension, type DbOptions, type DbResult, type DbSharedOptions, type DbTableConstructor, type DbTableOptionScopes, type DbTableOptions, DecimalColumn, type DecimalColumnData, type DefaultColumnTypes, type DefaultSchemaConfig, Delete, type DeleteArgs, type DeleteMethodsNames, type DeleteQueryData, type DeleteResult, DomainColumn, DoublePrecisionColumn, DynamicRawSQL, EnumColumn, ExpressionMethods, type ExpressionOutput, FnExpression, type FnExpressionArgs, type FnExpressionArgsPairs, type FnExpressionArgsValue, For, type FromArg, FromMethods, type FromQuerySelf, type FromResult, type GeneratorIgnore, type GetArg, type GetColumnInfo, type GetResult, type GetResultOptional, type GetStringArg, type GroupArgs, type HandleResult, Having, type HavingItem, type HookAction, type HookSelectArg, type IdentityColumn, InetColumn, type InsertQueryData, IntegerBaseColumn, IntegerColumn, IntervalColumn, type IsolationLevel, JSONColumn, JSONTextColumn, Join, type JoinArgToQuery, type JoinArgs, type JoinCallback, type JoinFirstArg, type JoinItem, type JoinItemArgs, type JoinLateralItem, type JoinLateralResult, type JoinQueryBuilder, type JoinQueryMethod, type JoinResult, type JoinedParsers, type JoinedShapes, JsonMethods, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, type MapTableScopesOption, type MergeQuery, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, type NoPrimaryKeyOption, type NonUniqDataItem, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, type NumberColumnData, type NumericColumns, type OnConflictMerge, OnConflictQueryBuilder, type OnConflictSet, type OnConflictTarget, OnMethods, type Operator, Operators, type OperatorsAny, type OperatorsArray, type OperatorsBoolean, type OperatorsDate, type OperatorsJson, type OperatorsNumber, type OperatorsText, type OperatorsTime, type OrCreateArg, OrExpression, OrchidOrmError, OrchidOrmInternalError, type OrderArg, type OrderArgSelf, type OrderArgs, type OrderItem, type OrderTsQueryConfig, type Over, PathColumn, type PickColumnData, type PickQueryBaseQuery, type PickQueryColumnTypes, type PickQueryDataShapeAndJoinedShapes, type PickQueryInternal, type PickQueryMetaRelations, type PickQueryMetaRelationsResult, type PickQueryMetaResultRelations, type PickQueryMetaResultRelationsWindows, type PickQueryMetaResultRelationsWindowsColumnTypes, type PickQueryMetaResultRelationsWithDataReturnType, type PickQueryMetaResultRelationsWithDataReturnTypeShape, type PickQueryMetaResultReturnTypeWithDataWindows, type PickQueryMetaResultReturnTypeWithDataWindowsTable, type PickQueryMetaShapeRelationsWithData, type PickQueryMetaTable, type PickQueryMetaTableShape, type PickQueryMetaTableShapeReturnTypeWithData, type PickQueryMetaWithData, type PickQueryMetaWithDataColumnTypes, type PickQueryQ, type PickQueryQAndBaseQuery, type PickQueryQAndInternal, type PickQueryRelations, type PickQueryRelationsWithData, type PickQueryResultColumnTypes, type PickQueryShapeResultSinglePrimaryKey, type PickQueryShapeSinglePrimaryKey, type PickQuerySinglePrimaryKey, type PickQueryWindows, type PickQueryWithData, type PickQueryWithDataColumnTypes, PointColumn, PolygonColumn, PostgisGeographyPointColumn, type PostgisPoint, type Query, type QueryAfterHook, type QueryArraysResult, type QueryBatchResult, type QueryBeforeHook, type QueryComputedArg, type QueryData, type QueryDataFromItem, type QueryDataJoinTo, type QueryDefaultReturnData, QueryError, type QueryErrorName, QueryGet, type QueryGetSelf, type QueryHelperResult, QueryHooks, type QueryInternal, QueryLog, type QueryMetaHasSelect, type QueryMetaHasWhere, QueryMethods, type QueryOrExpression, type QueryOrExpressionBooleanOrNullResult, type QueryResult, type QueryScopeData, type QueryScopes, type QuerySourceItem, QueryUpsertOrCreate, RawSQL, RealColumn, type RecordOfColumnsShapeBase, RefExpression, type RelationConfigBase, type RelationConfigDataForCreate, type RelationJoinQuery, type RelationQueryBase, type RelationsBase, type RuntimeComputedQueryColumn, type SearchArg, SearchMethods, type SearchWeight, type SearchWeightRecord, Select, type SelectArg, type SelectArgs, type SelectAs, type SelectAsValue, type SelectItem, type SelectQueryData, type SelectSubQueryResult, type SelectableFromShape, type SelectableOfType, type SelectableOrExpression, type SelectableOrExpressionOfType, type SelectableOrExpressions, SerialColumn, type SerialColumnData, type SetQueryKind, type SetQueryKindResult, type SetQueryReturnsAll, type SetQueryReturnsAllKind, type SetQueryReturnsAllKindResult, type SetQueryReturnsColumnInfo, type SetQueryReturnsColumnKind, type SetQueryReturnsColumnKindResult, type SetQueryReturnsColumnOptional, type SetQueryReturnsColumnOrThrow, type SetQueryReturnsOne, type SetQueryReturnsOneKind, type SetQueryReturnsOneKindResult, type SetQueryReturnsOneOptional, type SetQueryReturnsPluck, type SetQueryReturnsPluckColumn, type SetQueryReturnsPluckColumnKind, type SetQueryReturnsPluckColumnKindResult, type SetQueryReturnsRowCount, type SetQueryReturnsRowCountMany, type SetQueryReturnsRows, type SetQueryReturnsValueOptional, type SetQueryReturnsValueOrThrow, type SetQueryReturnsVoid, type SetQueryReturnsVoidKind, type SetQueryTableAlias, type ShapeColumnPrimaryKeys, type ShapeUniqueColumns, type SimpleJoinItem, type SimpleJoinItemNonSubQueryArgs, SmallIntColumn, SmallSerialColumn, type SortDir, type SqlFn, SqlMethod, StringColumn$1 as StringColumn, TableData, type TableDataFn, type TableDataInput, type TableDataItem, type TableDataItemsUniqueColumnTuples, type TableDataItemsUniqueColumns, type TableDataItemsUniqueConstraints, type TableDataMethods, TextBaseColumn, TextColumn, type TextColumnData, Then, TimeColumn, TimestampColumn, TimestampTZColumn, type ToSQLCtx, type ToSQLOptions, type ToSQLQuery, Transaction, TransactionAdapter, type TransactionOptions, TransformMethods, type TruncateQueryData, TsQueryColumn, TsVectorColumn, type TypeParsers, UUIDColumn, UnhandledTypeError, Union, type UnionArgs, type UnionItem, type UnionKind, type UnionSet, type UniqueConstraints, type UniqueQueryTypeOrExpression, type UniqueTableDataItem, UnknownColumn, Update, type UpdateArg, type UpdateCtx, type UpdateCtxCollect, type UpdateData, type UpdateQueryData, type UpdateQueryDataItem, type UpdateQueryDataObject, type UpdateSelf, type UpdatedAtDataInjector, type UpsertResult, type UpsertThis, VarCharColumn, VirtualColumn, Where, type WhereArg, type WhereArgs, type WhereInArg, type WhereInColumn, type WhereInItem, type WhereInValues, type WhereItem, type WhereJsonPathEqualsItem, type WhereNotArgs, type WhereOnItem, type WhereOnJoinItem, type WhereQueryBuilder, type WhereResult, type WhereSearchItem, type WhereSearchResult, type WindowArg, type WindowArgDeclaration, type WindowDeclaration, type WindowItem, type WithArgsOptions, type WithConfigs, type WithDataItem, type WithDataItems, type WithItem, WithMethods, type WithOptions, type WithQueryBuilder, type WithRecursiveOptions, type WithResult, type WithSqlResult, type WrapQueryArg, XMLColumn, _afterCommitError, _clone, _getSelectableColumn, _initQueryBuilder, _queryAfterSaveCommit, _queryAll, _queryAs, _queryChangeCounter, _queryCreate, _queryCreateFrom, _queryCreateMany, _queryCreateManyFrom, _queryCreateManyRaw, _queryCreateRaw, _queryDefaults, _queryDelete, _queryExec, _queryFindBy, _queryFindByOptional, _queryGet, _queryGetOptional, _queryHookAfterCreate, _queryHookAfterCreateCommit, _queryHookAfterDelete, _queryHookAfterDeleteCommit, _queryHookAfterQuery, _queryHookAfterSave, _queryHookAfterUpdate, _queryHookAfterUpdateCommit, _queryHookBeforeCreate, _queryHookBeforeDelete, _queryHookBeforeQuery, _queryHookBeforeSave, _queryHookBeforeUpdate, _queryInsert, _queryInsertFrom, _queryInsertMany, _queryInsertManyFrom, _queryInsertManyRaw, _queryInsertRaw, _queryJoinOn, _queryJoinOnJsonPathEquals, _queryJoinOrOn, _queryOr, _queryOrNot, _queryResolveAlias, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUnion, _queryUpdate, _queryUpdateOrThrow, _queryUpdateRaw, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, addColumnParserToQuery, addParserForRawExpression, addParserForSelectItem, addQueryOn, anyShape, applyComputedColumns, checkIfASimpleQuery, cloneQuery, cloneQueryBaseUnscoped, columnCheckToCode, columnCode, columnExcludesToCode, columnForeignKeysToCode, columnIndexesToCode, columnsShapeToCode, commitSql, constraintInnerToCode, constraintToCode, copyTableData, countSelect, createDb, defaultSchemaConfig, escapeForLog, escapeForMigration, escapeString, excludeInnerToCode, excludeToCode, extendQuery, filterResult, foreignKeyArgumentToCode, getClonedQueryData, getColumnInfo, getColumnTypes, getFullColumnTable, getPrimaryKeys, getQueryAs, getShapeFromSelect, getSqlText, handleResult, identityToCode, indexInnerToCode, indexToCode, instantiateColumn, isDefaultTimeStamp, isQueryReturnsAll, isSelectingCount, joinSubQuery, logParamToLogObject, makeColumnTypes, makeColumnsByType, makeFnExpression, makeRegexToFindInSql, makeSQL, parseRecord, parseTableData, parseTableDataInput, postgisTypmodToSql, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processSelectArg, pushLimitSQL, pushQueryArray, pushQueryOn, pushQueryOnForOuter, pushQueryOrOn, pushQueryValue, pushTableDataCode, queryFrom, queryFromSql, queryJson, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, raw, referencesArgsToCode, resolveSubQueryCallback, rollbackSql, saveSearchAlias, setColumnDefaultParse, setColumnEncode, setColumnParse, setColumnParseNull, setParserForSelectedString, setQueryObjectValue, setQueryOperators, simplifyColumnDefault, sqlFn, sqlQueryArgsToExpression, tableDataMethods, templateLiteralToSQL, testTransaction, throwIfJoinLateral, throwIfNoWhere, toSQL, toSQLCacheKey };
|
|
8734
|
+
export { Adapter, type AdapterConfig, type AdapterOptions, type AddQueryDefaults, AfterCommitError, type AfterCommitErrorFulfilledResult, type AfterCommitErrorRejectedResult, type AfterCommitErrorResult, type AfterHook, type AggregateArgTypes, AggregateMethods, type AggregateOptions, type AliasOrTable, ArrayColumn, type ArrayColumnValue, type ArrayData, AsMethods, type AsQueryArg, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, type BooleanQueryColumn, BoxColumn, ByteaColumn, type ChangeCountArg, CidrColumn, CircleColumn, CitextColumn, Clear, type ClearStatement, type ColumnData, type ColumnDataGenerated, type ColumnFromDbParams, type ColumnInfoQueryData, ColumnRefExpression, ColumnType, type ColumnsByType, type ColumnsShape, type ColumnsShapeToNullableObject, type ColumnsShapeToObject, type ColumnsShapeToObjectArray, type ColumnsShapeToPluck, type CommonQueryData, ComputedColumn, type ComputedColumns, type ComputedColumnsFromOptions, type ComputedMethods, type ComputedOptionsFactory, type CopyOptions, type CopyQueryData, Create, type CreateBelongsToData, type CreateColumn, type CreateCtx, type CreateData, type CreateKind, type CreateMethodsNames, type CreateRelationsData, type CreateRelationsDataOmittingFKeys, type CreateResult, type CreateSelf, CustomTypeColumn, DateBaseColumn, DateColumn, type DateColumnInput, DateTimeBaseClass, DateTimeTzBaseClass, Db, type DbDomainArg, type DbDomainArgRecord, type DbExtension, type DbOptions, type DbResult, type DbSharedOptions, type DbTableConstructor, type DbTableOptionScopes, type DbTableOptions, DecimalColumn, type DecimalColumnData, type DefaultColumnTypes, type DefaultSchemaConfig, Delete, type DeleteArgs, type DeleteMethodsNames, type DeleteQueryData, type DeleteResult, DomainColumn, DoublePrecisionColumn, DynamicRawSQL, EnumColumn, ExpressionMethods, type ExpressionOutput, FnExpression, type FnExpressionArgs, type FnExpressionArgsPairs, type FnExpressionArgsValue, For, type FromArg, FromMethods, type FromQuerySelf, type FromResult, type GeneratorIgnore, type GetArg, type GetColumnInfo, type GetResult, type GetResultOptional, type GetStringArg, type GroupArgs, type HandleResult, Having, type HavingItem, type HookAction, type HookSelectArg, type IdentityColumn, InetColumn, type InsertQueryData, IntegerBaseColumn, IntegerColumn, IntervalColumn, type IsolationLevel, JSONColumn, JSONTextColumn, Join, type JoinArgToQuery, type JoinArgs, type JoinCallback, type JoinFirstArg, type JoinItem, type JoinItemArgs, type JoinLateralItem, type JoinLateralResult, type JoinQueryBuilder, type JoinQueryMethod, type JoinResult, type JoinedParsers, type JoinedShapes, JsonMethods, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, type MapTableScopesOption, type MergeQuery, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, type NoPrimaryKeyOption, type NonUniqDataItem, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, type NumberColumnData, type NumericColumns, type OnConflictMerge, OnConflictQueryBuilder, type OnConflictSet, type OnConflictTarget, OnMethods, type Operator, Operators, type OperatorsAny, type OperatorsArray, type OperatorsBoolean, type OperatorsDate, type OperatorsJson, type OperatorsNumber, type OperatorsText, type OperatorsTime, type OrCreateArg, OrExpression, OrchidOrmError, OrchidOrmInternalError, type OrderArg, type OrderArgSelf, type OrderArgs, type OrderItem, type OrderTsQueryConfig, type Over, PathColumn, type PickColumnData, type PickQueryBaseQuery, type PickQueryColumnTypes, type PickQueryDataShapeAndJoinedShapes, type PickQueryInternal, type PickQueryMetaRelations, type PickQueryMetaRelationsResult, type PickQueryMetaResultRelations, type PickQueryMetaResultRelationsWindows, type PickQueryMetaResultRelationsWindowsColumnTypes, type PickQueryMetaResultRelationsWithDataReturnType, type PickQueryMetaResultRelationsWithDataReturnTypeShape, type PickQueryMetaResultReturnTypeWithDataWindows, type PickQueryMetaResultReturnTypeWithDataWindowsTable, type PickQueryMetaShapeRelationsWithData, type PickQueryMetaTable, type PickQueryMetaTableShape, type PickQueryMetaTableShapeReturnTypeWithData, type PickQueryMetaWithData, type PickQueryMetaWithDataColumnTypes, type PickQueryQ, type PickQueryQAndBaseQuery, type PickQueryQAndInternal, type PickQueryRelations, type PickQueryRelationsWithData, type PickQueryResultColumnTypes, type PickQueryShapeResultSinglePrimaryKey, type PickQueryShapeSinglePrimaryKey, type PickQuerySinglePrimaryKey, type PickQueryWindows, type PickQueryWithData, type PickQueryWithDataColumnTypes, PointColumn, PolygonColumn, PostgisGeographyPointColumn, type PostgisPoint, type Query, type QueryAfterHook, type QueryArraysResult, type QueryBatchResult, type QueryBeforeHook, type QueryComputedArg, type QueryData, type QueryDataFromItem, type QueryDataJoinTo, type QueryDefaultReturnData, QueryError, type QueryErrorName, QueryGet, type QueryGetSelf, type QueryHelperResult, QueryHooks, type QueryIfResultThen, type QueryInternal, QueryLog, type QueryMetaHasSelect, type QueryMetaHasWhere, QueryMethods, type QueryOrExpression, type QueryOrExpressionBooleanOrNullResult, type QueryResult, type QueryScopeData, type QueryScopes, type QuerySourceItem, QueryUpsertOrCreate, RawSQL, RealColumn, type RecordOfColumnsShapeBase, RefExpression, type RelationConfigBase, type RelationConfigDataForCreate, type RelationJoinQuery, type RelationQueryBase, type RelationsBase, type RuntimeComputedQueryColumn, type SearchArg, SearchMethods, type SearchWeight, type SearchWeightRecord, Select, type SelectArg, type SelectArgs, type SelectAs, type SelectAsValue, type SelectItem, type SelectQueryData, type SelectSubQueryResult, type SelectableFromShape, type SelectableOfType, type SelectableOrExpression, type SelectableOrExpressionOfType, type SelectableOrExpressions, SerialColumn, type SerialColumnData, type SetQueryKind, type SetQueryKindResult, type SetQueryReturnsAll, type SetQueryReturnsAllKind, type SetQueryReturnsAllKindResult, type SetQueryReturnsColumnInfo, type SetQueryReturnsColumnKind, type SetQueryReturnsColumnKindResult, type SetQueryReturnsColumnOptional, type SetQueryReturnsColumnOrThrow, type SetQueryReturnsOne, type SetQueryReturnsOneKind, type SetQueryReturnsOneKindResult, type SetQueryReturnsOneOptional, type SetQueryReturnsPluck, type SetQueryReturnsPluckColumn, type SetQueryReturnsPluckColumnKind, type SetQueryReturnsPluckColumnKindResult, type SetQueryReturnsRowCount, type SetQueryReturnsRowCountMany, type SetQueryReturnsRows, type SetQueryReturnsValueOptional, type SetQueryReturnsValueOrThrow, type SetQueryReturnsVoid, type SetQueryReturnsVoidKind, type SetQueryTableAlias, type ShapeColumnPrimaryKeys, type ShapeUniqueColumns, type SimpleJoinItem, type SimpleJoinItemNonSubQueryArgs, SmallIntColumn, SmallSerialColumn, type SortDir, type SqlFn, SqlMethod, StringColumn$1 as StringColumn, TableData, type TableDataFn, type TableDataInput, type TableDataItem, type TableDataItemsUniqueColumnTuples, type TableDataItemsUniqueColumns, type TableDataItemsUniqueConstraints, type TableDataMethods, TextBaseColumn, TextColumn, type TextColumnData, Then, TimeColumn, TimestampColumn, TimestampTZColumn, type ToSQLCtx, type ToSQLOptions, type ToSQLQuery, Transaction, TransactionAdapter, type TransactionOptions, TransformMethods, type TruncateQueryData, TsQueryColumn, TsVectorColumn, type TypeParsers, UUIDColumn, UnhandledTypeError, Union, type UnionArgs, type UnionItem, type UnionKind, type UnionSet, type UniqueConstraints, type UniqueQueryTypeOrExpression, type UniqueTableDataItem, UnknownColumn, Update, type UpdateArg, type UpdateCtx, type UpdateCtxCollect, type UpdateData, type UpdateQueryData, type UpdateQueryDataItem, type UpdateQueryDataObject, type UpdateSelf, type UpdatedAtDataInjector, type UpsertResult, type UpsertThis, VarCharColumn, VirtualColumn, Where, type WhereArg, type WhereArgs, type WhereInArg, type WhereInColumn, type WhereInItem, type WhereInValues, type WhereItem, type WhereJsonPathEqualsItem, type WhereNotArgs, type WhereOnItem, type WhereOnJoinItem, type WhereQueryBuilder, type WhereResult, type WhereSearchItem, type WhereSearchResult, type WindowArg, type WindowArgDeclaration, type WindowDeclaration, type WindowItem, type WithArgsOptions, type WithConfigs, type WithDataItem, type WithDataItems, type WithItem, WithMethods, type WithOptions, type WithQueryBuilder, type WithRecursiveOptions, type WithResult, type WithSqlResult, type WrapQueryArg, XMLColumn, _afterCommitError, _clone, _getSelectableColumn, _initQueryBuilder, _queryAfterSaveCommit, _queryAll, _queryAs, _queryChangeCounter, _queryCreate, _queryCreateFrom, _queryCreateMany, _queryCreateManyFrom, _queryCreateManyRaw, _queryCreateRaw, _queryDefaults, _queryDelete, _queryExec, _queryFindBy, _queryFindByOptional, _queryGet, _queryGetOptional, _queryHookAfterCreate, _queryHookAfterCreateCommit, _queryHookAfterDelete, _queryHookAfterDeleteCommit, _queryHookAfterQuery, _queryHookAfterSave, _queryHookAfterUpdate, _queryHookAfterUpdateCommit, _queryHookBeforeCreate, _queryHookBeforeDelete, _queryHookBeforeQuery, _queryHookBeforeSave, _queryHookBeforeUpdate, _queryInsert, _queryInsertFrom, _queryInsertMany, _queryInsertManyFrom, _queryInsertManyRaw, _queryInsertRaw, _queryJoinOn, _queryJoinOnJsonPathEquals, _queryJoinOrOn, _queryOr, _queryOrNot, _queryResolveAlias, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUnion, _queryUpdate, _queryUpdateOrThrow, _queryUpdateRaw, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, addColumnParserToQuery, addParserForRawExpression, addParserForSelectItem, addQueryOn, anyShape, applyComputedColumns, checkIfASimpleQuery, cloneQuery, cloneQueryBaseUnscoped, columnCheckToCode, columnCode, columnExcludesToCode, columnForeignKeysToCode, columnIndexesToCode, columnsShapeToCode, commitSql, constraintInnerToCode, constraintToCode, copyTableData, countSelect, createDb, defaultSchemaConfig, escapeForLog, escapeForMigration, escapeString, excludeInnerToCode, excludeToCode, extendQuery, filterResult, foreignKeyArgumentToCode, getClonedQueryData, getColumnInfo, getColumnTypes, getFullColumnTable, getPrimaryKeys, getQueryAs, getShapeFromSelect, getSqlText, handleResult, identityToCode, indexInnerToCode, indexToCode, instantiateColumn, isDefaultTimeStamp, isQueryReturnsAll, isSelectingCount, joinSubQuery, logParamToLogObject, makeColumnTypes, makeColumnsByType, makeFnExpression, makeRegexToFindInSql, makeSQL, parseRecord, parseTableData, parseTableDataInput, postgisTypmodToSql, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processSelectArg, pushLimitSQL, pushQueryArray, pushQueryOn, pushQueryOnForOuter, pushQueryOrOn, pushQueryValue, pushTableDataCode, queryFrom, queryFromSql, queryJson, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, raw, referencesArgsToCode, resolveSubQueryCallback, rollbackSql, saveSearchAlias, setColumnDefaultParse, setColumnEncode, setColumnParse, setColumnParseNull, setParserForSelectedString, setQueryObjectValue, setQueryOperators, simplifyColumnDefault, sqlFn, sqlQueryArgsToExpression, tableDataMethods, templateLiteralToSQL, testTransaction, throwIfJoinLateral, throwIfNoWhere, toSQL, toSQLCacheKey };
|