pqb 0.72.1 → 0.72.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 CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
2
  import { inspect } from "node:util";
3
+ import tag from "tagged-tag";
3
4
  type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
4
5
  type MaybeArray<T> = T | T[];
5
6
  type MaybePromise<T> = T | Promise<T>;
@@ -629,6 +630,10 @@ declare class SqlRefExpression extends Expression {
629
630
  makeSQL(): string;
630
631
  }
631
632
  interface ColumnSchemaGetterTableClass {
633
+ data?: {
634
+ table: string | undefined;
635
+ name: string | undefined;
636
+ };
632
637
  prototype: {
633
638
  columns: {
634
639
  shape: Column.Shape.ForValidation;
@@ -4975,6 +4980,18 @@ interface QueryInternal<SinglePrimaryKey = any, UniqueColumns = any, UniqueColum
4975
4980
  */
4976
4981
  nestedCreateBatchMax: number;
4977
4982
  }
4983
+ interface Brand<Token extends PropertyKey> {
4984
+ readonly [tag]: { [K in Token]: never; };
4985
+ }
4986
+ type Branded<Type, Token extends PropertyKey> = Type & Brand<Token>;
4987
+ type BrandColumnKey = '__inputType' | '__outputType' | '__queryType';
4988
+ type BrandToken<Token extends PropertyKey, ColumnToken extends true | string> = string extends ColumnToken ? Token : ColumnToken extends string ? ColumnToken : Token;
4989
+ type BrandColumn<Column, Token extends PropertyKey> = Column extends {
4990
+ data: {
4991
+ branded: infer ColumnToken extends true | string;
4992
+ };
4993
+ } ? { [K in keyof Column]: K extends BrandColumnKey ? Branded<Column[K], BrandToken<Token, ColumnToken>> : Column[K]; } : Column;
4994
+ type BrandColumnsShape<Shape, Table extends string | undefined> = { [K in keyof Shape]: BrandColumn<Shape[K], `${Table}.${K & string}`>; };
4978
4995
  type ShapeHasPrimaryKeys<Shape extends Column.QueryColumnsInit> = { [K in keyof Shape]: Shape[K]['data']['primaryKey'] extends string ? K : never; }[keyof Shape];
4979
4996
  type TablePrimaryKeys<Shape extends Column.QueryColumnsInit> = ShapeHasPrimaryKeys<Shape> extends never ? never : { [K in ShapeHasPrimaryKeys<Shape>]: UniqueQueryTypeOrExpression<Shape[K]['__queryType']>; };
4980
4997
  type ShapeUniqueColumns<Shape extends Column.QueryColumnsInit> = { [K in keyof Shape]: Shape[K]['data']['unique'] extends string ? { [C in K]: UniqueQueryTypeOrExpression<Shape[K]['__queryType']>; } : never; }[keyof Shape];
@@ -5077,7 +5094,7 @@ declare class Db<Table extends string | undefined = undefined, Shape extends Col
5077
5094
  q: QueryData;
5078
5095
  __isQuery: true;
5079
5096
  __as: Table & string;
5080
- __selectable: SelectableFromShape<ComputedColumnsFromOptions<Shape, Options>, Table>;
5097
+ __selectable: SelectableFromShape<ComputedColumnsFromOptions<Table, Shape, Options>, Table>;
5081
5098
  __readOnly: ReadOnly;
5082
5099
  __materialized: Options extends {
5083
5100
  materialized: true;
@@ -5103,8 +5120,8 @@ declare class Db<Table extends string | undefined = undefined, Shape extends Col
5103
5120
  error: new (message: string, length: number, name: QueryErrorName) => QueryError<this>;
5104
5121
  internal: QueryInternal<TablePrimaryKeys<Shape> extends never ? never : { [K in keyof TablePrimaryKeys<Shape>]: (keyof TablePrimaryKeys<Shape> extends K ? never : keyof TablePrimaryKeys<Shape>) extends never ? TablePrimaryKeys<Shape>[K] : never; }[keyof TablePrimaryKeys<Shape>], TablePrimaryKeys<Shape> | ShapeUniqueColumns<Shape> | TableDataItemsUniqueColumns<Shape, Data>, { [K in keyof Shape]: Shape[K]['data']['unique'] extends string ? K : never; }[keyof Shape] | keyof TablePrimaryKeys<Shape>, TableDataItemsUniqueColumnTuples<Shape, Data>, UniqueConstraints<Shape> | TableDataItemsUniqueConstraints<Data>>;
5105
5122
  catch: QueryCatch;
5106
- shape: ComputedColumnsFromOptions<Shape, Options>;
5107
- constructor(adapterNotInTransaction: Adapter, qb: QueryBuilder, table: Table | undefined, shape: ComputedColumnsFromOptions<Shape, Options>, columnTypes: ColumnTypes, asyncStorage: AsyncLocalStorage<AsyncState>, options: DbTableOptions<ColumnTypes, Table, ComputedColumnsFromOptions<Shape, Options>>, tableData?: TableData, viewData?: QueryInternal['viewData']);
5123
+ shape: ComputedColumnsFromOptions<Table, Shape, Options>;
5124
+ constructor(adapterNotInTransaction: Adapter, qb: QueryBuilder, table: Table | undefined, shape: ComputedColumnsFromOptions<Table, Shape, Options>, columnTypes: ColumnTypes, asyncStorage: AsyncLocalStorage<AsyncState>, options: DbTableOptions<ColumnTypes, Table, ComputedColumnsFromOptions<Table, Shape, Options>>, tableData?: TableData, viewData?: QueryInternal['viewData']);
5108
5125
  /**
5109
5126
  * When in transaction, returns a db adapter object for the transaction,
5110
5127
  * returns a default adapter object otherwise.
@@ -5173,7 +5190,7 @@ declare class Db<Table extends string | undefined = undefined, Shape extends Col
5173
5190
  queryArrays<R extends any[] = any[]>(...args: SQLQueryArgs): Promise<QueryResult<R>>;
5174
5191
  }
5175
5192
  interface DbTableConstructor<ColumnTypes> {
5176
- <Table extends string, Shape extends Column.QueryColumnsInit, Data extends MaybeArray<TableDataItem>, Options extends DbTableOptions<ColumnTypes, Table, Shape> | undefined>(table: Table, shape?: ((t: ColumnTypes) => Shape) | Shape, tableData?: TableDataFn<Shape, Data>, options?: Options): Db<Table, Shape, Data, ColumnTypes, Options extends {
5193
+ <Table extends string, Shape extends Column.QueryColumnsInit, Data extends MaybeArray<TableDataItem>, Options extends DbTableOptions<ColumnTypes, Table, Shape> | undefined>(table: Table, shape?: ((t: ColumnTypes) => Shape) | Shape, tableData?: TableDataFn<Shape, Data>, options?: Options): Db<Table, BrandColumnsShape<Shape, Table>, Data, ColumnTypes, Options extends {
5177
5194
  readOnly: true;
5178
5195
  } ? true : undefined, Options>;
5179
5196
  }
@@ -5193,7 +5210,7 @@ type MapTableScopesOption<T> = T extends {
5193
5210
  } ? {
5194
5211
  nonDeleted: unknown;
5195
5212
  } : EmptyObject;
5196
- interface DbResult<ColumnTypes> extends Db<undefined, EmptyObject, never, ColumnTypes, never, never>, DbTableConstructor<ColumnTypes> {
5213
+ interface DbResult<ColumnTypes> extends Db<undefined, EmptyObject, never, ColumnTypes, never>, DbTableConstructor<ColumnTypes> {
5197
5214
  adapterNotInTransaction: Adapter;
5198
5215
  adapter: Adapter;
5199
5216
  close: Adapter['close'];
@@ -6724,6 +6741,11 @@ declare namespace Column {
6724
6741
  };
6725
6742
  }
6726
6743
  export type Generated<T extends Column.Pick.Data> = { [K in keyof T]: K extends 'data' ? { [K in keyof T['data']]: K extends 'default' ? true : T['data'][K]; } : K extends '__inputType' ? never : T[K]; };
6744
+ export interface Branded<Token extends true | string = true> {
6745
+ data: {
6746
+ branded: Token;
6747
+ };
6748
+ }
6727
6749
  export namespace Pick {
6728
6750
  interface Data {
6729
6751
  data: Column.Data;
@@ -6882,6 +6904,7 @@ declare namespace Column {
6882
6904
  name?: string;
6883
6905
  readOnly?: boolean;
6884
6906
  appReadOnly: true | undefined;
6907
+ branded: true | string | undefined;
6885
6908
  }
6886
6909
  export interface Data extends ColumnDataComputedProp {
6887
6910
  key: string;
@@ -6930,6 +6953,7 @@ declare namespace Column {
6930
6953
  readonly?: boolean;
6931
6954
  valueToArray?: boolean;
6932
6955
  skipValueToArray?: boolean;
6956
+ branded: true | string | undefined;
6933
6957
  }
6934
6958
  export namespace Data {
6935
6959
  interface Default {
@@ -7285,6 +7309,7 @@ declare abstract class Column {
7285
7309
  * @deprecated use `type`, `inputType`, `outputType`, `queryType` instead
7286
7310
  */
7287
7311
  narrowAllTypes: this['__schema']['narrowAllTypes'];
7312
+ brand<T, Token extends true | string = true>(this: T, _token?: Token): T & Column.Branded<Token>;
7288
7313
  input<T extends {
7289
7314
  inputSchema: unknown;
7290
7315
  }, InputSchema extends this['__schema']['__schemaType']>(this: T, fn: (schema: T['inputSchema']) => InputSchema): { [K in keyof T]: K extends 'inputSchema' ? InputSchema : T[K]; };
@@ -8813,13 +8838,18 @@ declare const getColumnBaseType: (column: Column.Pick.Data, domainsMap: DbStruct
8813
8838
  interface ColumnDataComputedProp extends ColumnDataSelectSqlProp {
8814
8839
  computed?: Expression;
8815
8840
  }
8816
- type ComputedColumnsFromOptions<Shape, Options> = Options extends {
8841
+ type ComputedColumnsFromOptions<Table extends string | undefined, Shape, Options> = Options extends {
8817
8842
  computed: (...args: any) => infer R;
8818
- } ? { [K in (keyof Shape | keyof R) & string]: K extends keyof Shape ? Shape[K] : K extends keyof R ? R[K] extends QueryOrExpression<unknown> ? R[K]['result']['value'] : R[K] extends (() => {
8843
+ } ? { [K in (keyof Shape | keyof R) & string]: K extends keyof Shape ? Shape[K] : K extends keyof R ? BrandColumn<ComputedColumnValue<R[K]>, `${Table}.${K & string}`> : never; } : Shape;
8844
+ type ComputedColumnValue<T> = T extends {
8845
+ result: {
8846
+ value: infer Value extends Column.Pick.QueryColumn;
8847
+ };
8848
+ } | (() => {
8819
8849
  result: {
8820
8850
  value: infer Value extends Column.Pick.QueryColumn;
8821
8851
  };
8822
- }) ? Value : never : never; } : Shape;
8852
+ }) ? Value : never;
8823
8853
  interface ComputedOptionsConfig {
8824
8854
  [K: string]: QueryOrExpression<unknown> | ReturnsQueryOrExpression<unknown>;
8825
8855
  }
@@ -11147,4 +11177,4 @@ declare const testTransaction: {
11147
11177
  */
11148
11178
  close(arg: Arg$1): Promise<void>;
11149
11179
  };
11150
- 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, CidrColumn, CircleColumn, CitextColumn, type Code, type Codes, Column, type ColumnFromDbParams, type ColumnRefExpression, 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, DateBaseColumn, DateColumn, type DateColumnData, type DateColumnInput, DateTimeBaseClass, DateTimeTzBaseClass, Db, 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, IntegerBaseColumn, IntegerColumn, IntervalColumn, type IsQuery, type IsolationLevel, JSONColumn, JSONTextColumn, type JoinedShapes, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, type MapTableScopesOption, type MaybeArray, type MaybePromise, type MergeQuery, MoneyColumn, type NoPrimaryKeyOption, type NonUniqDataItem, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, type NumberColumnData, Operators, type OperatorsArray, type OperatorsDate, type OperatorsJson, type OperatorsNumber, type OperatorsOrdinalText, type OperatorsText, OrchidOrmInternalError, type Ord, PathColumn, type PickQueryInputType, type PickQueryInternal, type PickQueryQ, type PickQueryRelations, type PickQuerySelectableRelations, type PickQueryShape, PointColumn, PolygonColumn, PostgisGeographyPointColumn, type Query, type QueryAfterHook, type QueryBeforeActionHook, type QueryBeforeHook, type QueryData, QueryError, type QueryHasWhere, type QueryHelperResult, 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 RefreshMaterializedViewOptions, type RelationConfigBase, type RelationJoinQuery, type RelationsBase, type Rls, type RlsPolicy, type SchemaConfigFnWithOptions, type SearchWeight, type SelectSqlColumn, type SelectableFromShape, SerialColumn, type SerialColumnData, type ShallowSimplify, type ShapeUniqueColumns, type SingleSql, type SingleSqlItem, SmallIntColumn, SmallSerialColumn, type Sql, type SqlFn, type SqlSessionState, type StaticSQLArgs, type StorageOptions, StringColumn, type StringData, type TableData, type TableDataFn, type TableDataInput, type TableDataItem, type TableDataItemsUniqueColumnTuples, type TableDataItemsUniqueColumns, type TableDataItemsUniqueConstraints, type TableDataMethods, type TemplateLiteralArgs, TextBaseColumn, 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 UpsertData, type UpsertThis, VarCharColumn, VirtualColumn, type WhereArg, XMLColumn, _appendQuery, _appendQueryOnUpsertCreate, _clone, _createDbSqlMethod, _hookSelectColumns, _initQueryBuilder, _onUpsertUpdate, _orCreate, _prependWith, _prependWithOnUpsertCreate, _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, constraintToCode, consumeColumnName, copyTableData, createDbWithAdapter, deepCompare, defaultSchemaConfig, emptyArray, emptyObject, escapeForMigration, escapeString, excludeInnerToCode, excludeToCode, exhaustive, getCallerFilePath, getClonedQueryData, getColumnBaseType, getColumnInfo, getColumnTypes, getDateAsDateFn, getDateAsNumberFn, getDriverErrorCode, getFreeAlias, getFreeSetAlias, getImportPath, getPrimaryKeys, getQueryAs, getQuerySchema, getShapeFromSelect, getSqlText, getStackTrace, getSupportedDefaultPrivileges, indexInnerToCode, indexToCode, internalSchemaConfig, isExpression, isQueryReturnsAll, isRawSQL, logColors, logParamToLogObject, makeColumnNullable, makeColumnTypes, makeColumnsByType, makeConnectRetryConfig, noop, objectHasValues, omit, parseTableData, parseTableDataInput, pathToLog, pick, pluralize, prepareSubQueryForSql, primaryKeyInnerToCode, pushQueryOnForOuter, pushQueryValueImmutable, pushTableDataCode, queryToSql, quoteIdentifier, quoteObjectKey, quoteTableWithSchema, raw, rawSqlToCode, rawSqlToSql, referencesArgsToCode, refreshMaterializedView, returnArg, setColumnData, setColumnEncode, setColumnParse, setColumnParseNull, setCurrentColumnName, setDataValue, setDefaultLanguage, setFreeAlias, setQueryObjectValueImmutable, singleQuote, sqlToRawSql, tableDataMethods, testTransaction, toArray, toCamelCase, toPascalCase, toSnakeCase, wrapAdapterFnWithConnectRetry };
11180
+ 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, type BrandColumn, type BrandColumnsShape, type Branded, ByteaColumn, CidrColumn, CircleColumn, CitextColumn, type Code, type Codes, Column, type ColumnFromDbParams, type ColumnRefExpression, 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, DateBaseColumn, DateColumn, type DateColumnData, type DateColumnInput, DateTimeBaseClass, DateTimeTzBaseClass, Db, 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, IntegerBaseColumn, IntegerColumn, IntervalColumn, type IsQuery, type IsolationLevel, JSONColumn, JSONTextColumn, type JoinedShapes, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, type MapTableScopesOption, type MaybeArray, type MaybePromise, type MergeQuery, MoneyColumn, type NoPrimaryKeyOption, type NonUniqDataItem, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, type NumberColumnData, Operators, type OperatorsArray, type OperatorsDate, type OperatorsJson, type OperatorsNumber, type OperatorsOrdinalText, type OperatorsText, OrchidOrmInternalError, type Ord, PathColumn, type PickQueryInputType, type PickQueryInternal, type PickQueryQ, type PickQueryRelations, type PickQuerySelectableRelations, type PickQueryShape, PointColumn, PolygonColumn, PostgisGeographyPointColumn, type Query, type QueryAfterHook, type QueryBeforeActionHook, type QueryBeforeHook, type QueryData, QueryError, type QueryHasWhere, type QueryHelperResult, 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 RefreshMaterializedViewOptions, type RelationConfigBase, type RelationJoinQuery, type RelationsBase, type Rls, type RlsPolicy, type SchemaConfigFnWithOptions, type SearchWeight, type SelectSqlColumn, type SelectableFromShape, SerialColumn, type SerialColumnData, type ShallowSimplify, type ShapeUniqueColumns, type SingleSql, type SingleSqlItem, SmallIntColumn, SmallSerialColumn, type Sql, type SqlFn, type SqlSessionState, type StaticSQLArgs, type StorageOptions, StringColumn, type StringData, type TableData, type TableDataFn, type TableDataInput, type TableDataItem, type TableDataItemsUniqueColumnTuples, type TableDataItemsUniqueColumns, type TableDataItemsUniqueConstraints, type TableDataMethods, type TemplateLiteralArgs, TextBaseColumn, 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 UpsertData, type UpsertThis, VarCharColumn, VirtualColumn, type WhereArg, XMLColumn, _appendQuery, _appendQueryOnUpsertCreate, _clone, _createDbSqlMethod, _hookSelectColumns, _initQueryBuilder, _onUpsertUpdate, _orCreate, _prependWith, _prependWithOnUpsertCreate, _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, constraintToCode, consumeColumnName, copyTableData, createDbWithAdapter, deepCompare, defaultSchemaConfig, emptyArray, emptyObject, escapeForMigration, escapeString, excludeInnerToCode, excludeToCode, exhaustive, getCallerFilePath, getClonedQueryData, getColumnBaseType, getColumnInfo, getColumnTypes, getDateAsDateFn, getDateAsNumberFn, getDriverErrorCode, getFreeAlias, getFreeSetAlias, getImportPath, getPrimaryKeys, getQueryAs, getQuerySchema, getShapeFromSelect, getSqlText, getStackTrace, getSupportedDefaultPrivileges, indexInnerToCode, indexToCode, internalSchemaConfig, isExpression, isQueryReturnsAll, isRawSQL, logColors, logParamToLogObject, makeColumnNullable, makeColumnTypes, makeColumnsByType, makeConnectRetryConfig, noop, objectHasValues, omit, parseTableData, parseTableDataInput, pathToLog, pick, pluralize, prepareSubQueryForSql, primaryKeyInnerToCode, pushQueryOnForOuter, pushQueryValueImmutable, pushTableDataCode, queryToSql, quoteIdentifier, quoteObjectKey, quoteTableWithSchema, raw, rawSqlToCode, rawSqlToSql, referencesArgsToCode, refreshMaterializedView, returnArg, setColumnData, setColumnEncode, setColumnParse, setColumnParseNull, setCurrentColumnName, setDataValue, setDefaultLanguage, setFreeAlias, setQueryObjectValueImmutable, singleQuote, sqlToRawSql, tableDataMethods, testTransaction, toArray, toCamelCase, toPascalCase, toSnakeCase, wrapAdapterFnWithConnectRetry };
package/dist/index.js CHANGED
@@ -755,6 +755,9 @@ var Column = class {
755
755
  as(column) {
756
756
  return setColumnData(this, "as", column);
757
757
  }
758
+ brand(_token) {
759
+ return this;
760
+ }
758
761
  input(fn) {
759
762
  const cloned = Object.create(this);
760
763
  cloned.inputSchema = fn(this.inputSchema);