pqb 0.68.1 → 0.69.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/dist/index.d.ts +19 -12
- package/dist/index.js +470 -470
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +470 -470
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +35 -28
- package/dist/node-postgres.js +9 -15
- package/dist/node-postgres.js.map +1 -1
- package/dist/node-postgres.mjs +9 -15
- package/dist/node-postgres.mjs.map +1 -1
- package/dist/postgres-js.js +64 -0
- package/dist/postgres-js.js.map +1 -1
- package/dist/postgres-js.mjs +64 -0
- package/dist/postgres-js.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1776,6 +1776,8 @@ declare class BooleanColumn<Schema extends ColumnSchemaConfig> extends Column {
|
|
|
1776
1776
|
querySchema: ReturnType<Schema['boolean']>;
|
|
1777
1777
|
private static _instance;
|
|
1778
1778
|
static get instance(): BooleanColumn<DefaultSchemaConfig>;
|
|
1779
|
+
private static _instanceSkipValueToArray;
|
|
1780
|
+
static get instanceSkipValueToArray(): BooleanColumn<DefaultSchemaConfig>;
|
|
1779
1781
|
constructor(schema: Schema);
|
|
1780
1782
|
toCode(ctx: ColumnToCodeCtx, key: string): Code;
|
|
1781
1783
|
}
|
|
@@ -1959,21 +1961,23 @@ interface JoinItem {
|
|
|
1959
1961
|
type: string;
|
|
1960
1962
|
args: JoinItemArgs;
|
|
1961
1963
|
}
|
|
1962
|
-
type getValueKey = typeof getValueKey;
|
|
1963
|
-
declare const getValueKey: unique symbol;
|
|
1964
1964
|
interface PickQueryDataParsers {
|
|
1965
1965
|
defaultParsers?: ColumnsParsers;
|
|
1966
1966
|
parsers?: ColumnsParsers;
|
|
1967
1967
|
batchParsers?: BatchParsers;
|
|
1968
1968
|
}
|
|
1969
1969
|
type ColumnParser = FnUnknownToUnknown;
|
|
1970
|
+
interface BatchParserPathEntry {
|
|
1971
|
+
key: string;
|
|
1972
|
+
returnType: QueryReturnType;
|
|
1973
|
+
}
|
|
1970
1974
|
interface BatchParser {
|
|
1971
|
-
path:
|
|
1972
|
-
fn: (path:
|
|
1975
|
+
path: BatchParserPathEntry[];
|
|
1976
|
+
fn: (path: BatchParserPathEntry[], queryResult: {
|
|
1973
1977
|
rows: unknown[];
|
|
1974
1978
|
}) => MaybePromise<void>;
|
|
1975
1979
|
}
|
|
1976
|
-
type ColumnsParsers = { [K in string
|
|
1980
|
+
type ColumnsParsers = { [K in string]?: ColumnParser };
|
|
1977
1981
|
type BatchParsers = BatchParser[];
|
|
1978
1982
|
interface QueryThen<T> {
|
|
1979
1983
|
<TResult1 = T, TResult2 = never>(onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
|
@@ -6071,6 +6075,7 @@ interface ExpressionData extends HasBeforeAndBeforeSet {
|
|
|
6071
6075
|
expr?: Expression;
|
|
6072
6076
|
before?: QueryBeforeHook[];
|
|
6073
6077
|
dynamicBefore?: boolean;
|
|
6078
|
+
getColumn?: Column;
|
|
6074
6079
|
}
|
|
6075
6080
|
declare abstract class Expression<T extends Column.Pick.QueryColumn = Column.Pick.QueryColumn> {
|
|
6076
6081
|
abstract result: {
|
|
@@ -6615,18 +6620,18 @@ declare namespace Column {
|
|
|
6615
6620
|
unique: Name;
|
|
6616
6621
|
};
|
|
6617
6622
|
};
|
|
6618
|
-
export type Nullable<T extends Column.Pick.ForNullable, InputSchema, OutputSchema, QuerySchema> = { [K in keyof T]: K extends '__type' ? T['__type'] | null : K extends '__inputType' ? T['__inputType'] | null : K extends 'inputSchema' ? InputSchema : K extends '__outputType' ? T['__outputType'] | (unknown extends T['__nullType'] ? null : T['__nullType']) : K extends 'outputSchema' ? OutputSchema : K extends '__queryType' ? T['__queryType'] | null : K extends 'querySchema' ? QuerySchema : K extends 'data' ? T['data'] & DataNullable : K extends 'operators' ? { [K in keyof T['operators']]: K extends 'equals' | 'not' | 'isDistinctFrom' | 'isNotDistinctFrom' ? Operator<T | null> : T['operators'][K] } : T[K] };
|
|
6623
|
+
export type Nullable<T extends Column.Pick.ForNullable, InputSchema, OutputSchema, QuerySchema> = { [K in keyof T]: K extends '__type' ? T['__type'] | null : K extends '__inputType' ? T['__inputType'] | null : K extends 'inputSchema' ? InputSchema : K extends '__outputType' ? T['__outputType'] | (unknown extends T['__nullType'] ? null : T['__nullType']) : K extends 'outputSchema' ? OutputSchema : K extends '__queryType' ? T['__queryType'] | null : K extends 'querySchema' ? QuerySchema : K extends 'data' ? T['data'] & DataNullable : K extends 'operators' ? { [K in keyof T['operators']]: K extends 'equals' | 'not' | 'isDistinctFrom' | 'isNotDistinctFrom' ? Operator<T['__queryType'] | null, T> : T['operators'][K] } : T[K] };
|
|
6619
6624
|
export type QueryColumnToNullable<C> = { [K in keyof C]: K extends '__outputType' | '__queryType' ? C[K] | null : C[K] };
|
|
6620
6625
|
export type QueryColumnToOptional<C> = { [K in keyof C]: K extends '__outputType' ? C[K] | undefined : C[K] };
|
|
6621
6626
|
interface DataNullable {
|
|
6622
6627
|
isNullable: true;
|
|
6623
6628
|
optional: true;
|
|
6624
6629
|
}
|
|
6625
|
-
export interface OperatorsNullable<
|
|
6626
|
-
equals: Operator<
|
|
6627
|
-
not: Operator<
|
|
6628
|
-
isDistinctFrom: Operator<
|
|
6629
|
-
isNotDistinctFrom: Operator<
|
|
6630
|
+
export interface OperatorsNullable<Column extends Column.Pick.QueryColumn> {
|
|
6631
|
+
equals: Operator<Column['__queryType'] | null, Column>;
|
|
6632
|
+
not: Operator<Column['__queryType'] | null, Column>;
|
|
6633
|
+
isDistinctFrom: Operator<Column['__queryType'] | null, Column>;
|
|
6634
|
+
isNotDistinctFrom: Operator<Column['__queryType'] | null, Column>;
|
|
6630
6635
|
}
|
|
6631
6636
|
export type Encode<T, InputSchema, Input> = { [K in keyof T]: K extends '__inputType' ? Input : K extends 'inputSchema' ? InputSchema : T[K] };
|
|
6632
6637
|
export type Parse<T extends Pick.ForParse, OutputSchema, Output> = { [K in keyof T]: K extends '__outputType' ? null extends T['__type'] ? (Output extends null ? never : Output) | (unknown extends T['__nullType'] ? null : T['__nullType']) : Output : K extends 'outputSchema' ? null extends T['__type'] ? OutputSchema | T['nullSchema'] : OutputSchema : T[K] };
|
|
@@ -6819,6 +6824,8 @@ declare namespace Column {
|
|
|
6819
6824
|
identity?: TableData.Identity;
|
|
6820
6825
|
generated?: Data.Generated;
|
|
6821
6826
|
readonly?: boolean;
|
|
6827
|
+
valueToArray?: boolean;
|
|
6828
|
+
skipValueToArray?: boolean;
|
|
6822
6829
|
}
|
|
6823
6830
|
export namespace Data {
|
|
6824
6831
|
interface Check {
|
|
@@ -8967,7 +8974,7 @@ type SelectAllColumn = string | SelectAllColumnExpression;
|
|
|
8967
8974
|
interface QueryData extends QueryDataAliases, PickQueryDataParsers, HasHookSelect, MutativeQueriesSelectRelationsQueryData {
|
|
8968
8975
|
type: QueryType;
|
|
8969
8976
|
adapter: Adapter;
|
|
8970
|
-
|
|
8977
|
+
selectShape: ColumnsShape;
|
|
8971
8978
|
handleResult: HandleResult;
|
|
8972
8979
|
catch?: boolean;
|
|
8973
8980
|
returnType: QueryReturnType;
|