pqb 0.67.3 → 0.67.4

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.
@@ -1,4 +1,4 @@
1
- import { Adapter, AdapterClass, AdapterConfigBase, AdapterParams, AdapterSchemaConfigOptions, AfterCommitStandaloneHook, AfterHook, ArrayColumn, ArrayColumnValue, ArrayData, AsyncState, BaseNumberData, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, CidrColumn, CircleColumn, CitextColumn, Code, Codes, Column, ColumnFromDbParams, ColumnSchemaConfig, ColumnSchemaGetterColumns, ColumnSchemaGetterTableClass, ColumnToCodeCtx, ColumnTypeSchemaArg, ColumnsByType, ColumnsShape, ComputedColumnsFromOptions, ComputedOptionsConfig, ComputedOptionsFactory, CreateCtx, CreateData, CreateManyMethodsNames, CreateMethodsNames, CreateSelf, CustomTypeColumn, DateColumn, DateColumnData, DbDomainArg, DbExtension, DbOptions, DbResult, DbSharedOptions, DbSqlMethod, DbStructureDomainsMap, DbTableOptionScopes, DbTableOptions, DecimalColumn, DecimalColumnData, DefaultColumnTypes, DefaultPrivileges, DefaultSchemaConfig, DeleteMethodsNames, DomainColumn, DoublePrecisionColumn, DriverAdapter, DynamicRawSQL, EmptyObject, EmptyTuple, EnumColumn, Expression, FromArg, FromResult, GeneratorIgnore, HookSelectValue, InetColumn, IntegerColumn, IntervalColumn, IsQuery, IsolationLevel, JSONColumn, JSONTextColumn, JoinQueryMethod, JoinedShapes, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, MapTableScopesOption, MaybeArray, MaybePromise, MergeQuery, MoneyColumn, NoPrimaryKeyOption, NonUniqDataItem, NumberColumnData, Operators, OperatorsArray, OperatorsJson, OperatorsOrdinalText, Ord, PathColumn, PickQueryInputType, PickQueryInternal, PickQueryQ, PickQueryRelations, PickQuerySelectableRelations, PickQueryShape, PointColumn, PolygonColumn, PostgisGeographyPointColumn, QueryAfterHook, QueryBeforeActionHook, QueryBeforeHook, QueryData, QueryHasWhere, QueryHookUtils, QueryHooks, QueryInternal, QueryLogObject, QueryLogOptions, QueryLogger, QueryManyTake, QueryManyTakeOptional, QueryOrExpression, QueryResult, QueryResultRow, QueryReturnType, QuerySchema, QueryScopes, RawSql, RawSqlBase, RealColumn, RecordKeyTrue, RecordOptionalString, RecordString, RecordStringOrNumber, RecordUnknown, RelationConfigBase, RelationJoinQuery, RelationsBase, Rls, RlsPolicy, SchemaConfigFnWithOptions, SearchWeight, SelectableFromShape, SerialColumn, SerialColumnData, ShallowSimplify, ShapeColumnPrimaryKeys, ShapeUniqueColumns, SingleSql, SingleSqlItem, SmallIntColumn, SmallSerialColumn, Sql, SqlFn, SqlSessionState, StorageOptions, StringColumn, StringData, TableData, TableDataFn, TableDataInput, TableDataItem, TableDataItemsUniqueColumnTuples, TableDataItemsUniqueColumns, TableDataItemsUniqueConstraints, TableDataMethods, TemplateLiteralArgs, TextColumn, TimeColumn, TimestampColumn, TimestampTZColumn, Timestamps, TransactionAdapter, TransactionAdapterClass, TransactionOptions, TsQueryColumn, TsVectorColumn, UUIDColumn, UniqueConstraints, UniqueTableDataItem, UnknownColumn, UpdateData, UpsertData, UpsertThis, VarCharColumn, VirtualColumn, WhereArg, XMLColumn, _appendQuery, _appendQueryOnUpsertCreate, _clone, _createDbSqlMethod, _hookSelectColumns, _initQueryBuilder, _orCreate, _prependWith, _queryCreate, _queryCreateMany, _queryCreateManyFrom, _queryDefaults, _queryDelete, _queryFindBy, _queryFindByOptional, _queryHookAfterCreate, _queryHookAfterUpdate, _queryInsert, _queryInsertMany, _queryJoinOn, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUpdate, _queryUpdateOrThrow, _queryUpsert, _queryWhere, _queryWhereExists, _queryWhereIn, addCode, addTopCte, addTopCteSql, applyMixins, assignDbDataToColumn, backtickQuote, cloneQueryBaseUnscoped, codeToString, colors, columnsShapeToCode, constraintInnerToCode, consumeColumnName, deepCompare, defaultSchemaConfig, emptyArray, emptyObject, escapeForMigration, escapeString, excludeInnerToCode, exhaustive, getCallerFilePath, getClonedQueryData, getColumnBaseType, getColumnTypes, getDateAsDateFn, getDateAsNumberFn, getDriverErrorCode, getFreeAlias, getFreeSetAlias, getImportPath, getPrimaryKeys, getQueryAs, getQuerySchema, getShapeFromSelect, getSqlText, getStackTrace, getSupportedDefaultPrivileges, indexInnerToCode, internalSchemaConfig, isExpression, isQueryReturnsAll, isRawSQL, logColors, logParamToLogObject, makeColumnNullable, makeColumnTypes, makeColumnsByType, makeConnectRetryConfig, noop, objectHasValues, omit, parseTableData, parseTableDataInput, pathToLog, pick, pluralize, prepareSubQueryForSql, primaryKeyInnerToCode, pushQueryOnForOuter, pushQueryValueImmutable, pushTableDataCode, quoteIdentifier, quoteObjectKey, quoteTableWithSchema, raw, rawSqlToCode, referencesArgsToCode, returnArg, setColumnData, setColumnEncode, setColumnParse, setColumnParseNull, setCurrentColumnName, setDataValue, setDefaultLanguage, setFreeAlias, setQueryObjectValueImmutable, singleQuote, tableDataMethods, toArray, toCamelCase, toPascalCase, toSnakeCase, wrapAdapterFnWithConnectRetry } from "./index.d.ts";
1
+ import { Adapter, AdapterClass, AdapterConfigBase, AdapterParams, AdapterSchemaConfigOptions, AfterCommitStandaloneHook, AfterHook, ArrayColumn, ArrayColumnValue, ArrayData, AsyncState, BaseNumberData, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, CidrColumn, CircleColumn, CitextColumn, Code, Codes, Column, ColumnFromDbParams, ColumnSchemaConfig, ColumnSchemaGetterColumns, ColumnSchemaGetterTableClass, ColumnToCodeCtx, ColumnTypeSchemaArg, ColumnsByType, ColumnsShape, ComputedColumnsFromOptions, ComputedOptionsConfig, ComputedOptionsFactory, CreateCtx, CreateData, CreateManyMethodsNames, CreateMethodsNames, CreateSelf, CustomTypeColumn, DateColumn, DateColumnData, DbDomainArg, DbExtension, DbOptions, DbResult, DbSharedOptions, DbSqlMethod, DbStructureDomainsMap, DbTableOptionScopes, DbTableOptions, DecimalColumn, DecimalColumnData, DefaultColumnTypes, DefaultPrivileges, DefaultSchemaConfig, DeleteMethodsNames, DomainColumn, DoublePrecisionColumn, DriverAdapter, DynamicRawSQL, EmptyObject, EmptyTuple, EnumColumn, Expression, ExpressionData, FromArg, FromResult, GeneratorIgnore, HookSelectValue, InetColumn, IntegerColumn, IntervalColumn, IsQuery, IsolationLevel, JSONColumn, JSONTextColumn, JoinQueryMethod, JoinedShapes, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, MapTableScopesOption, MaybeArray, MaybePromise, MergeQuery, MoneyColumn, NoPrimaryKeyOption, NonUniqDataItem, NumberColumnData, Operators, OperatorsArray, OperatorsJson, OperatorsOrdinalText, Ord, PathColumn, PickQueryInputType, PickQueryInternal, PickQueryQ, PickQueryRelations, PickQuerySelectableRelations, PickQueryShape, PointColumn, PolygonColumn, PostgisGeographyPointColumn, QueryAfterHook, QueryBeforeActionHook, QueryBeforeHook, QueryData, QueryHasWhere, QueryHookUtils, QueryHooks, QueryInternal, QueryLogObject, QueryLogOptions, QueryLogger, QueryManyTake, QueryManyTakeOptional, QueryOrExpression, QueryResult, QueryResultRow, QueryReturnType, QuerySchema, QueryScopes, RawSql, RawSqlBase, RealColumn, RecordKeyTrue, RecordOptionalString, RecordString, RecordStringOrNumber, RecordUnknown, RelationConfigBase, RelationJoinQuery, RelationsBase, Rls, RlsPolicy, SchemaConfigFnWithOptions, SearchWeight, SelectableFromShape, SerialColumn, SerialColumnData, ShallowSimplify, ShapeColumnPrimaryKeys, ShapeUniqueColumns, SingleSql, SingleSqlItem, SmallIntColumn, SmallSerialColumn, Sql, SqlFn, SqlSessionState, StorageOptions, StringColumn, StringData, TableData, TableDataFn, TableDataInput, TableDataItem, TableDataItemsUniqueColumnTuples, TableDataItemsUniqueColumns, TableDataItemsUniqueConstraints, TableDataMethods, TemplateLiteralArgs, TextColumn, TimeColumn, TimestampColumn, TimestampTZColumn, Timestamps, ToSQLCtx, ToSqlValues, TransactionAdapter, TransactionAdapterClass, TransactionOptions, TsQueryColumn, TsVectorColumn, UUIDColumn, UniqueConstraints, UniqueTableDataItem, UnknownColumn, UpdateData, UpsertData, UpsertThis, VarCharColumn, VirtualColumn, WhereArg, XMLColumn, _appendQuery, _appendQueryOnUpsertCreate, _clone, _createDbSqlMethod, _hookSelectColumns, _initQueryBuilder, _orCreate, _prependWith, _queryCreate, _queryCreateMany, _queryCreateManyFrom, _queryDefaults, _queryDelete, _queryFindBy, _queryFindByOptional, _queryHookAfterCreate, _queryHookAfterUpdate, _queryInsert, _queryInsertMany, _queryJoinOn, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUpdate, _queryUpdateOrThrow, _queryUpsert, _queryWhere, _queryWhereExists, _queryWhereIn, addCode, addTopCte, addTopCteSql, applyMixins, assignDbDataToColumn, backtickQuote, cloneQueryBaseUnscoped, codeToString, colors, columnsShapeToCode, constraintInnerToCode, consumeColumnName, deepCompare, defaultSchemaConfig, emptyArray, emptyObject, escapeForMigration, escapeString, excludeInnerToCode, exhaustive, getCallerFilePath, getClonedQueryData, getColumnBaseType, getColumnTypes, getDateAsDateFn, getDateAsNumberFn, getDriverErrorCode, getFreeAlias, getFreeSetAlias, getImportPath, getPrimaryKeys, getQueryAs, getQuerySchema, getShapeFromSelect, getSqlText, getStackTrace, getSupportedDefaultPrivileges, indexInnerToCode, internalSchemaConfig, isExpression, isQueryReturnsAll, isRawSQL, logColors, logParamToLogObject, makeColumnNullable, makeColumnTypes, makeColumnsByType, makeConnectRetryConfig, noop, objectHasValues, omit, parseTableData, parseTableDataInput, pathToLog, pick, pluralize, prepareSubQueryForSql, primaryKeyInnerToCode, pushQueryOnForOuter, pushQueryValueImmutable, pushTableDataCode, quoteIdentifier, quoteObjectKey, quoteTableWithSchema, raw, rawSqlToCode, referencesArgsToCode, returnArg, setColumnData, setColumnEncode, setColumnParse, setColumnParseNull, setCurrentColumnName, setDataValue, setDefaultLanguage, setFreeAlias, setQueryObjectValueImmutable, singleQuote, tableDataMethods, toArray, toCamelCase, toPascalCase, toSnakeCase, wrapAdapterFnWithConnectRetry } from "./index.d.ts";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  interface RelationJoinQuery$1 {
4
4
  (joiningQuery: IsQuery$1, baseQuery: IsQuery$1): IsQuery$1;
@@ -43,7 +43,7 @@ declare class SqlRefExpression extends Expression$1 {
43
43
  result: {
44
44
  value: Column$1.Pick.QueryColumn;
45
45
  };
46
- q: ExpressionData;
46
+ q: ExpressionData$1;
47
47
  constructor(name: string);
48
48
  makeSQL(): string;
49
49
  }
@@ -1769,12 +1769,12 @@ declare class RawSql$1<T extends Column$1.Pick.QueryColumn = Column$1.Pick.Query
1769
1769
  value: T;
1770
1770
  };
1771
1771
  columnTypes: ColumnTypes;
1772
- q: ExpressionData;
1772
+ q: ExpressionData$1;
1773
1773
  _sql: string | TemplateLiteralArgs$1;
1774
1774
  _values?: RawSQLValues;
1775
1775
  constructor(sql: string | TemplateLiteralArgs$1, values?: RawSQLValues, type?: T);
1776
1776
  values<Self extends RawSqlBase$1>(this: Self, values: RawSQLValues): Self;
1777
- makeSQL(ctx: ToSqlValues, quotedAs?: string): string;
1777
+ makeSQL(ctx: ToSqlValues$1, quotedAs?: string): string;
1778
1778
  }
1779
1779
  interface DynamicRawSQL$1<T extends Column$1.Pick.QueryColumn> extends Expression$1<T>, ExpressionTypeMethod {}
1780
1780
  declare class DynamicRawSQL$1<T extends Column$1.Pick.QueryColumn, ColumnTypes = DefaultColumnTypes$1<ColumnSchemaConfig$1>> extends Expression$1<T> {
@@ -1783,10 +1783,10 @@ declare class DynamicRawSQL$1<T extends Column$1.Pick.QueryColumn, ColumnTypes =
1783
1783
  result: {
1784
1784
  value: T;
1785
1785
  };
1786
- q: ExpressionData;
1786
+ q: ExpressionData$1;
1787
1787
  dynamicBefore: boolean;
1788
1788
  constructor(fn: DynamicSQLArg<T>);
1789
- makeSQL(ctx: ToSQLCtx, quotedAs?: string): string;
1789
+ makeSQL(ctx: ToSQLCtx$1, quotedAs?: string): string;
1790
1790
  }
1791
1791
  interface SqlFn$1 {
1792
1792
  <T, Args extends TemplateLiteralArgs$1 | [sql: string] | [values: RecordUnknown$1, sql?: string]>(this: T, ...args: Args): Args extends [RecordUnknown$1] ? (...sql: TemplateLiteralArgs$1) => RawSql$1<Column$1.Pick.QueryColumn, T> : RawSql$1<Column$1.Pick.QueryColumn, T>;
@@ -1818,7 +1818,7 @@ declare class UnsafeSqlExpression extends Expression$1 {
1818
1818
  result: {
1819
1819
  value: Column$1.Pick.QueryColumn;
1820
1820
  };
1821
- q: ExpressionData;
1821
+ q: ExpressionData$1;
1822
1822
  constructor(sql: string | number | boolean);
1823
1823
  makeSQL(): string;
1824
1824
  }
@@ -2655,28 +2655,28 @@ declare class ColumnRefExpression<T extends Column$1.Pick.QueryColumn> extends E
2655
2655
  result: {
2656
2656
  value: T;
2657
2657
  };
2658
- q: ExpressionData;
2658
+ q: ExpressionData$1;
2659
2659
  constructor(value: T, name: string);
2660
- makeSQL(ctx: ToSQLCtx, quotedAs?: string): string;
2660
+ makeSQL(ctx: ToSQLCtx$1, quotedAs?: string): string;
2661
2661
  }
2662
2662
  declare class RefExpression<T extends Column$1.Pick.QueryColumn> extends Expression$1<T> {
2663
2663
  ref: string;
2664
2664
  result: {
2665
2665
  value: T;
2666
2666
  };
2667
- q: ExpressionData;
2667
+ q: ExpressionData$1;
2668
2668
  table?: string;
2669
2669
  constructor(value: T, query: Query, ref: string);
2670
- makeSQL(ctx: ToSQLCtx): string;
2670
+ makeSQL(ctx: ToSQLCtx$1): string;
2671
2671
  }
2672
2672
  declare class ValExpression extends Expression$1 {
2673
2673
  value: unknown;
2674
2674
  result: {
2675
2675
  value: Column$1;
2676
2676
  };
2677
- q: ExpressionData;
2677
+ q: ExpressionData$1;
2678
2678
  constructor(value: unknown);
2679
- makeSQL(ctx: ToSqlValues): string;
2679
+ makeSQL(ctx: ToSqlValues$1): string;
2680
2680
  }
2681
2681
  type SortDir = 'ASC' | 'DESC' | 'ASC NULLS FIRST' | 'DESC NULLS LAST';
2682
2682
  type OrderItem = string | {
@@ -3744,9 +3744,9 @@ declare class OrExpression extends Expression$1<BooleanQueryColumn> {
3744
3744
  result: {
3745
3745
  value: BooleanQueryColumn;
3746
3746
  };
3747
- q: ExpressionData;
3747
+ q: ExpressionData$1;
3748
3748
  constructor(args: [OrExpressionArg, ...OrExpressionArg[]]);
3749
- makeSQL(ctx: ToSQLCtx, quotedAs?: string): string;
3749
+ makeSQL(ctx: ToSQLCtx$1, quotedAs?: string): string;
3750
3750
  }
3751
3751
  interface QueryReturnsFnAdd<T extends PickQueryColumTypes> extends PickQueryHasSelect {
3752
3752
  type<C extends Column$1.Pick.QueryColumn>(fn: (types: T['columnTypes']) => C): { [K in keyof T]: K extends 'result' ? {
@@ -4929,7 +4929,7 @@ type SelectableOrExpression<T extends PickQuerySelectable = PickQuerySelectable,
4929
4929
  type SelectableOrExpressions<T extends PickQuerySelectable = PickQuerySelectable, C extends Column$1.Pick.QueryColumn = Column$1.Pick.QueryColumn> = ('*' | keyof T['__selectable'] | Expression$1<C>)[];
4930
4930
  type ExpressionOutput<T extends PickQuerySelectable, Expr extends SelectableOrExpression<T>> = Expr extends keyof T['__selectable'] ? T['__selectable'][Expr]['column'] : Expr extends Expression$1 ? Expr['result']['value'] : never;
4931
4931
  type ExpressionChain = (OperatorToSQL | unknown)[];
4932
- interface ExpressionData extends HasBeforeAndBeforeSet {
4932
+ interface ExpressionData$1 extends HasBeforeAndBeforeSet {
4933
4933
  chain?: ExpressionChain;
4934
4934
  expr?: Expression$1;
4935
4935
  before?: QueryBeforeHook$1[];
@@ -4939,12 +4939,12 @@ declare abstract class Expression$1<T extends Column$1.Pick.QueryColumn = Column
4939
4939
  abstract result: {
4940
4940
  value: T;
4941
4941
  };
4942
- abstract q: ExpressionData;
4942
+ abstract q: ExpressionData$1;
4943
4943
  meta: {
4944
4944
  kind: 'select';
4945
4945
  };
4946
- toSQL(ctx: ToSqlValues, quotedAs?: string): string;
4947
- abstract makeSQL(ctx: ToSqlValues, quotedAs?: string): string;
4946
+ toSQL(ctx: ToSqlValues$1, quotedAs?: string): string;
4947
+ abstract makeSQL(ctx: ToSqlValues$1, quotedAs?: string): string;
4948
4948
  }
4949
4949
  type TemplateLiteralArgs$1 = [strings: TemplateStringsArray, ...values: unknown[]];
4950
4950
  interface DynamicSQLArg<T extends Column$1.Pick.QueryColumn> {
@@ -6878,6 +6878,14 @@ type MergeQueryResult<T extends PickQueryHasSelectResult, Q extends PickQueryHas
6878
6878
  declare class MergeQueryMethods {
6879
6879
  merge<T extends MergeQueryArg, Q extends MergeQueryArg>(this: T, q: Q): MergeQuery$1<T, Q>;
6880
6880
  }
6881
+ interface ColumnDataSelectSqlProp {
6882
+ selectSql?: Expression$1;
6883
+ selectSqlFn?: SelectSqlCallback;
6884
+ }
6885
+ interface SelectSqlCallback {
6886
+ (column: ColumnRefExpression<Column$1.Pick.QueryColumn>): Expression$1;
6887
+ }
6888
+ type SelectSqlColumn<T extends Column$1.Pick.DataAndDataType, Expr extends Expression$1> = unknown extends Expr['result']['value']['outputType'] ? T : { [K in keyof T]: K extends 'outputType' ? Expr['result']['value']['outputType'] : T[K] };
6881
6889
  type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
6882
6890
  type MaybeArray$1<T> = T | T[];
6883
6891
  type MaybePromise$1<T> = T | Promise<T>;
@@ -7530,6 +7538,13 @@ declare abstract class Column$1<Schema extends ColumnTypeSchemaArg$1 = ColumnTyp
7530
7538
  * ```
7531
7539
  */
7532
7540
  select<T extends Column.Pick.Data, Value extends boolean>(this: T, value: Value): Column.Modifiers.DefaultSelect<T, Value>;
7541
+ /**
7542
+ * Set SQL to use when selecting this column.
7543
+ *
7544
+ * The column remains a regular writable database column. Create, update,
7545
+ * filters, ordering, grouping, and migrations still use the physical column.
7546
+ */
7547
+ selectSql<T extends Column.Pick.DataAndDataType, Expr extends Expression$1>(this: T, fn: (column: ColumnRefExpression<T & Column.Pick.QueryColumn>) => Expr): SelectSqlColumn<T, Expr>;
7533
7548
  /**
7534
7549
  * Forbid the column to be used in [create](/guide/create-update-delete.html#create-insert) and [update](/guide/create-update-delete.html#update) methods.
7535
7550
  *
@@ -7938,7 +7953,7 @@ declare abstract class Column$1<Schema extends ColumnTypeSchemaArg$1 = ColumnTyp
7938
7953
  */
7939
7954
  generated<T extends Column.Pick.Data>(this: T, ...args: StaticSQLArgs): Column.Modifiers.Generated<T>;
7940
7955
  }
7941
- interface ColumnDataComputedProp {
7956
+ interface ColumnDataComputedProp extends ColumnDataSelectSqlProp {
7942
7957
  computed?: Expression$1;
7943
7958
  }
7944
7959
  declare class ComputedColumn {
@@ -7985,6 +8000,10 @@ type QueryType = undefined | null | 'upsert' | 'insert' | 'update' | 'delete';
7985
8000
  interface AsFn {
7986
8001
  (as: string): void;
7987
8002
  }
8003
+ interface SelectAllColumnExpression {
8004
+ (ctx: ToSQLCtx$1, quotedAs?: string): string;
8005
+ }
8006
+ type SelectAllColumn = string | SelectAllColumnExpression;
7988
8007
  interface QueryData$1 extends QueryDataAliases, PickQueryDataParsers, HasHookSelect, MutativeQueriesSelectRelationsQueryData {
7989
8008
  type: QueryType;
7990
8009
  adapter: Adapter$1;
@@ -8020,7 +8039,7 @@ interface QueryData$1 extends QueryDataAliases, PickQueryDataParsers, HasHookSel
8020
8039
  sql: string;
8021
8040
  aliases: string[];
8022
8041
  };
8023
- selectAllColumns?: string[];
8042
+ selectAllColumns?: SelectAllColumn[];
8024
8043
  /**
8025
8044
  * Subset of the `shape` that only includes columns with no `data.explicitSelect`.
8026
8045
  */
@@ -8149,17 +8168,17 @@ interface ToSqlOptionsInternal {
8149
8168
  selectedCount?: number;
8150
8169
  selectList?: string[];
8151
8170
  }
8152
- interface ToSqlValues {
8171
+ interface ToSqlValues$1 {
8153
8172
  values: unknown[];
8154
8173
  }
8155
- interface TopToSqlCtx extends ToSqlOptionsInternal, HasCteHooks, ToSqlValues {
8174
+ interface TopToSqlCtx extends ToSqlOptionsInternal, HasCteHooks, ToSqlValues$1 {
8156
8175
  topCtx: TopToSqlCtx;
8157
8176
  topCTE?: TopCTE;
8158
8177
  tableHook?: TableHook;
8159
8178
  mutativeQueriesSelectRelationsSqlState?: MutativeQueriesSelectRelationsSqlState;
8160
8179
  cteHookTopNullSelectAppended?: boolean;
8161
8180
  }
8162
- interface ToSQLCtx extends ToSqlOptionsInternal, ToSqlValues {
8181
+ interface ToSQLCtx$1 extends ToSqlOptionsInternal, ToSqlValues$1 {
8163
8182
  topCtx: TopToSqlCtx;
8164
8183
  qb: QueryBuilder;
8165
8184
  q: QueryData$1;
@@ -9607,4 +9626,4 @@ declare class QueryUpdate {
9607
9626
  */
9608
9627
  updateManyByOptional<T extends UpdateManyBySelf, Keys extends UpdateManyByKeys<T>, K = UpdateManyByKeyColumns<Keys>>(this: T, keys: Keys, data: UpdateManyByData<T, K>): UpdateManyResult<T> & QueryHasWhere$1;
9609
9628
  }
9610
- export { type Adapter, AdapterClass, type AdapterConfigBase, type AdapterParams, type AdapterSchemaConfigOptions, type AfterCommitStandaloneHook, type AfterHook, ArrayColumn, type ArrayColumnValue, type ArrayData, type AsyncState, type BaseNumberData, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, CannotMutateReadOnlyTableError, CidrColumn, CircleColumn, CitextColumn, type Code, type Codes, Column, type ColumnFromDbParams, type ColumnSchemaConfig, type ColumnSchemaGetterColumns, type ColumnSchemaGetterTableClass, type ColumnToCodeCtx, type ColumnTypeSchemaArg, type ColumnsByType, type ColumnsShape, type ComputedColumnsFromOptions, type ComputedOptionsConfig, type ComputedOptionsFactory, type CreateCtx, type CreateData, type CreateManyMethodsNames, type CreateMethodsNames, type CreateSelf, CustomTypeColumn, DateColumn, type DateColumnData, type DbDomainArg, type DbExtension, type DbOptions, type DbResult, type DbSharedOptions, type DbSqlMethod, type DbStructureDomainsMap, type DbTableOptionScopes, type DbTableOptions, DecimalColumn, type DecimalColumnData, type DefaultColumnTypes, type DefaultPrivileges, type DefaultSchemaConfig, type DeleteMethodsNames, DomainColumn, DoublePrecisionColumn, type DriverAdapter, DynamicRawSQL, type EmptyObject, type EmptyTuple, EnumColumn, Expression, type FromArg, type FromResult, type GeneratorIgnore, type Grant, type HookSelectValue, InetColumn, IntegerColumn, IntervalColumn, type IsQuery, type IsolationLevel, JSONColumn, JSONTextColumn, type JoinQueryMethod, type JoinedShapes, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, type MapTableScopesOption, type MaybeArray, type MaybePromise, type MergeQuery, MoneyColumn, type NoPrimaryKeyOption, type NonUniqDataItem, type NumberColumnData, Operators, type OperatorsArray, type OperatorsJson, type OperatorsOrdinalText, OrchidOrmError, type Ord, PathColumn, type PickQueryInputType, type PickQueryInternal, type PickQueryQ, type PickQueryRelations, type PickQuerySelectableRelations, type PickQueryShape, PointColumn, PolygonColumn, PostgisGeographyPointColumn, type QueryAfterHook, type QueryBeforeActionHook, type QueryBeforeHook, type QueryData, type QueryHasWhere, QueryHookUtils, QueryHooks, type QueryInternal, type QueryLogObject, type QueryLogOptions, type QueryLogger, type QueryManyTake, type QueryManyTakeOptional, type QueryOrExpression, type QueryResult, type QueryResultRow, type QueryReturnType, type QuerySchema, type QueryScopes, RawSql, type RawSqlBase, RealColumn, type RecordKeyTrue, type RecordOptionalString, type RecordString, type RecordStringOrNumber, type RecordUnknown, type RelationConfigBase, type RelationJoinQuery, type RelationsBase, type Rls, type RlsPolicy, type SchemaConfigFnWithOptions, type SearchWeight, type SelectableFromShape, SerialColumn, type SerialColumnData, type ShallowSimplify, type ShapeColumnPrimaryKeys, type ShapeUniqueColumns, type SingleSql, type SingleSqlItem, SmallIntColumn, SmallSerialColumn, type Sql, type SqlFn, type SqlSessionState, type StorageOptions, StringColumn, type StringData, type TableData, type TableDataFn, type TableDataInput, type TableDataItem, type TableDataItemsUniqueColumnTuples, type TableDataItemsUniqueColumns, type TableDataItemsUniqueConstraints, type TableDataMethods, type TemplateLiteralArgs, TextColumn, TimeColumn, TimestampColumn, TimestampTZColumn, type Timestamps, type TransactionAdapter, TransactionAdapterClass, type TransactionOptions, TsQueryColumn, TsVectorColumn, UUIDColumn, type UniqueConstraints, type UniqueTableDataItem, UnknownColumn, type UpdateData, type UpdateSelf, type UpsertData, type UpsertThis, VarCharColumn, VirtualColumn, type WhereArg, XMLColumn, _appendQuery, _appendQueryOnUpsertCreate, _clone, _createDbSqlMethod, _hookSelectColumns, _initQueryBuilder, _orCreate, _prependWith, _queryCreate, _queryCreateMany, _queryCreateManyFrom, _queryDefaults, _queryDelete, _queryFindBy, _queryFindByOptional, _queryHookAfterCreate, _queryHookAfterUpdate, _queryInsert, _queryInsertMany, _queryJoinOn, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUpdate, _queryUpdateOrThrow, _queryUpsert, _queryWhere, _queryWhereExists, _queryWhereIn, addCode, addTopCte, addTopCteSql, applyMixins, assignDbDataToColumn, backtickQuote, cloneQueryBaseUnscoped, codeToString, colors, columnsShapeToCode, constraintInnerToCode, consumeColumnName, deepCompare, defaultSchemaConfig, emptyArray, emptyObject, escapeForMigration, escapeString, excludeInnerToCode, exhaustive, getCallerFilePath, getClonedQueryData, getColumnBaseType, getColumnTypes, getDateAsDateFn, getDateAsNumberFn, getDriverErrorCode, getFreeAlias, getFreeSetAlias, getImportPath, getPrimaryKeys, getQueryAs, getQuerySchema, getShapeFromSelect, getSqlText, getStackTrace, getSupportedDefaultPrivileges, indexInnerToCode, internalSchemaConfig, isExpression, isQueryReturnsAll, isRawSQL, logColors, logParamToLogObject, makeColumnNullable, makeColumnTypes, makeColumnsByType, makeConnectRetryConfig, noop, objectHasValues, omit, parseTableData, parseTableDataInput, pathToLog, pick, pluralize, prepareSubQueryForSql, primaryKeyInnerToCode, pushQueryOnForOuter, pushQueryValueImmutable, pushTableDataCode, quoteIdentifier, quoteObjectKey, quoteTableWithSchema, raw, rawSqlToCode, referencesArgsToCode, returnArg, setColumnData, setColumnEncode, setColumnParse, setColumnParseNull, setCurrentColumnName, setDataValue, setDefaultLanguage, setFreeAlias, setQueryObjectValueImmutable, singleQuote, tableDataMethods, toArray, toCamelCase, toPascalCase, toSnakeCase, wrapAdapterFnWithConnectRetry };
9629
+ export { type Adapter, AdapterClass, type AdapterConfigBase, type AdapterParams, type AdapterSchemaConfigOptions, type AfterCommitStandaloneHook, type AfterHook, ArrayColumn, type ArrayColumnValue, type ArrayData, type AsyncState, type BaseNumberData, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, CannotMutateReadOnlyTableError, CidrColumn, CircleColumn, CitextColumn, type Code, type Codes, Column, type ColumnFromDbParams, type ColumnSchemaConfig, type ColumnSchemaGetterColumns, type ColumnSchemaGetterTableClass, type ColumnToCodeCtx, type ColumnTypeSchemaArg, type ColumnsByType, type ColumnsShape, type ComputedColumnsFromOptions, type ComputedOptionsConfig, type ComputedOptionsFactory, type CreateCtx, type CreateData, type CreateManyMethodsNames, type CreateMethodsNames, type CreateSelf, CustomTypeColumn, DateColumn, type DateColumnData, type DbDomainArg, type DbExtension, type DbOptions, type DbResult, type DbSharedOptions, type DbSqlMethod, type DbStructureDomainsMap, type DbTableOptionScopes, type DbTableOptions, DecimalColumn, type DecimalColumnData, type DefaultColumnTypes, type DefaultPrivileges, type DefaultSchemaConfig, type DeleteMethodsNames, DomainColumn, DoublePrecisionColumn, type DriverAdapter, DynamicRawSQL, type EmptyObject, type EmptyTuple, EnumColumn, Expression, type ExpressionData, type FromArg, type FromResult, type GeneratorIgnore, type Grant, type HookSelectValue, InetColumn, IntegerColumn, IntervalColumn, type IsQuery, type IsolationLevel, JSONColumn, JSONTextColumn, type JoinQueryMethod, type JoinedShapes, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, type MapTableScopesOption, type MaybeArray, type MaybePromise, type MergeQuery, MoneyColumn, type NoPrimaryKeyOption, type NonUniqDataItem, type NumberColumnData, Operators, type OperatorsArray, type OperatorsJson, type OperatorsOrdinalText, OrchidOrmError, type Ord, PathColumn, type PickQueryInputType, type PickQueryInternal, type PickQueryQ, type PickQueryRelations, type PickQuerySelectableRelations, type PickQueryShape, PointColumn, PolygonColumn, PostgisGeographyPointColumn, type QueryAfterHook, type QueryBeforeActionHook, type QueryBeforeHook, type QueryData, type QueryHasWhere, QueryHookUtils, QueryHooks, type QueryInternal, type QueryLogObject, type QueryLogOptions, type QueryLogger, type QueryManyTake, type QueryManyTakeOptional, type QueryOrExpression, type QueryResult, type QueryResultRow, type QueryReturnType, type QuerySchema, type QueryScopes, RawSql, type RawSqlBase, RealColumn, type RecordKeyTrue, type RecordOptionalString, type RecordString, type RecordStringOrNumber, type RecordUnknown, type RelationConfigBase, type RelationJoinQuery, type RelationsBase, type Rls, type RlsPolicy, type SchemaConfigFnWithOptions, type SearchWeight, type SelectableFromShape, SerialColumn, type SerialColumnData, type ShallowSimplify, type ShapeColumnPrimaryKeys, type ShapeUniqueColumns, type SingleSql, type SingleSqlItem, SmallIntColumn, SmallSerialColumn, type Sql, type SqlFn, type SqlSessionState, type StorageOptions, StringColumn, type StringData, type TableData, type TableDataFn, type TableDataInput, type TableDataItem, type TableDataItemsUniqueColumnTuples, type TableDataItemsUniqueColumns, type TableDataItemsUniqueConstraints, type TableDataMethods, type TemplateLiteralArgs, TextColumn, TimeColumn, TimestampColumn, TimestampTZColumn, type Timestamps, type ToSQLCtx, type ToSqlValues, type TransactionAdapter, TransactionAdapterClass, type TransactionOptions, TsQueryColumn, TsVectorColumn, UUIDColumn, type UniqueConstraints, type UniqueTableDataItem, UnknownColumn, type UpdateData, type UpdateSelf, type UpsertData, type UpsertThis, VarCharColumn, VirtualColumn, type WhereArg, XMLColumn, _appendQuery, _appendQueryOnUpsertCreate, _clone, _createDbSqlMethod, _hookSelectColumns, _initQueryBuilder, _orCreate, _prependWith, _queryCreate, _queryCreateMany, _queryCreateManyFrom, _queryDefaults, _queryDelete, _queryFindBy, _queryFindByOptional, _queryHookAfterCreate, _queryHookAfterUpdate, _queryInsert, _queryInsertMany, _queryJoinOn, _queryRows, _querySelect, _queryTake, _queryTakeOptional, _queryUpdate, _queryUpdateOrThrow, _queryUpsert, _queryWhere, _queryWhereExists, _queryWhereIn, addCode, addTopCte, addTopCteSql, applyMixins, assignDbDataToColumn, backtickQuote, cloneQueryBaseUnscoped, codeToString, colors, columnsShapeToCode, constraintInnerToCode, consumeColumnName, deepCompare, defaultSchemaConfig, emptyArray, emptyObject, escapeForMigration, escapeString, excludeInnerToCode, exhaustive, getCallerFilePath, getClonedQueryData, getColumnBaseType, getColumnTypes, getDateAsDateFn, getDateAsNumberFn, getDriverErrorCode, getFreeAlias, getFreeSetAlias, getImportPath, getPrimaryKeys, getQueryAs, getQuerySchema, getShapeFromSelect, getSqlText, getStackTrace, getSupportedDefaultPrivileges, indexInnerToCode, internalSchemaConfig, isExpression, isQueryReturnsAll, isRawSQL, logColors, logParamToLogObject, makeColumnNullable, makeColumnTypes, makeColumnsByType, makeConnectRetryConfig, noop, objectHasValues, omit, parseTableData, parseTableDataInput, pathToLog, pick, pluralize, prepareSubQueryForSql, primaryKeyInnerToCode, pushQueryOnForOuter, pushQueryValueImmutable, pushTableDataCode, quoteIdentifier, quoteObjectKey, quoteTableWithSchema, raw, rawSqlToCode, referencesArgsToCode, returnArg, setColumnData, setColumnEncode, setColumnParse, setColumnParseNull, setCurrentColumnName, setDataValue, setDefaultLanguage, setFreeAlias, setQueryObjectValueImmutable, singleQuote, tableDataMethods, toArray, toCamelCase, toPascalCase, toSnakeCase, wrapAdapterFnWithConnectRetry };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pqb",
3
- "version": "0.67.3",
3
+ "version": "0.67.4",
4
4
  "description": "Postgres query builder",
5
5
  "keywords": [
6
6
  "pg",