From 76b550734a7fdce8c8f64b000c3a42e25a5a01ee Mon Sep 17 00:00:00 2001 From: juanluispaz Date: Sat, 16 Mar 2024 15:06:13 +0100 Subject: [PATCH] Refactor how the source of data (table, view, etc ) identity is represented, simplifying it and improving the understandability of TypeScript's error messages --- src/Connection.ts | 4 +- src/Table.ts | 662 ++++--- src/Values.ts | 262 ++- src/View.ts | 248 ++- src/connections/AbstractAdvancedConnection.ts | 59 +- src/connections/AbstractConnection.ts | 597 +++--- src/connections/MariaDBConnection.ts | 4 +- src/connections/MySqlConnection.ts | 4 +- src/connections/NoopDBConnection.ts | 4 +- src/connections/OracleConnection.ts | 4 +- src/connections/PostgreSqlConnection.ts | 4 +- src/connections/SqlServerConnection.ts | 4 +- src/connections/SqliteConnection.ts | 4 +- src/databases.ts | 43 - src/examples/MariaDBExample-modern.ts | 8 +- src/examples/MariaDBExample.ts | 8 +- src/examples/PrismaMariaDBExample.ts | 8 +- src/expressions/delete.ts | 201 +- src/expressions/fragment.ts | 963 +++++---- src/expressions/insert.ts | 1746 +++++++++-------- src/expressions/select.ts | 697 +++---- src/expressions/update.ts | 298 ++- src/expressions/values.ts | 1597 ++++++++------- src/extras/types.ts | 81 +- src/internal/ColumnImpl.ts | 22 +- src/internal/RawFragmentImpl.ts | 22 +- src/internal/ValueSourceImpl.ts | 328 ++-- src/internal/WithViewImpl.ts | 29 +- src/queryBuilders/AbstractQueryBuilder.ts | 14 +- src/queryBuilders/DeleteQueryBuilder.ts | 39 +- src/queryBuilders/InsertQueryBuilder.ts | 29 +- src/queryBuilders/SelectQueryBuilder.ts | 121 +- src/queryBuilders/UpdateQueryBuilder.ts | 41 +- .../AbstractMySqlMariaBDSqlBuilder.ts | 4 +- src/sqlBuilders/AbstractSqlBuilder.ts | 46 +- src/sqlBuilders/MySqlSqlBuilder.ts | 8 +- src/sqlBuilders/SqlBuilder.ts | 36 +- src/sqlBuilders/SqlServerSqlBuilder.ts | 6 +- src/sqlBuilders/SqliteSqlBuilder.ts | 4 +- src/typeMarks/MariaDBDB.ts | 6 - src/typeMarks/MySqlDB.ts | 6 - src/typeMarks/NoopDBDB.ts | 6 - src/typeMarks/OracleDB.ts | 6 - src/typeMarks/PostgreSqlDB.ts | 6 - src/typeMarks/SqlServerDB.ts | 6 - src/typeMarks/SqliteDB.ts | 6 - src/typeMarks/TABLE.ts | 8 - src/typeMarks/VIEW.ts | 8 - src/utils/Column.ts | 6 +- src/utils/IConnection.ts | 9 +- src/utils/ITableOrView.ts | 133 +- src/utils/RawFragment.ts | 8 +- src/utils/resultUtils.ts | 33 +- src/utils/sourceName.ts | 90 + src/utils/symbols.ts | 86 +- src/utils/tableOrViewUtils.ts | 131 +- 56 files changed, 4347 insertions(+), 4466 deletions(-) delete mode 100644 src/databases.ts delete mode 100644 src/typeMarks/MariaDBDB.ts delete mode 100644 src/typeMarks/MySqlDB.ts delete mode 100644 src/typeMarks/NoopDBDB.ts delete mode 100644 src/typeMarks/OracleDB.ts delete mode 100644 src/typeMarks/PostgreSqlDB.ts delete mode 100644 src/typeMarks/SqlServerDB.ts delete mode 100644 src/typeMarks/SqliteDB.ts delete mode 100644 src/typeMarks/TABLE.ts delete mode 100644 src/typeMarks/VIEW.ts create mode 100644 src/utils/sourceName.ts diff --git a/src/Connection.ts b/src/Connection.ts index ac166b29..f414f437 100644 --- a/src/Connection.ts +++ b/src/Connection.ts @@ -1,5 +1,5 @@ import type { AbstractConnection } from "./connections/AbstractConnection" -import type { AnyDB } from "./databases" +import { NDB } from "./utils/sourceName" -export type Connection = AbstractConnection +export type Connection = AbstractConnection export type { TransactionIsolationLevel } from "./connections/AbstractConnection" diff --git a/src/Table.ts b/src/Table.ts index 47c0658a..fadc6271 100644 --- a/src/Table.ts +++ b/src/Table.ts @@ -1,23 +1,21 @@ import { BooleanValueSource, NumberValueSource, StringValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, EqualableValueSource, ComparableValueSource, BigintValueSource, __getValueSourceOfObject, __getValueSourcePrivate, UuidValueSource, IBooleanValueSource, INumberValueSource, IBigintValueSource, IStringValueSource, IUuidValueSource, ILocalDateValueSource, ILocalTimeValueSource, ILocalDateTimeValueSource, IEqualableValueSource, IComparableValueSource, AnyValueSource, ValueType, CustomIntValueSource, CustomDoubleValueSource, CustomUuidValueSource, CustomLocalDateTimeValueSource, ICustomIntValueSource, ICustomDoubleValueSource, ICustomUuidValueSource, ICustomLocalDateValueSource, ICustomLocalTimeValueSource, ICustomLocalDateTimeValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource } from "./expressions/values" -import { ITable, OfDB, IWithView, __addWiths, __registerTableOrView, ITableOrView, __registerRequiredColumn, HasIsValue } from "./utils/ITableOrView" +import { ITable, IWithView, __addWiths, __registerTableOrView, ITableOrView, __registerRequiredColumn, HasIsValue, OfDB } from "./utils/ITableOrView" import type { TypeAdapter } from "./TypeAdapter" -import type { AliasedTableOrView, AutogeneratedPrimaryKeyColumnsTypesOf, OldValues, OuterJoinSourceOf, ValuesForInsert } from "./utils/tableOrViewUtils" +import type { AliasedTableOrView, AutogeneratedPrimaryKeyColumnsTypesOf, AsOldValues, AsValuesForInsert, AsForUseInLeftJoin, AsAliasedForUseInLeftJoin } from "./utils/tableOrViewUtils" import { Column, ColumnWithDefaultValue, ComputedColumn, OptionalColumn, PrimaryKeyAutogeneratedColumn, PrimaryKeyColumn } from "./utils/Column" -import type { AnyDB, MariaDB, MySql, NoopDB, Oracle, PostgreSql, Sqlite, SqlServer } from "./databases" import { ColumnImpl } from "./internal/ColumnImpl" -import { database, tableName, tableOrViewRef, type, viewName } from "./utils/symbols" +import { connection, isTableOrViewObject, source, type } from "./utils/symbols" import { IConnection } from "./utils/IConnection" -import { RawFragment } from "./utils/RawFragment" -import type { TABLE } from "./typeMarks/TABLE" +import type { RawFragment } from "./utils/RawFragment" import type { BigintFragmentExpression, BooleanFragmentExpression, ComparableFragmentExpression, CustomDoubleFragmentExpression, CustomIntFragmentExpression, CustomLocalDateFragmentExpression, CustomLocalDateTimeFragmentExpression, CustomLocalTimeFragmentExpression, CustomUuidFragmentExpression, LocalDateFragmentExpression, LocalDateTimeFragmentExpression, EqualableFragmentExpression, NumberFragmentExpression, StringFragmentExpression, LocalTimeFragmentExpression, UuidFragmentExpression } from "./expressions/fragment" import { ValueSourceFromBuilder } from "./internal/ValueSourceImpl" import { FragmentQueryBuilder } from "./queryBuilders/FragmentQueryBuilder" +import { NNoTableOrViewRequiredFrom, NTable } from "./utils/sourceName" -class TableOf> implements ITable { - [database]!: REF[typeof database] +class TableOf> implements ITable { + [isTableOrViewObject]: true = true; + [source]!: SOURCE [type]!: 'table' - [viewName]!: REF[typeof tableName] - [tableOrViewRef]!: REF /* implements __ITableOrViewPrivate as private members*/ // @ts-ignore private __name: string @@ -43,10 +41,10 @@ class TableOf> implements ITable { result.__as = as return result as any } - forUseInLeftJoin(): OuterJoinSourceOf { - return this.forUseInLeftJoinAs('') + forUseInLeftJoin(): AsForUseInLeftJoin { + return this.forUseInLeftJoinAs('') as any } - forUseInLeftJoinAs(as: ALIAS): OuterJoinSourceOf { + forUseInLeftJoinAs(as: ALIAS): AsAliasedForUseInLeftJoin { const result = new ((this as any).constructor)() as TableOf result.__as = as result.__forUseInLeftJoin = true @@ -61,12 +59,12 @@ class TableOf> implements ITable { } return result as any } - oldValues(this: { [database]: SqlServer }) : OldValues - oldValues(this: { [database]: NoopDB }) : OldValues - oldValues(this: { [database]: PostgreSql }) : [AutogeneratedPrimaryKeyColumnsTypesOf] extends [never] ? never : OldValues + oldValues(this: OfDB<'sqlServer'>) : AsOldValues + oldValues(this: OfDB<'noopDB'>) : AsOldValues + oldValues(this: OfDB<'postgreSql'>) : [AutogeneratedPrimaryKeyColumnsTypesOf] extends [never] ? never : AsOldValues // Sqlite waiting for https://sqlite.org/forum/forumpost/2d49770b89 //oldValues(this: { [database]: Sqlite }) : [AutogeneratedPrimaryKeyColumnsTypesOf] extends [never] ? never : OldValues - oldValues(this: PostgreSql | SqlServer | NoopDB ): never + oldValues(this: OfDB<'postgreSql' | 'sqlServer' | 'noopDB'>): never oldValues(): any { const result = new ((this as any).constructor)() as TableOf result.__as = '_old_' @@ -74,12 +72,12 @@ class TableOf> implements ITable { return result as any } - valuesForInsert(this: { [database]: PostgreSql }) : ValuesForInsert - valuesForInsert(this: { [database]: Sqlite }) : ValuesForInsert - valuesForInsert(this: { [database]: MariaDB }) : ValuesForInsert - valuesForInsert(this: { [database]: MySql }) : ValuesForInsert - valuesForInsert(this: { [database]: NoopDB }) : ValuesForInsert - valuesForInsert(this: PostgreSql | Sqlite | MariaDB | MySql | NoopDB ): never + valuesForInsert(this: OfDB<'postgreSql'>) : AsValuesForInsert + valuesForInsert(this: OfDB<'sqlite'>) : AsValuesForInsert + valuesForInsert(this: OfDB<'mariaDB'>) : AsValuesForInsert + valuesForInsert(this: OfDB<'mySql'>) : AsValuesForInsert + valuesForInsert(this: OfDB<'noopDB'>) : AsValuesForInsert + valuesForInsert(this: OfDB<'postgreSql' | 'sqlite' | 'mariaDB' | 'mySql' | 'noopDB'> ): never valuesForInsert(): any { const result = new ((this as any).constructor)() as TableOf result.__as = '_values_for_insert_' @@ -87,340 +85,340 @@ class TableOf> implements ITable { return result as any } - protected column(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & Column - protected column(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & Column - protected column(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & Column - protected column(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & Column - protected column(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & Column - protected column(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & Column - protected column(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & Column - protected column(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & Column - protected column(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & Column - protected column(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & Column - protected column(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & Column - protected column(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & Column - protected column(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & Column - protected column(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column - protected column(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column - protected column(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & Column - protected column(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & Column - protected column(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & Column - protected column(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & Column - protected column(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & Column - protected column(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column - protected column(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column - protected column(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & Column - protected column(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & Column */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected column(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & Column + protected column(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & Column + protected column(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & Column + protected column(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & Column + protected column(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & Column + protected column(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & Column + protected column(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & Column + protected column(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & Column + protected column(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & Column + protected column(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & Column + protected column(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & Column + protected column(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & Column + protected column(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & Column + protected column(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column + protected column(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column + protected column(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & Column + protected column(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & Column + protected column(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & Column + protected column(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & Column + protected column(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & Column + protected column(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column + protected column(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column + protected column(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & Column + protected column(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & Column */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return new ColumnImpl(this, name, type as ValueType, adapter, adapter2) } return new ColumnImpl(this, name, type as ValueType, type, adapter) } - protected optionalColumn(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn - protected optionalColumn(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected optionalColumn(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn + protected optionalColumn(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, name, type as ValueType, adapter, adapter2)).__asOptionalColumn() } return (new ColumnImpl(this, name, type as ValueType, type, adapter)).__asOptionalColumn() } - protected columnWithDefaultValue(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue - protected columnWithDefaultValue(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & ColumnWithDefaultValue */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected columnWithDefaultValue(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue + protected columnWithDefaultValue(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & ColumnWithDefaultValue */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, name, type as ValueType, adapter, adapter2)).__asColumnWithDefaultValue() } return (new ColumnImpl(this, name, type as ValueType, type, adapter)).__asColumnWithDefaultValue() } - protected optionalColumnWithDefaultValue(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn & ColumnWithDefaultValue - protected optionalColumnWithDefaultValue(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn & ColumnWithDefaultValue */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected optionalColumnWithDefaultValue(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn & ColumnWithDefaultValue + protected optionalColumnWithDefaultValue(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn & ColumnWithDefaultValue */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, name, type as ValueType, adapter, adapter2)).__asOptionalColumnWithDefaultValue() } return (new ColumnImpl(this, name, type as ValueType, type, adapter)).__asOptionalColumnWithDefaultValue() } - protected autogeneratedPrimaryKey(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKey(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected autogeneratedPrimaryKey(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKey(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, name, type as ValueType, adapter, adapter2)).__asAutogeneratedPrimaryKey() } return (new ColumnImpl(this, name, type as ValueType, type, adapter)).__asAutogeneratedPrimaryKey() } - protected primaryKey(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & PrimaryKeyColumn - protected primaryKey(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & PrimaryKeyColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected primaryKey(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & PrimaryKeyColumn + protected primaryKey(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & PrimaryKeyColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, name, type as ValueType, adapter, adapter2)).__asPrimaryKey() } return (new ColumnImpl(this, name, type as ValueType, type, adapter)).__asPrimaryKey() } - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'string', adapter?: TypeAdapter): StringValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(this: OfDB, name: string, sequenceName: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn - protected autogeneratedPrimaryKeyBySequence(name: string, sequenceName: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'string', adapter?: TypeAdapter): StringValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(this: OfDB<'oracle' | 'postgreSql' | 'sqlServer'>, name: string, sequenceName: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn + protected autogeneratedPrimaryKeyBySequence(name: string, sequenceName: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & ColumnWithDefaultValue & PrimaryKeyColumn & PrimaryKeyAutogeneratedColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, name, type as ValueType, adapter, adapter2)).__asAutogeneratedPrimaryKeyBySequence(sequenceName) } return (new ColumnImpl(this, name, type as ValueType, type, adapter)).__asAutogeneratedPrimaryKeyBySequence(sequenceName) } - protected computedColumn(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & ComputedColumn - protected computedColumn(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & ComputedColumn - protected computedColumn(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & ComputedColumn - protected computedColumn(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & ComputedColumn - protected computedColumn(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & ComputedColumn - protected computedColumn(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & ComputedColumn - protected computedColumn(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & ComputedColumn - protected computedColumn(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & ComputedColumn - protected computedColumn(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ComputedColumn - protected computedColumn(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ComputedColumn - protected computedColumn(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ComputedColumn - protected computedColumn(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ComputedColumn - protected computedColumn(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ComputedColumn - protected computedColumn(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & ComputedColumn - protected computedColumn(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & ComputedColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected computedColumn(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & ComputedColumn + protected computedColumn(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & ComputedColumn + protected computedColumn(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & ComputedColumn + protected computedColumn(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & ComputedColumn + protected computedColumn(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & ComputedColumn + protected computedColumn(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & ComputedColumn + protected computedColumn(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & ComputedColumn + protected computedColumn(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & ComputedColumn + protected computedColumn(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ComputedColumn + protected computedColumn(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ComputedColumn + protected computedColumn(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & ComputedColumn + protected computedColumn(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ComputedColumn + protected computedColumn(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & ComputedColumn + protected computedColumn(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & ComputedColumn + protected computedColumn(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & ComputedColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return new ColumnImpl(this, name, type as ValueType, adapter, adapter2).__asComputedColumn() } return new ColumnImpl(this, name, type as ValueType, type, adapter).__asComputedColumn() } - protected optionalComputedColumn(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn & ComputedColumn - protected optionalComputedColumn(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn & ComputedColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected optionalComputedColumn(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn & ComputedColumn + protected optionalComputedColumn(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn & ComputedColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, name, type as ValueType, adapter, adapter2)).__asOptionalColumn().__asOptionalComputedColumn() } return (new ColumnImpl(this, name, type as ValueType, type, adapter)).__asOptionalColumn().__asOptionalComputedColumn() } - protected virtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource - protected virtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected virtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource - protected virtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected virtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression) => IStringValueSource, adapter?: TypeAdapter): StringValueSource - protected virtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource - protected virtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource - protected virtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource - protected virtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected virtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected virtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected virtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected virtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected virtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected virtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected virtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected virtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected virtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected virtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected virtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression, 'required'>) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource + protected virtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression, 'required'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected virtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression, 'required'>) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource + protected virtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression, 'required'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected virtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression, 'required'>) => IStringValueSource, adapter?: TypeAdapter): StringValueSource + protected virtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression, 'required'>) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource + protected virtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression, 'required'>) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource + protected virtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression, 'required'>) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource + protected virtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression, 'required'>) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected virtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected virtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected virtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected virtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression, T, TYPE_NAME, 'required'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected virtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression, T, T, 'required'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected virtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression, T, T, 'required'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected virtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression, T, T, 'required'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected virtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression, T, T, 'required'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected virtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression, T, T, 'required'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, T, 'required'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression, T, T, 'required'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected virtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof arg1 === 'string') { const fragmentBuilder = new FragmentQueryBuilder(type as ValueType, arg1, 'required', arg3) return new ValueSourceFromBuilder(arg2 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, arg1, 'required', arg3) @@ -429,34 +427,34 @@ class TableOf> implements ITable { return new ValueSourceFromBuilder(arg1 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, type, 'required', arg2 as TypeAdapter | undefined) } - protected optionalVirtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource - protected optionalVirtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected optionalVirtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource - protected optionalVirtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected optionalVirtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression) => IStringValueSource, adapter?: TypeAdapter): StringValueSource - protected optionalVirtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource - protected optionalVirtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected optionalVirtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected optionalVirtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression, 'optional'>) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource + protected optionalVirtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression, 'optional'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected optionalVirtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression, 'optional'>) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource + protected optionalVirtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression, 'optional'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected optionalVirtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression, 'optional'>) => IStringValueSource, adapter?: TypeAdapter): StringValueSource + protected optionalVirtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression, 'optional'>) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource + protected optionalVirtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression, 'optional'>) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression, 'optional'>) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression, 'optional'>) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression, T, TYPE_NAME, 'optional'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression, T, T, 'optional'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression, T, T, 'optional'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression, T, T, 'optional'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression, T, T, 'optional'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression, T, T, 'optional'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, T, 'optional'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression, T, T, 'optional'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected optionalVirtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof arg1 === 'string') { const fragmentBuilder = new FragmentQueryBuilder(type as ValueType, arg1, 'optional', arg3) return new ValueSourceFromBuilder(arg2 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, arg1, 'optional', arg3) @@ -503,7 +501,7 @@ class TableOf> implements ITable { } } -export class Table, NAME extends string> extends TableOf> { +export class Table, NAME extends string> extends TableOf> { constructor(name: string) { super(name) } diff --git a/src/Values.ts b/src/Values.ts index 3e923e83..f2c748ff 100644 --- a/src/Values.ts +++ b/src/Values.ts @@ -1,24 +1,22 @@ import { BooleanValueSource, NumberValueSource, StringValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, EqualableValueSource, ComparableValueSource, BigintValueSource, __getValueSourceOfObject, __getValueSourcePrivate, UuidValueSource, IBooleanValueSource, INumberValueSource, IBigintValueSource, IStringValueSource, IUuidValueSource, ILocalDateValueSource, ILocalTimeValueSource, ILocalDateTimeValueSource, IEqualableValueSource, IComparableValueSource, AnyValueSource, ValueType, CustomIntValueSource, CustomDoubleValueSource, CustomUuidValueSource, CustomLocalDateTimeValueSource, ICustomIntValueSource, ICustomDoubleValueSource, ICustomUuidValueSource, ICustomLocalDateValueSource, ICustomLocalTimeValueSource, ICustomLocalDateTimeValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource } from "./expressions/values" -import { HasIsValue, ITableOrView, IValues, IWithView, __addWiths, __registerRequiredColumn, __registerTableOrView } from "./utils/ITableOrView" +import { HasIsValue, IValues, IWithView, NoTableOrViewRequiredOfSameDB, __addWiths, __registerRequiredColumn, __registerTableOrView } from "./utils/ITableOrView" import type { TypeAdapter } from "./TypeAdapter" -import type { AliasedTableOrView, OuterJoinSourceOf } from "./utils/tableOrViewUtils" +import type { AliasedTableOrView, AsAliasedForUseInLeftJoin, AsForUseInLeftJoin } from "./utils/tableOrViewUtils" import { Column, OptionalColumn, __getColumnOfObject, __getColumnPrivate } from "./utils/Column" -import type { AnyDB, NoopDB, PostgreSql, Sqlite, SqlServer } from "./databases" import { ColumnImpl } from "./internal/ColumnImpl" -import { database, dontCallConstructor, tableOrViewRef, type, viewName } from "./utils/symbols" +import { connection, dontCallConstructor, isTableOrViewObject, source, type } from "./utils/symbols" import { IConnection } from "./utils/IConnection" -import { RawFragment } from "./utils/RawFragment" -import type { VIEW } from "./typeMarks/VIEW" +import type { RawFragment } from "./utils/RawFragment" import type { BigintFragmentExpression, BooleanFragmentExpression, ComparableFragmentExpression, CustomDoubleFragmentExpression, CustomIntFragmentExpression, CustomLocalDateFragmentExpression, CustomLocalDateTimeFragmentExpression, CustomLocalTimeFragmentExpression, CustomUuidFragmentExpression, LocalDateFragmentExpression, LocalDateTimeFragmentExpression, EqualableFragmentExpression, NumberFragmentExpression, StringFragmentExpression, LocalTimeFragmentExpression, UuidFragmentExpression } from "./expressions/fragment" import { ValueSourceFromBuilder } from "./internal/ValueSourceImpl" import { FragmentQueryBuilder } from "./queryBuilders/FragmentQueryBuilder" import { MandatoryInsertSets } from "./expressions/insert" +import { NDBWithType, NGetNameFrom, NNoTableOrViewRequiredFrom, NValues } from "./utils/sourceName" -class ValuesOf> implements IValues { - [database]!: REF[typeof database] +class ValuesOf> implements IValues { + [isTableOrViewObject]: true = true; + [source]!: SOURCE [type]!: 'values' - [viewName]!: REF[typeof viewName] - [tableOrViewRef]!: REF /* implements __ITableOrViewPrivate and WithValuesData as private members*/ // @ts-ignore private __name: string @@ -47,10 +45,10 @@ class ValuesOf> implements IValues { result.__setColumnsName() return result as any } - forUseInLeftJoin(): OuterJoinSourceOf { - return this.forUseInLeftJoinAs('') + forUseInLeftJoin(): AsForUseInLeftJoin { + return this.forUseInLeftJoinAs('') as any } - forUseInLeftJoinAs(as: ALIAS): OuterJoinSourceOf { + forUseInLeftJoinAs(as: ALIAS): AsAliasedForUseInLeftJoin { const result = new ((this as any).constructor)(this.__name, this.__values) as ValuesOf result.__as = as result.__forUseInLeftJoin = true @@ -68,102 +66,102 @@ class ValuesOf> implements IValues { return result as any } - protected column(type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & Column - protected column(type: 'int', adapter?: TypeAdapter): NumberValueSource & Column - protected column(type: 'bigint', adapter?: TypeAdapter): BigintValueSource & Column - protected column(type: 'double', adapter?: TypeAdapter): NumberValueSource & Column - protected column(type: 'string', adapter?: TypeAdapter): StringValueSource & Column - protected column(type: 'uuid', adapter?: TypeAdapter): UuidValueSource & Column - protected column(type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & Column - protected column(type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & Column - protected column(type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & Column - protected column(type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & Column - protected column(type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & Column - protected column(type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & Column - protected column(type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & Column - protected column(type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column - protected column(type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column - protected column(type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & Column - protected column(type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & Column - protected column(type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & Column - protected column(type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & Column - protected column(type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & Column - protected column(type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column - protected column(type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column - protected column(type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & Column - protected column(type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & Column */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected column(type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & Column + protected column(type: 'int', adapter?: TypeAdapter): NumberValueSource & Column + protected column(type: 'bigint', adapter?: TypeAdapter): BigintValueSource & Column + protected column(type: 'double', adapter?: TypeAdapter): NumberValueSource & Column + protected column(type: 'string', adapter?: TypeAdapter): StringValueSource & Column + protected column(type: 'uuid', adapter?: TypeAdapter): UuidValueSource & Column + protected column(type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & Column + protected column(type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & Column + protected column(type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & Column + protected column(type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & Column + protected column(type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & Column + protected column(type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & Column + protected column(type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & Column + protected column(type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column + protected column(type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column + protected column(type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & Column + protected column(type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & Column + protected column(type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & Column + protected column(type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & Column + protected column(type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & Column + protected column(type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column + protected column(type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column + protected column(type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & Column + protected column(type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & Column */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return new ColumnImpl(this, '', type as ValueType, adapter, adapter2) } return new ColumnImpl(this, '', type as ValueType, type, adapter) } - protected optionalColumn(type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn - protected optionalColumn(type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn - protected optionalColumn(type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn - protected optionalColumn(type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn - protected optionalColumn(type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn - protected optionalColumn(type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn - protected optionalColumn(type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn - protected optionalColumn(type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn - protected optionalColumn(type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn - protected optionalColumn(type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn - protected optionalColumn(type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn - protected optionalColumn(type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn - protected optionalColumn(type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn - protected optionalColumn(type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn - protected optionalColumn(type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn - protected optionalColumn(type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn - protected optionalColumn(type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn - protected optionalColumn(type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn - protected optionalColumn(type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn - protected optionalColumn(type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn - protected optionalColumn(type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn - protected optionalColumn(type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn - protected optionalColumn(type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn - protected optionalColumn(type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected optionalColumn(type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn + protected optionalColumn(type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn + protected optionalColumn(type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn + protected optionalColumn(type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn + protected optionalColumn(type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn + protected optionalColumn(type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn + protected optionalColumn(type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn + protected optionalColumn(type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn + protected optionalColumn(type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn + protected optionalColumn(type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn + protected optionalColumn(type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn + protected optionalColumn(type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn + protected optionalColumn(type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn + protected optionalColumn(type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn + protected optionalColumn(type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn + protected optionalColumn(type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn + protected optionalColumn(type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn + protected optionalColumn(type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn + protected optionalColumn(type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn + protected optionalColumn(type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn + protected optionalColumn(type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn + protected optionalColumn(type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn + protected optionalColumn(type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn + protected optionalColumn(type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, '', type as ValueType, adapter, adapter2)).__asOptionalColumn() } return (new ColumnImpl(this, '', type as ValueType, type, adapter)).__asOptionalColumn() } - protected virtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource - protected virtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected virtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource - protected virtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected virtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression) => IStringValueSource, adapter?: TypeAdapter): StringValueSource - protected virtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource - protected virtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource - protected virtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource - protected virtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected virtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected virtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected virtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected virtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected virtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected virtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected virtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected virtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected virtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected virtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected virtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression, 'required'>) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource + protected virtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression, 'required'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected virtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression, 'required'>) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource + protected virtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression, 'required'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected virtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression, 'required'>) => IStringValueSource, adapter?: TypeAdapter): StringValueSource + protected virtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression, 'required'>) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource + protected virtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression, 'required'>) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource + protected virtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression, 'required'>) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource + protected virtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression, 'required'>) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected virtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected virtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected virtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected virtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression, T, TYPE_NAME, 'required'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected virtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression, T, T, 'required'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected virtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression, T, T, 'required'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected virtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression, T, T, 'required'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected virtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression, T, T, 'required'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected virtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression, T, T, 'required'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, T, 'required'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression, T, T, 'required'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected virtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof arg1 === 'string') { const fragmentBuilder = new FragmentQueryBuilder(type as ValueType, arg1, 'required', arg3) return new ValueSourceFromBuilder(arg2 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, arg1, 'required', arg3) @@ -172,34 +170,34 @@ class ValuesOf> implements IValues { return new ValueSourceFromBuilder(arg1 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, type, 'required', arg2 as TypeAdapter | undefined) } - protected optionalVirtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource - protected optionalVirtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected optionalVirtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource - protected optionalVirtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected optionalVirtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression) => IStringValueSource, adapter?: TypeAdapter): StringValueSource - protected optionalVirtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource - protected optionalVirtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected optionalVirtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected optionalVirtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression, 'optional'>) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource + protected optionalVirtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression, 'optional'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected optionalVirtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression, 'optional'>) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource + protected optionalVirtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression, 'optional'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected optionalVirtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression, 'optional'>) => IStringValueSource, adapter?: TypeAdapter): StringValueSource + protected optionalVirtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression, 'optional'>) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource + protected optionalVirtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression, 'optional'>) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression, 'optional'>) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression, 'optional'>) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression, T, TYPE_NAME, 'optional'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression, T, T, 'optional'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression, T, T, 'optional'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression, T, T, 'optional'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression, T, T, 'optional'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression, T, T, 'optional'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, T, 'optional'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression, T, T, 'optional'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected optionalVirtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof arg1 === 'string') { const fragmentBuilder = new FragmentQueryBuilder(type as ValueType, arg1, 'optional', arg3) return new ValueSourceFromBuilder(arg2 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, arg1, 'optional', arg3) @@ -219,23 +217,23 @@ class ValuesOf> implements IValues { } // @ts-ignore - private __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + private __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { requiredTablesOrViews.add(this) __registerTableOrView(this.__template, sqlBuilder, requiredTablesOrViews) } // @ts-ignore - private __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + private __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { __registerRequiredColumn(this.__template, sqlBuilder, requiredColumns, onlyForTablesOrViews) } // @ts-ignore - private __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + private __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } // @ts-ignore - private __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + private __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } @@ -256,17 +254,17 @@ class ValuesOf> implements IValues { } // @ts-ignore - private __getTableOrView(): ITableOrView { + private __getTableOrView(): AnyTableOrView { return this } } -export class Values, NAME extends string> extends ValuesOf> { +export class Values>, /*in|out*/ NAME extends string> extends ValuesOf> { constructor(name: NAME, values: OpaqueValues) { super(name, values as any) } - static create>(type: new (name: T[typeof viewName], values: OpaqueValues) => T, name: T[typeof viewName], values: Array>): T { + static create>(type: new (name: NGetNameFrom, values: OpaqueValues) => T, name: NGetNameFrom, values: Array | T, undefined>>): T { if (values.length <= 0) { throw new Error('Values requires at least one element in the list') } diff --git a/src/View.ts b/src/View.ts index eaed38dd..c3b2d4a8 100644 --- a/src/View.ts +++ b/src/View.ts @@ -1,23 +1,21 @@ import { BooleanValueSource, NumberValueSource, StringValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, EqualableValueSource, ComparableValueSource, BigintValueSource, __getValueSourceOfObject, __getValueSourcePrivate, UuidValueSource, IBooleanValueSource, INumberValueSource, IBigintValueSource, IStringValueSource, IUuidValueSource, ILocalDateValueSource, ILocalTimeValueSource, ILocalDateTimeValueSource, IEqualableValueSource, IComparableValueSource, AnyValueSource, ValueType, CustomIntValueSource, CustomDoubleValueSource, CustomUuidValueSource, CustomLocalDateTimeValueSource, ICustomIntValueSource, ICustomDoubleValueSource, ICustomUuidValueSource, ICustomLocalDateValueSource, ICustomLocalTimeValueSource, ICustomLocalDateTimeValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource } from "./expressions/values" import { HasIsValue, IView, IWithView, __addWiths, __registerRequiredColumn, __registerTableOrView } from "./utils/ITableOrView" import type { TypeAdapter } from "./TypeAdapter" -import type { AliasedTableOrView, OuterJoinSourceOf } from "./utils/tableOrViewUtils" +import type { AliasedTableOrView, AsAliasedForUseInLeftJoin, AsForUseInLeftJoin } from "./utils/tableOrViewUtils" import { Column, OptionalColumn } from "./utils/Column" -import type { AnyDB } from "./databases" import { ColumnImpl } from "./internal/ColumnImpl" -import { database, tableOrViewRef, type, viewName } from "./utils/symbols" +import { connection, isTableOrViewObject, source, type } from "./utils/symbols" import { IConnection } from "./utils/IConnection" -import { RawFragment } from "./utils/RawFragment" -import type { VIEW } from "./typeMarks/VIEW" +import type { RawFragment } from "./utils/RawFragment" import type { BigintFragmentExpression, BooleanFragmentExpression, ComparableFragmentExpression, CustomDoubleFragmentExpression, CustomIntFragmentExpression, CustomLocalDateFragmentExpression, CustomLocalDateTimeFragmentExpression, CustomLocalTimeFragmentExpression, CustomUuidFragmentExpression, LocalDateFragmentExpression, LocalDateTimeFragmentExpression, EqualableFragmentExpression, NumberFragmentExpression, StringFragmentExpression, LocalTimeFragmentExpression, UuidFragmentExpression } from "./expressions/fragment" import { ValueSourceFromBuilder } from "./internal/ValueSourceImpl" import { FragmentQueryBuilder } from "./queryBuilders/FragmentQueryBuilder" +import { NNoTableOrViewRequiredFrom, NView } from "./utils/sourceName" -class ViewOf> implements IView { - [database]!: REF[typeof database] +class ViewOf> implements IView { + [isTableOrViewObject]: true = true; + [source]!: SOURCE [type]!: 'view' - [viewName]!: REF[typeof viewName] - [tableOrViewRef]!: REF /* implements __ITableOrViewPrivate as private members*/ // @ts-ignore private __name: string @@ -39,10 +37,10 @@ class ViewOf> implements IView { result.__as = as return result as any } - forUseInLeftJoin(): OuterJoinSourceOf { - return this.forUseInLeftJoinAs('') + forUseInLeftJoin(): AsForUseInLeftJoin { + return this.forUseInLeftJoinAs('') as any } - forUseInLeftJoinAs(as: ALIAS): OuterJoinSourceOf { + forUseInLeftJoinAs(as: ALIAS): AsAliasedForUseInLeftJoin { const result = new ((this as any).constructor)() as ViewOf result.__as = as result.__forUseInLeftJoin = true @@ -58,102 +56,102 @@ class ViewOf> implements IView { return result as any } - protected column(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & Column - protected column(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & Column - protected column(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & Column - protected column(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & Column - protected column(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & Column - protected column(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & Column - protected column(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & Column - protected column(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & Column - protected column(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & Column - protected column(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & Column - protected column(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & Column - protected column(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & Column - protected column(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & Column - protected column(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column - protected column(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column - protected column(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & Column - protected column(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & Column - protected column(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & Column - protected column(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & Column - protected column(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & Column - protected column(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column - protected column(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column - protected column(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column - protected column(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & Column - protected column(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & Column */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected column(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & Column + protected column(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & Column + protected column(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & Column + protected column(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & Column + protected column(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & Column + protected column(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & Column + protected column(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & Column + protected column(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & Column + protected column(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & Column + protected column(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & Column + protected column(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & Column + protected column(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & Column + protected column(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & Column + protected column(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column + protected column(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column + protected column(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & Column + protected column(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & Column + protected column(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & Column + protected column(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & Column + protected column(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & Column + protected column(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & Column + protected column(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & Column + protected column(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & Column + protected column(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & Column + protected column(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & Column */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return new ColumnImpl(this, name, type as ValueType, adapter, adapter2) } return new ColumnImpl(this, name, type as ValueType, type, adapter) } - protected optionalColumn(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn - protected optionalColumn(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn - protected optionalColumn(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected optionalColumn(name: string, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'int', adapter?: TypeAdapter): NumberValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'bigint', adapter?: TypeAdapter): BigintValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'double', adapter?: TypeAdapter): NumberValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'string', adapter?: TypeAdapter): StringValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource & OptionalColumn + protected optionalColumn(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource & OptionalColumn + protected optionalColumn(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource & OptionalColumn */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return (new ColumnImpl(this, name, type as ValueType, adapter, adapter2)).__asOptionalColumn() } return (new ColumnImpl(this, name, type as ValueType, type, adapter)).__asOptionalColumn() } - protected virtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource - protected virtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected virtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource - protected virtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected virtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression) => IStringValueSource, adapter?: TypeAdapter): StringValueSource - protected virtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource - protected virtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource - protected virtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource - protected virtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected virtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected virtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected virtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected virtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected virtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected virtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected virtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected virtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected virtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected virtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected virtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected virtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected virtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression, 'required'>) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource + protected virtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression, 'required'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected virtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression, 'required'>) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource + protected virtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression, 'required'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected virtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression, 'required'>) => IStringValueSource, adapter?: TypeAdapter): StringValueSource + protected virtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression, 'required'>) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource + protected virtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression, 'required'>) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource + protected virtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression, 'required'>) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource + protected virtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression, 'required'>) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected virtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected virtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected virtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected virtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, TYPE_NAME, 'required'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression, T, TYPE_NAME, 'required'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected virtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression, T, T, 'required'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected virtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression, T, T, 'required'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected virtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression, T, T, 'required'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected virtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression, T, T, 'required'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected virtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression, T, T, 'required'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected virtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, T, 'required'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected virtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'required'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected virtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression, T, T, 'required'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected virtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof arg1 === 'string') { const fragmentBuilder = new FragmentQueryBuilder(type as ValueType, arg1, 'required', arg3) return new ValueSourceFromBuilder(arg2 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, arg1, 'required', arg3) @@ -162,34 +160,34 @@ class ViewOf> implements IView { return new ValueSourceFromBuilder(arg1 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, type, 'required', arg2 as TypeAdapter | undefined) } - protected optionalVirtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource - protected optionalVirtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected optionalVirtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource - protected optionalVirtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource - protected optionalVirtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression) => IStringValueSource, adapter?: TypeAdapter): StringValueSource - protected optionalVirtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource - protected optionalVirtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource - protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource - protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource - protected optionalVirtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource - protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource - protected optionalVirtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) + protected optionalVirtualColumnFromFragment(type: 'boolean', fn: (fragment: BooleanFragmentExpression, 'optional'>) => IBooleanValueSource, adapter?: TypeAdapter): BooleanValueSource + protected optionalVirtualColumnFromFragment(type: 'int', fn: (fragment: NumberFragmentExpression, 'optional'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected optionalVirtualColumnFromFragment(type: 'bigint', fn: (fragment: BigintFragmentExpression, 'optional'>) => IBigintValueSource, adapter?: TypeAdapter): BigintValueSource + protected optionalVirtualColumnFromFragment(type: 'double', fn: (fragment: NumberFragmentExpression, 'optional'>) => INumberValueSource, adapter?: TypeAdapter): NumberValueSource + protected optionalVirtualColumnFromFragment(type: 'string', fn: (fragment: StringFragmentExpression, 'optional'>) => IStringValueSource, adapter?: TypeAdapter): StringValueSource + protected optionalVirtualColumnFromFragment(type: 'uuid', fn: (fragment: UuidFragmentExpression, 'optional'>) => IUuidValueSource, adapter?: TypeAdapter): UuidValueSource + protected optionalVirtualColumnFromFragment(type: 'localDate', fn: (fragment: LocalDateFragmentExpression, 'optional'>) => ILocalDateValueSource, adapter?: TypeAdapter): LocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'localTime', fn: (fragment: LocalTimeFragmentExpression, 'optional'>) => ILocalTimeValueSource, adapter?: TypeAdapter): LocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'localDateTime', fn: (fragment: LocalDateTimeFragmentExpression, 'optional'>) => ILocalDateTimeValueSource, adapter?: TypeAdapter): LocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: TYPE_NAME, fn: (fragment: CustomIntFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: TYPE_NAME, fn: (fragment: CustomDoubleFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: TYPE_NAME, fn: (fragment: CustomUuidFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalTimeFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: TYPE_NAME, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, TYPE_NAME, 'optional'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'enum', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'custom', typeName: TYPE_NAME, fn: (fragment: EqualableFragmentExpression, T, TYPE_NAME, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: TYPE_NAME, fn: (fragment: ComparableFragmentExpression, T, TYPE_NAME, 'optional'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected optionalVirtualColumnFromFragment(type: 'customInt', typeName: string, fn: (fragment: CustomIntFragmentExpression, T, T, 'optional'>) => ICustomIntValueSource, adapter?: TypeAdapter): CustomIntValueSource + protected optionalVirtualColumnFromFragment(type: 'customDouble', typeName: string, fn: (fragment: CustomDoubleFragmentExpression, T, T, 'optional'>) => ICustomDoubleValueSource, adapter?: TypeAdapter): CustomDoubleValueSource + protected optionalVirtualColumnFromFragment(type: 'customUuid', typeName: string, fn: (fragment: CustomUuidFragmentExpression, T, T, 'optional'>) => ICustomUuidValueSource, adapter?: TypeAdapter): CustomUuidValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDate', typeName: string, fn: (fragment: CustomLocalDateFragmentExpression, T, T, 'optional'>) => ICustomLocalDateValueSource, adapter?: TypeAdapter): CustomLocalDateValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalTime', typeName: string, fn: (fragment: CustomLocalTimeFragmentExpression, T, T, 'optional'>) => ICustomLocalTimeValueSource, adapter?: TypeAdapter): CustomLocalTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'customLocalDateTime', typeName: string, fn: (fragment: CustomLocalDateTimeFragmentExpression, T, T, 'optional'>) => ICustomLocalDateTimeValueSource, adapter?: TypeAdapter): CustomLocalDateTimeValueSource + protected optionalVirtualColumnFromFragment(type: 'enum', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'custom', typeName: string, fn: (fragment: EqualableFragmentExpression, T, T, 'optional'>) => IEqualableValueSource, adapter?: TypeAdapter): EqualableValueSource + protected optionalVirtualColumnFromFragment(type: 'customComparable', typeName: string, fn: (fragment: ComparableFragmentExpression, T, T, 'optional'>) => IComparableValueSource, adapter?: TypeAdapter): ComparableValueSource + protected optionalVirtualColumnFromFragment(type: string, arg1: any, arg2?: any, arg3?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof arg1 === 'string') { const fragmentBuilder = new FragmentQueryBuilder(type as ValueType, arg1, 'optional', arg3) return new ValueSourceFromBuilder(arg2 as (fragment: any) => AnyValueSource, fragmentBuilder, type as ValueType, arg1, 'optional', arg3) @@ -230,7 +228,7 @@ class ViewOf> implements IView { } } -export class View, NAME extends string> extends ViewOf> { +export class View, NAME extends string> extends ViewOf> { constructor(name: string) { super(name) } diff --git a/src/connections/AbstractAdvancedConnection.ts b/src/connections/AbstractAdvancedConnection.ts index b84c9918..b1d90ea7 100644 --- a/src/connections/AbstractAdvancedConnection.ts +++ b/src/connections/AbstractAdvancedConnection.ts @@ -1,46 +1,45 @@ -import type { AnyDB } from "../databases" import type { SqlBuilder } from "../sqlBuilders/SqlBuilder" import type { TypeAdapter } from "../TypeAdapter" import type { BooleanValueSource, NumberValueSource, StringValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, EqualableValueSource, ComparableValueSource, BigintValueSource, UuidValueSource, ValueType, CustomIntValueSource, CustomDoubleValueSource, CustomUuidValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource, CustomLocalDateTimeValueSource } from "../expressions/values" import type { QueryRunner } from "../queryRunners/QueryRunner" import type { Sequence } from "../expressions/sequence"; -import type { NoTableOrViewRequired } from "../utils/ITableOrView" import { AbstractConnection } from "./AbstractConnection" import { SequenceQueryBuilder } from "../queryBuilders/SequenceQueryBuilder" +import type { NDB, NNoTableOrViewRequired } from "../utils/sourceName" -export abstract class AbstractAdvancedConnection extends AbstractConnection { +export abstract class AbstractAdvancedConnection extends AbstractConnection { constructor(queryRunner: QueryRunner, sqlBuilder: SqlBuilder) { super(queryRunner, sqlBuilder) } - protected sequence(name: string, type: 'boolean', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'int', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'bigint', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'double', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'string', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'uuid', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'localDate', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'localTime', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'localDateTime', adapter?: TypeAdapter): Sequence, 'required'>> - protected sequence(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> - protected sequence(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> - protected sequence(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> - protected sequence(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> - protected sequence(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> - protected sequence(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> - protected sequence(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> - protected sequence(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> - protected sequence(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> - protected sequence(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'boolean', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'int', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'bigint', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'double', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'string', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'uuid', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'localDate', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'localTime', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'localDateTime', adapter?: TypeAdapter): Sequence, 'required'>> + protected sequence(name: string, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): Sequence, T, TYPE_NAME, 'required'>> + protected sequence(name: string, type: 'customInt', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'customDouble', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'customUuid', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'enum', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'custom', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> + protected sequence(name: string, type: 'customComparable', typeName: string, adapter?: TypeAdapter): Sequence, T, T, 'required'>> protected sequence<_T>(name: string, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): Sequence { if (typeof adapter === 'string') { return new SequenceQueryBuilder(name, type as ValueType, adapter, adapter2) diff --git a/src/connections/AbstractConnection.ts b/src/connections/AbstractConnection.ts index f9bc42e5..1d547adf 100644 --- a/src/connections/AbstractConnection.ts +++ b/src/connections/AbstractConnection.ts @@ -2,15 +2,14 @@ import type { SqlBuilder } from "../sqlBuilders/SqlBuilder" import type { InsertExpression } from "../expressions/insert" import type { UpdateExpression, UpdateExpressionAllowingNoWhere } from "../expressions/update" import type { DeleteExpression, DeleteExpressionAllowingNoWhere } from "../expressions/delete" -import type { BooleanValueSource, NumberValueSource, StringValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, EqualableValueSource, ComparableValueSource, IfValueSource, IComparableValueSource, INumberValueSource, IStringValueSource, IExecutableSelectQuery, BigintValueSource, IBigintValueSource, AlwaysIfValueSource, ValueSourceOf, ValueSourceOfDB, RemapValueSourceTypeWithOptionalType, IValueSource, UuidValueSource, IExecutableInsertQuery, IExecutableUpdateQuery, IExecutableDeleteQuery, AggregatedArrayValueSourceProjectableAsNullable, AggregatedArrayValueSource, ValueType, CustomIntValueSource, CustomDoubleValueSource, CustomUuidValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource, CustomLocalDateTimeValueSource, ICustomIntValueSource, ICustomDoubleValueSource } from "../expressions/values" +import type { BooleanValueSource, NumberValueSource, StringValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, EqualableValueSource, ComparableValueSource, IfValueSource, IComparableValueSource, INumberValueSource, IStringValueSource, IExecutableSelectQuery, BigintValueSource, IBigintValueSource, AlwaysIfValueSource, ValueSourceOf, RemapValueSourceTypeWithOptionalType, IValueSource, UuidValueSource, IExecutableInsertQuery, IExecutableUpdateQuery, IExecutableDeleteQuery, AggregatedArrayValueSourceProjectableAsNullable, AggregatedArrayValueSource, ValueType, CustomIntValueSource, CustomDoubleValueSource, CustomUuidValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource, CustomLocalDateTimeValueSource, ICustomIntValueSource, ICustomDoubleValueSource, AnyValueSource } from "../expressions/values" import type { Default } from "../expressions/Default" -import { ITableOrViewRef, NoTableOrViewRequired, NoTableOrViewRequiredView, ITableOf, ITableOrViewOf, ITableOrView, __getTableOrViewPrivate, OuterJoinSource } from "../utils/ITableOrView" +import { NoTableOrViewRequired, ITableOrView, __getTableOrViewPrivate, ITable, SameDB, HasSource, ForUseInLeftJoin } from "../utils/ITableOrView" import type { SelectExpression, SelectExpressionFromNoTable, SelectExpressionSubquery } from "../expressions/select" import type { TypeAdapter, DefaultTypeAdapter } from "../TypeAdapter" import type { QueryRunner } from "../queryRunners/QueryRunner" import type { IConnection } from "../utils/IConnection" import type { BooleanFragmentExpression, NumberFragmentExpression, StringFragmentExpression, LocalDateFragmentExpression, LocalTimeFragmentExpression, LocalDateTimeFragmentExpression, EqualableFragmentExpression, ComparableFragmentExpression, FragmentBuilder0, FragmentBuilder1, FragmentBuilder2, FragmentBuilder3, FragmentBuilder4, FragmentBuilder5, FragmentBuilder0IfValue, FragmentBuilder1IfValue, FragmentBuilder2IfValue, FragmentBuilder3IfValue, FragmentBuilder4IfValue, FragmentBuilder5IfValue, BigintFragmentExpression, UuidFragmentExpression, CustomIntFragmentExpression, CustomDoubleFragmentExpression, CustomUuidFragmentExpression, CustomLocalDateFragmentExpression, CustomLocalTimeFragmentExpression, CustomLocalDateTimeFragmentExpression, FragmentBuilderMaybeOptional0, FragmentBuilderMaybeOptional1, FragmentBuilderMaybeOptional2, FragmentBuilderMaybeOptional3, FragmentBuilderMaybeOptional4, FragmentBuilderMaybeOptional5 } from "../expressions/fragment" -import type { AnyDB } from "../databases" import { InsertQueryBuilder } from "../queryBuilders/InsertQueryBuilder" import { UpdateQueryBuilder } from "../queryBuilders/UpdateQueryBuilder" import { DeleteQueryBuilder } from "../queryBuilders/DeleteQueryBuilder" @@ -21,19 +20,19 @@ import { SelectQueryBuilder } from "../queryBuilders/SelectQueryBuilder" import ChainedError from "chained-error" import { FragmentQueryBuilder, FragmentFunctionBuilder, FragmentFunctionBuilderIfValue, FragmentFunctionBuilderMaybeOptional } from "../queryBuilders/FragmentQueryBuilder" import { attachSource, attachTransactionSource } from "../utils/attachSource" -import { database, outerJoinAlias, outerJoinTableOrView, tableOrView, tableOrViewRef, transactionIsolationLevel, type, valueSourceTypeName, valueType } from "../utils/symbols" +import { connection, source, transactionIsolationLevel, typeName, valueType } from "../utils/symbols" import { callDeferredFunctions, callDeferredFunctionsStoppingOnError, isPromise } from "../utils/PromiseUtils" -import { DinamicConditionExtension, DynamicConditionExpression, Filterable } from "../expressions/dynamicConditionUsingFilters" +import type { DinamicConditionExtension, DynamicConditionExpression, Filterable } from "../expressions/dynamicConditionUsingFilters" import { DynamicConditionBuilder } from "../queryBuilders/DynamicConditionBuilder" -import { RawFragment } from "../utils/RawFragment" +import type { RawFragment } from "../utils/RawFragment" import { RawFragmentImpl } from "../internal/RawFragmentImpl" -import { CustomizedTableOrView, OuterJoinTableOrView } from "../utils/tableOrViewUtils" -import { InnerResultNullableObjectValuesForAggregatedArray, InnerResultObjectValuesForAggregatedArray } from "../utils/resultUtils" +import type { CustomizedTableOrView } from "../utils/tableOrViewUtils" +import type { InnerResultNullableObjectValuesForAggregatedArray, InnerResultObjectValuesForAggregatedArray } from "../utils/resultUtils" import { __setQueryMetadata } from "../queryBuilders/AbstractQueryBuilder" +import type { NDB, NNoTableOrViewRequired, NSource, NWithDB } from "../utils/sourceName" -export abstract class AbstractConnection implements IConnection { - [database]!: DB - [type]!: 'Connection' +export abstract class AbstractConnection implements IConnection { + [connection]!: DB protected __sqlBuilder: SqlBuilder protected allowEmptyString: boolean = false @@ -291,42 +290,46 @@ export abstract class AbstractConnection implements IConnectio return this.queryRunner.isTransactionActive() } - insertInto>(table: TABLE): InsertExpression
{ + insertInto>(table: T & SameDB): InsertExpression | T> { return new InsertQueryBuilder(this.__sqlBuilder, table) as any } - update
>(table: TABLE): UpdateExpression { + update>(table: T & SameDB): UpdateExpression | T> { return new UpdateQueryBuilder(this.__sqlBuilder, table, false) as any } - updateAllowingNoWhere
>(table: TABLE): UpdateExpressionAllowingNoWhere { + updateAllowingNoWhere>(table: T & SameDB): UpdateExpressionAllowingNoWhere | T> { return new UpdateQueryBuilder(this.__sqlBuilder, table, true) as any } - deleteFrom
>(table: TABLE): DeleteExpression { + deleteFrom>(table: T & SameDB): DeleteExpression | T> { return new DeleteQueryBuilder(this.__sqlBuilder, table, false) as any } - deleteAllowingNoWhereFrom
>(table: TABLE): DeleteExpressionAllowingNoWhere { + deleteAllowingNoWhereFrom>(table: T & SameDB): DeleteExpressionAllowingNoWhere | T> { return new DeleteQueryBuilder(this.__sqlBuilder, table, true) as any } - selectFrom>(table: TABLE_OR_VIEW): SelectExpression, never> { + selectFrom>(table: T & SameDB): SelectExpression, NoTableOrViewRequired, never> { return new SelectQueryBuilder(this.__sqlBuilder, [table], false) as any // cast to any to improve typescript performace } - selectDistinctFrom>(table: TABLE_OR_VIEW): SelectExpression, 'distinct'> { + selectDistinctFrom>(table: T & SameDB): SelectExpression, NoTableOrViewRequired, 'distinct'> { return new SelectQueryBuilder(this.__sqlBuilder, [table], true) as any // cast to any to improve typescript performace } - selectFromNoTable(): SelectExpressionFromNoTable { + selectFromNoTable(): SelectExpressionFromNoTable, NoTableOrViewRequired, never> { return new SelectQueryBuilder(this.__sqlBuilder, [], false) as any // cast to any to improve typescript performace } - subSelectUsing | OuterJoinSource, any>>(table: TABLE_OR_VIEW): SelectExpressionSubquery ? OuterJoinTableOrView : TABLE_OR_VIEW, never> - subSelectUsing | OuterJoinSource, any>, TABLE_OR_VIEW2 extends ITableOrViewOf | OuterJoinSource, any>>(table1: TABLE_OR_VIEW1, table2: TABLE_OR_VIEW2): SelectExpressionSubquery ? OuterJoinTableOrView : TABLE_OR_VIEW1) | (TABLE_OR_VIEW2 extends OuterJoinSource ? OuterJoinTableOrView : TABLE_OR_VIEW2), never> - subSelectUsing | OuterJoinSource, any>, TABLE_OR_VIEW2 extends ITableOrViewOf | OuterJoinSource, any>, TABLE_OR_VIEW3 extends ITableOrViewOf | OuterJoinSource, any> | OuterJoinSource, any>>(table1: TABLE_OR_VIEW1, table2: TABLE_OR_VIEW2, table3: TABLE_OR_VIEW3): SelectExpressionSubquery ? OuterJoinTableOrView : TABLE_OR_VIEW1) | (TABLE_OR_VIEW2 extends OuterJoinSource ? OuterJoinTableOrView : TABLE_OR_VIEW2) | (TABLE_OR_VIEW3 extends OuterJoinSource ? OuterJoinTableOrView : TABLE_OR_VIEW3), never> - subSelectUsing(...tables: any[]): SelectExpressionSubquery { + subSelectUsing | ForUseInLeftJoin>(table: T & SameDB): SelectExpressionSubquery, T | NoTableOrViewRequired, never> + subSelectUsing | ForUseInLeftJoin, T2 extends ITableOrView | ForUseInLeftJoin>(table1: T1 & SameDB, table2: T2 & SameDB): SelectExpressionSubquery, T1 | T2 | NoTableOrViewRequired, never> + subSelectUsing | ForUseInLeftJoin, T2 extends ITableOrView | ForUseInLeftJoin, T3 extends ITableOrView | ForUseInLeftJoin>(table1: T1 & SameDB, table2: T2 & SameDB, table3: T3 & SameDB): SelectExpressionSubquery, T1 | T2 | T3 | NoTableOrViewRequired, never> + subSelectUsing | ForUseInLeftJoin, T2 extends ITableOrView | ForUseInLeftJoin, T3 extends ITableOrView | ForUseInLeftJoin, T4 extends ITableOrView | ForUseInLeftJoin>(table1: T1 & SameDB, table2: T2 & SameDB, table3: T3 & SameDB, table4: T4 & SameDB): SelectExpressionSubquery, T1 | T2 | T3 | T4 | NoTableOrViewRequired, never> + subSelectUsing | ForUseInLeftJoin, T2 extends ITableOrView | ForUseInLeftJoin, T3 extends ITableOrView | ForUseInLeftJoin, T4 extends ITableOrView | ForUseInLeftJoin, T5 extends ITableOrView | ForUseInLeftJoin>(table1: T1 & SameDB, table2: T2 & SameDB, table3: T3 & SameDB, table4: T4 & SameDB, table5: T4 & SameDB): SelectExpressionSubquery, T1 | T2 | T3 | T4 | T5 | NoTableOrViewRequired, never> + subSelectUsing(...tables: any[]): SelectExpressionSubquery { const result = new SelectQueryBuilder(this.__sqlBuilder, [], false) result.__subSelectUsing = tables return result as any // cast to any to improve typescript performace } - subSelectDistinctUsing | OuterJoinSource, any>>(table: TABLE_OR_VIEW): SelectExpressionSubquery ? OuterJoinTableOrView : TABLE_OR_VIEW, 'distinct'> - subSelectDistinctUsing | OuterJoinSource, any> | OuterJoinSource, any>, TABLE_OR_VIEW2 extends ITableOrViewOf | OuterJoinSource, any>>(table1: TABLE_OR_VIEW1, table2: TABLE_OR_VIEW2): SelectExpressionSubquery ? OuterJoinTableOrView : TABLE_OR_VIEW1) | (TABLE_OR_VIEW2 extends OuterJoinSource ? OuterJoinTableOrView : TABLE_OR_VIEW2), 'distinct'> - subSelectDistinctUsing | OuterJoinSource, any> | OuterJoinSource, any>, TABLE_OR_VIEW2 extends ITableOrViewOf | OuterJoinSource, any>, TABLE_OR_VIEW3 extends ITableOrViewOf | OuterJoinSource, any>>(table1: TABLE_OR_VIEW1, table2: TABLE_OR_VIEW2, table3: TABLE_OR_VIEW3): SelectExpressionSubquery ? OuterJoinTableOrView : TABLE_OR_VIEW1) | (TABLE_OR_VIEW2 extends OuterJoinSource ? OuterJoinTableOrView : TABLE_OR_VIEW2) | (TABLE_OR_VIEW3 extends OuterJoinSource ? OuterJoinTableOrView : TABLE_OR_VIEW3), 'distinct'> - subSelectDistinctUsing(...tables: any[]): SelectExpressionSubquery { + subSelectDistinctUsing | ForUseInLeftJoin>(table: T & SameDB): SelectExpressionSubquery, T | NoTableOrViewRequired, 'distinct'> + subSelectDistinctUsing | ForUseInLeftJoin, T2 extends ITableOrView | ForUseInLeftJoin>(table1: T1 & SameDB, table2: T2 & SameDB): SelectExpressionSubquery, T1 | T2 | NoTableOrViewRequired, 'distinct'> + subSelectDistinctUsing | ForUseInLeftJoin, T2 extends ITableOrView | ForUseInLeftJoin, T3 extends ITableOrView | ForUseInLeftJoin>(table1: T1 & SameDB, table2: T2 & SameDB, table3: T3 & SameDB): SelectExpressionSubquery, T1 | T2 | T3 | NoTableOrViewRequired, 'distinct'> + subSelectDistinctUsing | ForUseInLeftJoin, T2 extends ITableOrView | ForUseInLeftJoin, T3 extends ITableOrView | ForUseInLeftJoin, T4 extends ITableOrView | ForUseInLeftJoin>(table1: T1 & SameDB, table2: T2 & SameDB, table3: T3 & SameDB, table4: T4 & SameDB): SelectExpressionSubquery, T1 | T2 | T3 | T4 | NoTableOrViewRequired, 'distinct'> + subSelectDistinctUsing | ForUseInLeftJoin, T2 extends ITableOrView | ForUseInLeftJoin, T3 extends ITableOrView | ForUseInLeftJoin, T4 extends ITableOrView | ForUseInLeftJoin, T5 extends ITableOrView | ForUseInLeftJoin>(table1: T1 & SameDB, table2: T2 & SameDB, table3: T3 & SameDB, table4: T4 & SameDB, table5: T4 & SameDB): SelectExpressionSubquery, T1 | T2 | T3 | T4 | T5 | NoTableOrViewRequired, 'distinct'> + subSelectDistinctUsing(...tables: any[]): SelectExpressionSubquery { const result = new SelectQueryBuilder(this.__sqlBuilder, [], false) result.__subSelectUsing = tables return result as any // cast to any to improve typescript performace @@ -335,58 +338,58 @@ export abstract class AbstractConnection implements IConnectio default(): Default { return new DefaultImpl() } - pi(): NumberValueSource, 'required'> + pi(): NumberValueSource, 'required'> pi(): any { return new SqlOperationStatic0ValueSource('_pi', 'double', 'double', 'required', undefined) } - random(): NumberValueSource, 'required'> + random(): NumberValueSource, 'required'> random(): any { return new SqlOperationStatic0ValueSource('_random', 'double', 'double', 'required', undefined) } - currentDate(): LocalDateValueSource, 'required'> + currentDate(): LocalDateValueSource, 'required'> currentDate(): any { return new SqlOperationStatic0ValueSource('_currentDate', 'localDate', 'localDate', 'required', undefined) } - currentTime(): LocalTimeValueSource, 'required'> + currentTime(): LocalTimeValueSource, 'required'> currentTime(): any { return new SqlOperationStatic0ValueSource('_currentTime', 'localTime', 'localTime', 'required', undefined) } - currentDateTime(): LocalDateTimeValueSource, 'required'> + currentDateTime(): LocalDateTimeValueSource, 'required'> currentDateTime(): any { return new SqlOperationStatic0ValueSource('_currentTimestamp', 'localDateTime', 'localDateTime', 'required', undefined) } - currentTimestamp(): LocalDateTimeValueSource, 'required'> + currentTimestamp(): LocalDateTimeValueSource, 'required'> currentTimestamp(): any { return new SqlOperationStatic0ValueSource('_currentTimestamp', 'localDateTime', 'localDateTime', 'required', undefined) } - const(value: boolean, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource, 'required'> - const(value: number, type: 'int', adapter?: TypeAdapter): NumberValueSource, 'required'> - const(value: bigint, type: 'bigint', adapter?: TypeAdapter): BigintValueSource, 'required'> - const(value: number, type: 'double', adapter?: TypeAdapter): NumberValueSource, 'required'> - const(value: string, type: 'string', adapter?: TypeAdapter): StringValueSource, 'required'> - const(value: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource, 'required'> - const(value: Date, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource, 'required'> - const(value: Date, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource, 'required'> - const(value: Date, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource, 'required'> - const(value: T, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource, T, TYPE_NAME, 'required'> - const(value: T, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource, T, T, 'required'> - const(value: T, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource, T, T, 'required'> - const(value: T, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource, T, T, 'required'> - const(value: T, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource, T, T, 'required'> - const(value: T, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource, T, T, 'required'> - const(value: T, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource, T, T, 'required'> - const(value: T, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource, T, T, 'required'> - const(value: T, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource, T, T, 'required'> - const(value: T, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource, T, T, 'required'> + const(value: boolean, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource, 'required'> + const(value: number, type: 'int', adapter?: TypeAdapter): NumberValueSource, 'required'> + const(value: bigint, type: 'bigint', adapter?: TypeAdapter): BigintValueSource, 'required'> + const(value: number, type: 'double', adapter?: TypeAdapter): NumberValueSource, 'required'> + const(value: string, type: 'string', adapter?: TypeAdapter): StringValueSource, 'required'> + const(value: string, type: 'uuid', adapter?: TypeAdapter): UuidValueSource, 'required'> + const(value: Date, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource, 'required'> + const(value: Date, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource, 'required'> + const(value: Date, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource, 'required'> + const(value: T, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource, T, TYPE_NAME, 'required'> + const(value: T, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource, T, T, 'required'> + const(value: T, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource, T, T, 'required'> + const(value: T, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource, T, T, 'required'> + const(value: T, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource, T, T, 'required'> + const(value: T, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource, T, T, 'required'> + const(value: T, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource, T, T, 'required'> + const(value: T, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource, T, T, 'required'> + const(value: T, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource, T, T, 'required'> + const(value: T, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource, T, T, 'required'> const(value: any, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return new SqlOperationConstValueSource(value, type as ValueType, adapter, 'required', adapter2) @@ -394,33 +397,33 @@ export abstract class AbstractConnection implements IConnectio return new SqlOperationConstValueSource(value, type as ValueType, type, 'required', adapter) } - optionalConst(value: boolean | null | undefined, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource, 'optional'> - optionalConst(value: number | null | undefined, type: 'int', adapter?: TypeAdapter): NumberValueSource, 'optional'> - optionalConst(value: bigint | null | undefined, type: 'bigint', adapter?: TypeAdapter): BigintValueSource, 'optional'> - optionalConst(value: number | null | undefined, type: 'double', adapter?: TypeAdapter): NumberValueSource, 'optional'> - optionalConst(value: string | null | undefined, type: 'string', adapter?: TypeAdapter): StringValueSource, 'optional'> - optionalConst(value: string | null | undefined, type: 'uuid', adapter?: TypeAdapter): UuidValueSource, 'optional'> - optionalConst(value: Date | null | undefined, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource, 'optional'> - optionalConst(value: Date | null | undefined, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource, 'optional'> - optionalConst(value: Date | null | undefined, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource, 'optional'> - optionalConst(value: T | null | undefined, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource, T, TYPE_NAME, 'optional'> - optionalConst(value: T | null | undefined, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource, T, T, 'optional'> - optionalConst(value: T | null | undefined, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource, T, T, 'optional'> - optionalConst(value: T | null | undefined, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource, T, T, 'optional'> - optionalConst(value: T | null | undefined, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource, T, T, 'optional'> - optionalConst(value: T | null | undefined, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource, T, T, 'optional'> - optionalConst(value: T | null | undefined, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource, T, T, 'optional'> - optionalConst(value: T | null | undefined, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource, T, T, 'optional'> - optionalConst(value: T | null | undefined, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource, T, T, 'optional'> - optionalConst(value: T | null | undefined, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource, T, T, 'optional'> + optionalConst(value: boolean | null | undefined, type: 'boolean', adapter?: TypeAdapter): BooleanValueSource, 'optional'> + optionalConst(value: number | null | undefined, type: 'int', adapter?: TypeAdapter): NumberValueSource, 'optional'> + optionalConst(value: bigint | null | undefined, type: 'bigint', adapter?: TypeAdapter): BigintValueSource, 'optional'> + optionalConst(value: number | null | undefined, type: 'double', adapter?: TypeAdapter): NumberValueSource, 'optional'> + optionalConst(value: string | null | undefined, type: 'string', adapter?: TypeAdapter): StringValueSource, 'optional'> + optionalConst(value: string | null | undefined, type: 'uuid', adapter?: TypeAdapter): UuidValueSource, 'optional'> + optionalConst(value: Date | null | undefined, type: 'localDate', adapter?: TypeAdapter): LocalDateValueSource, 'optional'> + optionalConst(value: Date | null | undefined, type: 'localTime', adapter?: TypeAdapter): LocalTimeValueSource, 'optional'> + optionalConst(value: Date | null | undefined, type: 'localDateTime', adapter?: TypeAdapter): LocalDateTimeValueSource, 'optional'> + optionalConst(value: T | null | undefined, type: 'customInt', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomIntValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'customDouble', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomDoubleValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'customUuid', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomUuidValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'customLocalDate', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'customLocalTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalTimeValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'customLocalDateTime', typeName: TYPE_NAME, adapter?: TypeAdapter): CustomLocalDateTimeValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'enum', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'custom', typeName: TYPE_NAME, adapter?: TypeAdapter): EqualableValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'customComparable', typeName: TYPE_NAME, adapter?: TypeAdapter): ComparableValueSource, T, TYPE_NAME, 'optional'> + optionalConst(value: T | null | undefined, type: 'customInt', typeName: string, adapter?: TypeAdapter): CustomIntValueSource, T, T, 'optional'> + optionalConst(value: T | null | undefined, type: 'customDouble', typeName: string, adapter?: TypeAdapter): CustomDoubleValueSource, T, T, 'optional'> + optionalConst(value: T | null | undefined, type: 'customUuid', typeName: string, adapter?: TypeAdapter): CustomUuidValueSource, T, T, 'optional'> + optionalConst(value: T | null | undefined, type: 'customLocalDate', typeName: string, adapter?: TypeAdapter): CustomLocalDateValueSource, T, T, 'optional'> + optionalConst(value: T | null | undefined, type: 'customLocalTime', typeName: string, adapter?: TypeAdapter): CustomLocalTimeValueSource, T, T, 'optional'> + optionalConst(value: T | null | undefined, type: 'customLocalDateTime', typeName: string, adapter?: TypeAdapter): CustomLocalDateTimeValueSource, T, T, 'optional'> + optionalConst(value: T | null | undefined, type: 'enum', typeName: string, adapter?: TypeAdapter): EqualableValueSource, T, T, 'optional'> + optionalConst(value: T | null | undefined, type: 'custom', typeName: string, adapter?: TypeAdapter): EqualableValueSource, T, T, 'optional'> + optionalConst(value: T | null | undefined, type: 'customComparable', typeName: string, adapter?: TypeAdapter): ComparableValueSource, T, T, 'optional'> optionalConst(value: any, type: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any /* EqualableValueSource */ { // Returns any to avoid: Type instantiation is excessively deep and possibly infinite.ts(2589) if (typeof adapter === 'string') { return new SqlOperationConstValueSource(value, type as ValueType, adapter, 'optional', adapter2) @@ -428,20 +431,20 @@ export abstract class AbstractConnection implements IConnectio return new SqlOperationConstValueSource(value, type as ValueType, type, 'optional', adapter) } - true = NoTableOrViewRequiredView>(): BooleanValueSource { + true(): BooleanValueSource, 'required'> { return new SqlOperationStaticBooleanValueSource('_true') } - false = NoTableOrViewRequiredView>(): BooleanValueSource { + false(): BooleanValueSource, 'required'> { return new SqlOperationStaticBooleanValueSource('_false') } - exists>(select: IExecutableSelectQuery): BooleanValueSource { + exists(select: IExecutableSelectQuery & SameDB): BooleanValueSource { return new SqlOperationStatic1ValueSource('_exists', select, 'boolean', 'boolean', 'required', undefined) } - notExists>(select: IExecutableSelectQuery): BooleanValueSource { + notExists(select: IExecutableSelectQuery & SameDB): BooleanValueSource { return new SqlOperationStatic1ValueSource('_notExists', select, 'boolean', 'boolean', 'required', undefined) } - protected executeProcedure(procedureName: string, params: ValueSourceOf>[]): Promise { + protected executeProcedure(procedureName: string, params: ValueSourceOf>[]): Promise { try { const queryParams: any[] = [] const query = this.__sqlBuilder._buildCallProcedure(queryParams, procedureName, params) @@ -457,61 +460,61 @@ export abstract class AbstractConnection implements IConnectio } } - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'boolean', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'boolean', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'int', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'int', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'bigint', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'bigint', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'double', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'double', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'string', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'string', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'uuid', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'uuid', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localDate', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localDate', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localTime', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localTime', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localDateTime', required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localDateTime', required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customInt', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customInt', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customDouble', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customDouble', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customUuid', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customUuid', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDate', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDate', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalTime', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalTime', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDateTime', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDateTime', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'enum', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'enum', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'custom', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'custom', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customComparable', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customComparable', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customInt', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customInt', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customDouble', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customDouble', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customUuid', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customUuid', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDate', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDate', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalTime', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalTime', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDateTime', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDateTime', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'enum', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'enum', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'custom', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'custom', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customComparable', typeName: string, required: 'required', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customComparable', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise - protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: string, required: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): Promise { + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'boolean', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'boolean', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'int', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'int', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'bigint', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'bigint', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'double', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'double', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'string', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'string', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'uuid', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'uuid', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localDate', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localDate', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localTime', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localTime', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localDateTime', required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'localDateTime', required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customInt', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customInt', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customDouble', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customDouble', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customUuid', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customUuid', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDate', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDate', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalTime', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalTime', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDateTime', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDateTime', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'enum', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'enum', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'custom', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'custom', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customComparable', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customComparable', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customInt', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customInt', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customDouble', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customDouble', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customUuid', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customUuid', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDate', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDate', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalTime', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalTime', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDateTime', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customLocalDateTime', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'enum', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'enum', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'custom', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'custom', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customComparable', typeName: string, required: 'required', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: 'customComparable', typeName: string, required: 'optional', adapter?: TypeAdapter): Promise + protected executeFunction(functionName: string, params: ValueSourceOf>[], returnType: string, required: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): Promise { try { if (typeof adapter === 'string') { returnType = required @@ -546,60 +549,60 @@ export abstract class AbstractConnection implements IConnectio } } - fragmentWithType(type: 'boolean', required: 'required', adapter?: TypeAdapter): BooleanFragmentExpression - fragmentWithType(type: 'boolean', required: 'optional', adapter?: TypeAdapter): BooleanFragmentExpression - fragmentWithType(type: 'int', required: 'required', adapter?: TypeAdapter): NumberFragmentExpression - fragmentWithType(type: 'int', required: 'optional', adapter?: TypeAdapter): NumberFragmentExpression - fragmentWithType(type: 'bigint', required: 'required', adapter?: TypeAdapter): BigintFragmentExpression - fragmentWithType(type: 'bigint', required: 'optional', adapter?: TypeAdapter): BigintFragmentExpression - fragmentWithType(type: 'double', required: 'required', adapter?: TypeAdapter): NumberFragmentExpression - fragmentWithType(type: 'double', required: 'optional', adapter?: TypeAdapter): NumberFragmentExpression - fragmentWithType(type: 'string', required: 'required', adapter?: TypeAdapter): StringFragmentExpression - fragmentWithType(type: 'string', required: 'optional', adapter?: TypeAdapter): StringFragmentExpression - fragmentWithType(type: 'uuid', required: 'required', adapter?: TypeAdapter): UuidFragmentExpression - fragmentWithType(type: 'uuid', required: 'optional', adapter?: TypeAdapter): UuidFragmentExpression - fragmentWithType(type: 'localDate', required: 'required', adapter?: TypeAdapter): LocalDateFragmentExpression - fragmentWithType(type: 'localDate', required: 'optional', adapter?: TypeAdapter): LocalDateFragmentExpression - fragmentWithType(type: 'localTime', required: 'required', adapter?: TypeAdapter): LocalTimeFragmentExpression - fragmentWithType(type: 'localTime', required: 'optional', adapter?: TypeAdapter): LocalTimeFragmentExpression - fragmentWithType(type: 'localDateTime', required: 'required', adapter?: TypeAdapter): LocalDateTimeFragmentExpression - fragmentWithType(type: 'localDateTime', required: 'optional', adapter?: TypeAdapter): LocalDateTimeFragmentExpression - fragmentWithType(type: 'customInt', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomIntFragmentExpression - fragmentWithType(type: 'customInt', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomIntFragmentExpression - fragmentWithType(type: 'customDouble', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomDoubleFragmentExpression - fragmentWithType(type: 'customDouble', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomDoubleFragmentExpression - fragmentWithType(type: 'customUuid', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomUuidFragmentExpression - fragmentWithType(type: 'customUuid', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomUuidFragmentExpression - fragmentWithType(type: 'customLocalDate', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomLocalDateFragmentExpression - fragmentWithType(type: 'customLocalDate', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomLocalDateFragmentExpression - fragmentWithType(type: 'customLocalTime', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomLocalTimeFragmentExpression - fragmentWithType(type: 'customLocalTime', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomLocalTimeFragmentExpression - fragmentWithType(type: 'customLocalDateTime', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomLocalDateTimeFragmentExpression - fragmentWithType(type: 'customLocalDateTime', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomLocalDateTimeFragmentExpression - fragmentWithType(type: 'enum', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): EqualableFragmentExpression - fragmentWithType(type: 'enum', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): EqualableFragmentExpression - fragmentWithType(type: 'custom', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): EqualableFragmentExpression - fragmentWithType(type: 'custom', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): EqualableFragmentExpression - fragmentWithType(type: 'customComparable', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): ComparableFragmentExpression - fragmentWithType(type: 'customComparable', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): ComparableFragmentExpression - fragmentWithType(type: 'customInt', typeName: string, required: 'required', adapter?: TypeAdapter): CustomIntFragmentExpression - fragmentWithType(type: 'customInt', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomIntFragmentExpression - fragmentWithType(type: 'customDouble', typeName: string, required: 'required', adapter?: TypeAdapter): CustomDoubleFragmentExpression - fragmentWithType(type: 'customDouble', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomDoubleFragmentExpression - fragmentWithType(type: 'customUuid', typeName: string, required: 'required', adapter?: TypeAdapter): CustomUuidFragmentExpression - fragmentWithType(type: 'customUuid', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomUuidFragmentExpression - fragmentWithType(type: 'customLocalDate', typeName: string, required: 'required', adapter?: TypeAdapter): CustomLocalDateFragmentExpression - fragmentWithType(type: 'customLocalDate', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomLocalDateFragmentExpression - fragmentWithType(type: 'customLocalTime', typeName: string, required: 'required', adapter?: TypeAdapter): CustomLocalTimeFragmentExpression - fragmentWithType(type: 'customLocalTime', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomLocalTimeFragmentExpression - fragmentWithType(type: 'customLocalDateTime', typeName: string, required: 'required', adapter?: TypeAdapter): CustomLocalDateTimeFragmentExpression - fragmentWithType(type: 'customLocalDateTime', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomLocalDateTimeFragmentExpression - fragmentWithType(type: 'enum', typeName: string, required: 'required', adapter?: TypeAdapter): EqualableFragmentExpression - fragmentWithType(type: 'enum', typeName: string, required: 'optional', adapter?: TypeAdapter): EqualableFragmentExpression - fragmentWithType(type: 'custom', typeName: string, required: 'required', adapter?: TypeAdapter): EqualableFragmentExpression - fragmentWithType(type: 'custom', typeName: string, required: 'optional', adapter?: TypeAdapter): EqualableFragmentExpression - fragmentWithType(type: 'customComparable', typeName: string, required: 'required', adapter?: TypeAdapter): ComparableFragmentExpression - fragmentWithType(type: 'customComparable', typeName: string, required: 'optional', adapter?: TypeAdapter): ComparableFragmentExpression + fragmentWithType(type: 'boolean', required: 'required', adapter?: TypeAdapter): BooleanFragmentExpression, 'required'> + fragmentWithType(type: 'boolean', required: 'optional', adapter?: TypeAdapter): BooleanFragmentExpression, 'optional'> + fragmentWithType(type: 'int', required: 'required', adapter?: TypeAdapter): NumberFragmentExpression, 'required'> + fragmentWithType(type: 'int', required: 'optional', adapter?: TypeAdapter): NumberFragmentExpression, 'optional'> + fragmentWithType(type: 'bigint', required: 'required', adapter?: TypeAdapter): BigintFragmentExpression, 'required'> + fragmentWithType(type: 'bigint', required: 'optional', adapter?: TypeAdapter): BigintFragmentExpression, 'optional'> + fragmentWithType(type: 'double', required: 'required', adapter?: TypeAdapter): NumberFragmentExpression, 'required'> + fragmentWithType(type: 'double', required: 'optional', adapter?: TypeAdapter): NumberFragmentExpression, 'optional'> + fragmentWithType(type: 'string', required: 'required', adapter?: TypeAdapter): StringFragmentExpression, 'required'> + fragmentWithType(type: 'string', required: 'optional', adapter?: TypeAdapter): StringFragmentExpression, 'optional'> + fragmentWithType(type: 'uuid', required: 'required', adapter?: TypeAdapter): UuidFragmentExpression, 'required'> + fragmentWithType(type: 'uuid', required: 'optional', adapter?: TypeAdapter): UuidFragmentExpression, 'optional'> + fragmentWithType(type: 'localDate', required: 'required', adapter?: TypeAdapter): LocalDateFragmentExpression, 'required'> + fragmentWithType(type: 'localDate', required: 'optional', adapter?: TypeAdapter): LocalDateFragmentExpression, 'optional'> + fragmentWithType(type: 'localTime', required: 'required', adapter?: TypeAdapter): LocalTimeFragmentExpression, 'required'> + fragmentWithType(type: 'localTime', required: 'optional', adapter?: TypeAdapter): LocalTimeFragmentExpression, 'optional'> + fragmentWithType(type: 'localDateTime', required: 'required', adapter?: TypeAdapter): LocalDateTimeFragmentExpression, 'required'> + fragmentWithType(type: 'localDateTime', required: 'optional', adapter?: TypeAdapter): LocalDateTimeFragmentExpression, 'optional'> + fragmentWithType(type: 'customInt', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomIntFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'customInt', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomIntFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'customDouble', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomDoubleFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'customDouble', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomDoubleFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'customUuid', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomUuidFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'customUuid', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomUuidFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'customLocalDate', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomLocalDateFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'customLocalDate', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomLocalDateFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'customLocalTime', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomLocalTimeFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'customLocalTime', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomLocalTimeFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'customLocalDateTime', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): CustomLocalDateTimeFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'customLocalDateTime', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): CustomLocalDateTimeFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'enum', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): EqualableFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'enum', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): EqualableFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'custom', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): EqualableFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'custom', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): EqualableFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'customComparable', typeName: TYPE_NAME, required: 'required', adapter?: TypeAdapter): ComparableFragmentExpression, T, TYPE_NAME, 'required'> + fragmentWithType(type: 'customComparable', typeName: TYPE_NAME, required: 'optional', adapter?: TypeAdapter): ComparableFragmentExpression, T, TYPE_NAME, 'optional'> + fragmentWithType(type: 'customInt', typeName: string, required: 'required', adapter?: TypeAdapter): CustomIntFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'customInt', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomIntFragmentExpression, T, T, 'optional'> + fragmentWithType(type: 'customDouble', typeName: string, required: 'required', adapter?: TypeAdapter): CustomDoubleFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'customDouble', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomDoubleFragmentExpression, T, T, 'optional'> + fragmentWithType(type: 'customUuid', typeName: string, required: 'required', adapter?: TypeAdapter): CustomUuidFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'customUuid', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomUuidFragmentExpression, T, T, 'optional'> + fragmentWithType(type: 'customLocalDate', typeName: string, required: 'required', adapter?: TypeAdapter): CustomLocalDateFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'customLocalDate', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomLocalDateFragmentExpression, T, T, 'optional'> + fragmentWithType(type: 'customLocalTime', typeName: string, required: 'required', adapter?: TypeAdapter): CustomLocalTimeFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'customLocalTime', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomLocalTimeFragmentExpression, T, T, 'optional'> + fragmentWithType(type: 'customLocalDateTime', typeName: string, required: 'required', adapter?: TypeAdapter): CustomLocalDateTimeFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'customLocalDateTime', typeName: string, required: 'optional', adapter?: TypeAdapter): CustomLocalDateTimeFragmentExpression, T, T, 'optional'> + fragmentWithType(type: 'enum', typeName: string, required: 'required', adapter?: TypeAdapter): EqualableFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'enum', typeName: string, required: 'optional', adapter?: TypeAdapter): EqualableFragmentExpression, T, T, 'optional'> + fragmentWithType(type: 'custom', typeName: string, required: 'required', adapter?: TypeAdapter): EqualableFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'custom', typeName: string, required: 'optional', adapter?: TypeAdapter): EqualableFragmentExpression, T, T, 'optional'> + fragmentWithType(type: 'customComparable', typeName: string, required: 'required', adapter?: TypeAdapter): ComparableFragmentExpression, T, T, 'required'> + fragmentWithType(type: 'customComparable', typeName: string, required: 'optional', adapter?: TypeAdapter): ComparableFragmentExpression, T, T, 'optional'> fragmentWithType(type: string, required: string, adapter?: TypeAdapter | string, adapter2?: TypeAdapter): any { if (typeof adapter === 'string') { type = required @@ -735,47 +738,56 @@ export abstract class AbstractConnection implements IConnectio } protected buildFragmentWithArgs(): FragmentBuilder0 - protected buildFragmentWithArgs>(a1: A1): FragmentBuilder1 - protected buildFragmentWithArgs, A2 extends Argument>(a1: A1, a2: A2): FragmentBuilder2 - protected buildFragmentWithArgs, A2 extends Argument, A3 extends Argument>(a1: A1, a2: A2, a3: A3): FragmentBuilder3 - protected buildFragmentWithArgs, A2 extends Argument, A3 extends Argument, A4 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4): FragmentBuilder4 - protected buildFragmentWithArgs, A2 extends Argument, A3 extends Argument, A4 extends Argument, A5 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): FragmentBuilder5 + protected buildFragmentWithArgs>(a1: A1): FragmentBuilder1, A1> + protected buildFragmentWithArgs, A2 extends Argument>(a1: A1, a2: A2): FragmentBuilder2, A1, A2> + protected buildFragmentWithArgs, A2 extends Argument, A3 extends Argument>(a1: A1, a2: A2, a3: A3): FragmentBuilder3, A1, A2, A3> + protected buildFragmentWithArgs, A2 extends Argument, A3 extends Argument, A4 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4): FragmentBuilder4, A1, A2, A3, A4> + protected buildFragmentWithArgs, A2 extends Argument, A3 extends Argument, A4 extends Argument, A5 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): FragmentBuilder5, A1, A2, A3, A4, A5> protected buildFragmentWithArgs(...args: Argument[]): any { return new FragmentFunctionBuilder(args) } protected buildFragmentWithArgsIfValue(): FragmentBuilder0IfValue - protected buildFragmentWithArgsIfValue>(a1: A1): FragmentBuilder1IfValue - protected buildFragmentWithArgsIfValue, A2 extends Argument>(a1: A1, a2: A2): FragmentBuilder2IfValue - protected buildFragmentWithArgsIfValue, A2 extends Argument, A3 extends Argument>(a1: A1, a2: A2, a3: A3): FragmentBuilder3IfValue - protected buildFragmentWithArgsIfValue, A2 extends Argument, A3 extends Argument, A4 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4): FragmentBuilder4IfValue - protected buildFragmentWithArgsIfValue, A2 extends Argument, A3 extends Argument, A4 extends Argument, A5 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): FragmentBuilder5IfValue + protected buildFragmentWithArgsIfValue>(a1: A1): FragmentBuilder1IfValue, A1> + protected buildFragmentWithArgsIfValue, A2 extends Argument>(a1: A1, a2: A2): FragmentBuilder2IfValue, A1, A2> + protected buildFragmentWithArgsIfValue, A2 extends Argument, A3 extends Argument>(a1: A1, a2: A2, a3: A3): FragmentBuilder3IfValue, A1, A2, A3> + protected buildFragmentWithArgsIfValue, A2 extends Argument, A3 extends Argument, A4 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4): FragmentBuilder4IfValue, A1, A2, A3, A4> + protected buildFragmentWithArgsIfValue, A2 extends Argument, A3 extends Argument, A4 extends Argument, A5 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): FragmentBuilder5IfValue, A1, A2, A3, A4, A5> protected buildFragmentWithArgsIfValue(...args: Argument[]): any { return new FragmentFunctionBuilderIfValue(this as any, args) // make this protected fields as public } protected buildFragmentWithMaybeOptionalArgs(): FragmentBuilderMaybeOptional0 - protected buildFragmentWithMaybeOptionalArgs>(a1: A1): FragmentBuilderMaybeOptional1 - protected buildFragmentWithMaybeOptionalArgs, A2 extends Argument>(a1: A1, a2: A2): FragmentBuilderMaybeOptional2 - protected buildFragmentWithMaybeOptionalArgs, A2 extends Argument, A3 extends Argument>(a1: A1, a2: A2, a3: A3): FragmentBuilderMaybeOptional3 - protected buildFragmentWithMaybeOptionalArgs, A2 extends Argument, A3 extends Argument, A4 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4): FragmentBuilderMaybeOptional4 - protected buildFragmentWithMaybeOptionalArgs, A2 extends Argument, A3 extends Argument, A4 extends Argument, A5 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): FragmentBuilderMaybeOptional5 + protected buildFragmentWithMaybeOptionalArgs>(a1: A1): FragmentBuilderMaybeOptional1, A1> + protected buildFragmentWithMaybeOptionalArgs, A2 extends Argument>(a1: A1, a2: A2): FragmentBuilderMaybeOptional2, A1, A2> + protected buildFragmentWithMaybeOptionalArgs, A2 extends Argument, A3 extends Argument>(a1: A1, a2: A2, a3: A3): FragmentBuilderMaybeOptional3, A1, A2, A3> + protected buildFragmentWithMaybeOptionalArgs, A2 extends Argument, A3 extends Argument, A4 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4): FragmentBuilderMaybeOptional4, A1, A2, A3, A4> + protected buildFragmentWithMaybeOptionalArgs, A2 extends Argument, A3 extends Argument, A4 extends Argument, A5 extends Argument>(a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): FragmentBuilderMaybeOptional5, A1, A2, A3, A4, A5> protected buildFragmentWithMaybeOptionalArgs(...args: Argument[]): any { return new FragmentFunctionBuilderMaybeOptional(this as any, args) } - rawFragment(sql: TemplateStringsArray, ...params: Array | IExecutableSelectQuery | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery>): RawFragment { + rawFragment(sql: TemplateStringsArray): RawFragment> + rawFragment(sql: TemplateStringsArray, p1: RawFragmentArg): RawFragment + rawFragment(sql: TemplateStringsArray, p1: RawFragmentArg, p2: RawFragmentArg): RawFragment + rawFragment(sql: TemplateStringsArray, p1: RawFragmentArg, p2: RawFragmentArg, p3: RawFragmentArg): RawFragment + rawFragment(sql: TemplateStringsArray, p1: RawFragmentArg, p2: RawFragmentArg, p3: RawFragmentArg, p4: RawFragmentArg): RawFragment + rawFragment(sql: TemplateStringsArray, p1: RawFragmentArg, p2: RawFragmentArg, p3: RawFragmentArg, p4: RawFragmentArg, p5: RawFragmentArg): RawFragment + rawFragment(sql: TemplateStringsArray, p1: RawFragmentArg, p2: RawFragmentArg, p3: RawFragmentArg, p4: RawFragmentArg, p5: RawFragmentArg, p6: RawFragmentArg): RawFragment + rawFragment(sql: TemplateStringsArray, p1: RawFragmentArg, p2: RawFragmentArg, p3: RawFragmentArg, p4: RawFragmentArg, p5: RawFragmentArg, p6: RawFragmentArg, p7: RawFragmentArg): RawFragment + rawFragment(sql: TemplateStringsArray, ...p: Array>): RawFragment + rawFragment(sql: TemplateStringsArray, ...params: any): RawFragment { return new RawFragmentImpl(sql, params) } - protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>) => RawFragment): (, NAME extends string>(tableOrView: TABLE_OR_VIEW, name: NAME) => CustomizedTableOrView) - protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1) => RawFragment): (, NAME extends string>(tableOrView: TABLE_OR_VIEW, name: NAME, p1: P1) => CustomizedTableOrView) - protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1, p2: P2) => RawFragment): (, NAME extends string>(tableOrView: TABLE_OR_VIEW, name: NAME, p1: P1, p2: P2) => CustomizedTableOrView) - protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1, p2: P2, p3: P3) => RawFragment): (, NAME extends string>(tableOrView: TABLE_OR_VIEW, name: NAME, p1: P1, p2: P2, p3: P3) => CustomizedTableOrView) - protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1, p2: P2, p3: P3, p4: P4) => RawFragment): (, NAME extends string>(tableOrView: TABLE_OR_VIEW, name: NAME, p1: P1, p2: P2, p3: P3, p4: P4) => CustomizedTableOrView) - protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => RawFragment): (, NAME extends string>(tableOrView: TABLE_OR_VIEW, name: NAME, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => CustomizedTableOrView) - protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, ...params: any[]) => RawFragment): (, NAME extends string>(tableOrView: TABLE_OR_VIEW, name: NAME, ...params: any[]) => CustomizedTableOrView) { - return (tableOrView: ITableOrViewOf, name: string, ...params: any[]) => { + protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>) => RawFragment>): (, NAME extends string>(tableOrView: T & SameDB, name: NAME) => CustomizedTableOrView) + protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1) => RawFragment>): (, NAME extends string>(tableOrView: T & SameDB, name: NAME, p1: P1) => CustomizedTableOrView) + protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1, p2: P2) => RawFragment>): (, NAME extends string>(tableOrView: T & SameDB, name: NAME, p1: P1, p2: P2) => CustomizedTableOrView) + protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1, p2: P2, p3: P3) => RawFragment>): (, NAME extends string>(tableOrView: T & SameDB, name: NAME, p1: P1, p2: P2, p3: P3) => CustomizedTableOrView) + protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1, p2: P2, p3: P3, p4: P4) => RawFragment>): (, NAME extends string>(tableOrView: T & SameDB, name: NAME, p1: P1, p2: P2, p3: P3, p4: P4) => CustomizedTableOrView) + protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => RawFragment>): (, NAME extends string>(tableOrView: T & SameDB, name: NAME, p1: P1, p2: P2, p3: P3, p4: P4, p5: P5) => CustomizedTableOrView) + protected createTableOrViewCustomization(fn: (table: ValueSourceOf>, alias: ValueSourceOf>, ...params: any[]) => RawFragment>): (, NAME extends string>(tableOrView: T, name: NAME, ...params: any[]) => CustomizedTableOrView) { + return (tableOrView: ITableOrView, name: string, ...params: any[]) => { const as = __getTableOrViewPrivate(tableOrView).__as const result = (tableOrView as any).as(as) const table = new TableOrViewRawFragmentValueSource(result, '_rawFragmentTableName') @@ -788,89 +800,86 @@ export abstract class AbstractConnection implements IConnectio } } - noValueBoolean = NoTableOrViewRequiredView>(): IfValueSource { + noValueBoolean(): IfValueSource, 'required'> { return new SqlOperationValueSourceIfValueAlwaysNoop() } - dynamicBooleanExpressionUsing>(table: ITableOrView): AlwaysIfValueSource, any> - dynamicBooleanExpressionUsing, REF2 extends ITableOrViewRef>(table1: ITableOrView, table2: ITableOrView): AlwaysIfValueSource, any> - dynamicBooleanExpressionUsing, REF2 extends ITableOrViewRef, REF3 extends ITableOrViewRef>(table1: ITableOrView, table2: ITableOrView, table3: ITableOrView): AlwaysIfValueSource, any> - dynamicBooleanExpressionUsing, REF2 extends ITableOrViewRef, REF3 extends ITableOrViewRef, REF4 extends ITableOrViewRef>(table1: ITableOrView, table2: ITableOrView, table3: ITableOrView, table4: ITableOrView): AlwaysIfValueSource, any> - dynamicBooleanExpressionUsing, REF2 extends ITableOrViewRef, REF3 extends ITableOrViewRef, REF4 extends ITableOrViewRef, REF5 extends ITableOrViewRef>(table1: ITableOrView, table2: ITableOrView, table3: ITableOrView, table4: ITableOrView, table5: ITableOrView): AlwaysIfValueSource, any> + dynamicBooleanExpressionUsing(table: ITableOrView & SameDB): AlwaysIfValueSource, any> + dynamicBooleanExpressionUsing(table1: ITableOrView & SameDB, table2: ITableOrView & SameDB): AlwaysIfValueSource, any> + dynamicBooleanExpressionUsing(table1: ITableOrView & SameDB, table2: ITableOrView & SameDB, table3: ITableOrView & SameDB): AlwaysIfValueSource, any> + dynamicBooleanExpressionUsing(table1: ITableOrView & SameDB, table2: ITableOrView & SameDB, table3: ITableOrView & SameDB, table4: ITableOrView & SameDB): AlwaysIfValueSource, any> + dynamicBooleanExpressionUsing(table1: ITableOrView & SameDB, table2: ITableOrView & SameDB, table3: ITableOrView & SameDB, table4: ITableOrView & SameDB, table5: ITableOrView & SameDB): AlwaysIfValueSource, any> dynamicBooleanExpressionUsing(..._tables: any[]): AlwaysIfValueSource { return new SqlOperationValueSourceIfValueAlwaysNoop() } // Agregate functions - countAll(): NumberValueSource, 'required'> - countAll(): ValueSourceOf> { + countAll(): NumberValueSource, 'required'> { return new AggregateFunctions0ValueSource('_countAll', 'int', 'int', 'required', undefined) } - count>(value: ValueSourceOf): NumberValueSource - count>(value: ValueSourceOf): ValueSourceOf> { + count(value: ValueSourceOf & SameDB): NumberValueSource { return new AggregateFunctions1ValueSource('_count', value, 'int', 'int', 'required', undefined) } - countDistinct>(value: ValueSourceOf): NumberValueSource - countDistinct>(value: ValueSourceOf): ValueSourceOf> { + countDistinct(value: ValueSourceOf & SameDB): NumberValueSource { return new AggregateFunctions1ValueSource('_countDistinct', value, 'int', 'int', 'required', undefined) } - max, any, any, any>>(value: TYPE): RemapValueSourceTypeWithOptionalType { + max>(value: TYPE & SameDB): RemapValueSourceTypeWithOptionalType { const valuePrivate = __getValueSourcePrivate(value) return (new AggregateFunctions1ValueSource('_max', value, valuePrivate.__valueType, valuePrivate.__valueTypeName, 'optional', valuePrivate.__typeAdapter)) as any } - min, any, any, any>>(value: TYPE): RemapValueSourceTypeWithOptionalType { + min>(value: TYPE & SameDB): RemapValueSourceTypeWithOptionalType { const valuePrivate = __getValueSourcePrivate(value) return (new AggregateFunctions1ValueSource('_min', value, valuePrivate.__valueType, valuePrivate.__valueTypeName, 'optional', valuePrivate.__typeAdapter)) as any } - sum>(value: INumberValueSource): NumberValueSource - sum>(value: IBigintValueSource): BigintValueSource - sum, any, any, any>>(value: TYPE): CustomIntValueSource - sum, any, any, any>>(value: TYPE): CustomDoubleValueSource - sum>(value: ValueSourceOf): ValueSourceOf { + sum(value: INumberValueSource & SameDB): NumberValueSource + sum(value: IBigintValueSource & SameDB): BigintValueSource + sum>(value: TYPE & SameDB): CustomIntValueSource + sum>(value: TYPE & SameDB): CustomDoubleValueSource + sum(value: ValueSourceOf): ValueSourceOf { const valuePrivate = __getValueSourcePrivate(value) return new AggregateFunctions1ValueSource('_sum', value, valuePrivate.__valueType, valuePrivate.__valueTypeName, 'optional', valuePrivate.__typeAdapter) } - sumDistinct>(value: INumberValueSource): NumberValueSource - sumDistinct>(value: IBigintValueSource): BigintValueSource - sumDistinct, any, any, any>>(value: TYPE): CustomIntValueSource - sumDistinct, any, any, any>>(value: TYPE): CustomDoubleValueSource - sumDistinct>(value: ValueSourceOf): ValueSourceOf { + sumDistinct(value: INumberValueSource & SameDB): NumberValueSource + sumDistinct(value: IBigintValueSource & SameDB): BigintValueSource + sumDistinct>(value: TYPE & SameDB): CustomIntValueSource + sumDistinct>(value: TYPE & SameDB): CustomDoubleValueSource + sumDistinct(value: ValueSourceOf): ValueSourceOf { const valuePrivate = __getValueSourcePrivate(value) return new AggregateFunctions1ValueSource('_sumDistinct', value, valuePrivate.__valueType, valuePrivate.__valueTypeName, 'optional', valuePrivate.__typeAdapter) } - average>(value: INumberValueSource): NumberValueSource - average>(value: IBigintValueSource): BigintValueSource - average, any, any, any>>(value: TYPE): CustomIntValueSource - average, any, any, any>>(value: TYPE): CustomDoubleValueSource - average>(value: ValueSourceOf): ValueSourceOf { + average(value: INumberValueSource & SameDB): NumberValueSource + average(value: IBigintValueSource & SameDB): BigintValueSource + average>(value: TYPE & SameDB): CustomIntValueSource + average>(value: TYPE & SameDB): CustomDoubleValueSource + average(value: ValueSourceOf): ValueSourceOf { const valuePrivate = __getValueSourcePrivate(value) return new AggregateFunctions1ValueSource('_average', value, valuePrivate.__valueType, valuePrivate.__valueTypeName, 'optional', valuePrivate.__typeAdapter) } - averageDistinct>(value: INumberValueSource): NumberValueSource - averageDistinct>(value: IBigintValueSource): BigintValueSource - averageDistinct, any, any, any>>(value: TYPE): CustomIntValueSource - averageDistinct, any, any, any>>(value: TYPE): CustomDoubleValueSource - averageDistinct>(value: ValueSourceOf): ValueSourceOf { + averageDistinct(value: INumberValueSource & SameDB): NumberValueSource + averageDistinct(value: IBigintValueSource & SameDB): BigintValueSource + averageDistinct>(value: TYPE & SameDB): CustomIntValueSource + averageDistinct>(value: TYPE & SameDB): CustomDoubleValueSource + averageDistinct(value: ValueSourceOf): ValueSourceOf { const valuePrivate = __getValueSourcePrivate(value) return new AggregateFunctions1ValueSource('_averageDistinct', value, valuePrivate.__valueType, valuePrivate.__valueTypeName, 'optional', valuePrivate.__typeAdapter) } - stringConcat>(value: IStringValueSource): StringValueSource - stringConcat>(value: IStringValueSource, separator: string): StringValueSource - stringConcat>(value: ValueSourceOf, separator?: string): ValueSourceOf { + stringConcat(value: IStringValueSource & SameDB): StringValueSource + stringConcat(value: IStringValueSource & SameDB, separator: string): StringValueSource + stringConcat(value: ValueSourceOf, separator?: string): ValueSourceOf { const valuePrivate = __getValueSourcePrivate(value) return new AggregateFunctions1or2ValueSource('_stringConcat', separator, value, valuePrivate.__valueType, valuePrivate.__valueTypeName, 'optional', valuePrivate.__typeAdapter) } - stringConcatDistinct>(value: IStringValueSource): StringValueSource - stringConcatDistinct>(value: IStringValueSource, separator: string): StringValueSource - stringConcatDistinct>(value: ValueSourceOf, separator?: string): ValueSourceOf { + stringConcatDistinct(value: IStringValueSource & SameDB): StringValueSource + stringConcatDistinct(value: IStringValueSource & SameDB, separator: string): StringValueSource + stringConcatDistinct(value: ValueSourceOf, separator?: string): ValueSourceOf { const valuePrivate = __getValueSourcePrivate(value) return new AggregateFunctions1or2ValueSource('_stringConcatDistinct', separator, value, valuePrivate.__valueType, valuePrivate.__valueTypeName, 'optional', valuePrivate.__typeAdapter) } - aggregateAsArray>(columns: COLUMNS): AggregatedArrayValueSourceProjectableAsNullable, Array<{ [P in keyof InnerResultObjectValuesForAggregatedArray]: InnerResultObjectValuesForAggregatedArray[P] }>, Array<{ [P in keyof InnerResultNullableObjectValuesForAggregatedArray]: InnerResultNullableObjectValuesForAggregatedArray[P] }>, 'required'> { + aggregateAsArray>(columns: COLUMNS): AggregatedArrayValueSourceProjectableAsNullable, Array<{ [P in keyof InnerResultObjectValuesForAggregatedArray]: InnerResultObjectValuesForAggregatedArray[P] }>, Array<{ [P in keyof InnerResultNullableObjectValuesForAggregatedArray]: InnerResultNullableObjectValuesForAggregatedArray[P] }>, 'required'> { return new AggregateValueAsArrayValueSource(columns, 'InnerResultObject', 'required') } - aggregateAsArrayOfOneColumn, any, any, any>>(value: VALUE): AggregatedArrayValueSource, 'required'> { + aggregateAsArrayOfOneColumn>(value: VALUE): AggregatedArrayValueSource, 'required'> { return new AggregateValueAsArrayValueSource(value, 'InnerResultObject', 'required') } @@ -1209,59 +1218,61 @@ export abstract class AbstractConnection implements IConnectio } +export type RawFragmentArg = HasSource & SameDB & (AnyValueSource | IExecutableSelectQuery | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery) + export interface TransactionIsolationLevel { [transactionIsolationLevel]: 'transactionIsolationLevel' } -type AggregatedArrayColumns = { - [P: string]: ValueSourceOfDB | AggregatedArrayColumns +type AggregatedArrayColumns = { + [P: string]: ValueSourceOf> | AggregatedArrayColumns } // Handled in a maximum of 12 levels to avoid infinite instantiation in TypeScript -type TableOrViewOfAggregatedArray = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray2 +type SourceOfAggregatedArray = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray2 })[keyof TYPE] -type TableOrViewOfAggregatedArray2 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray3 +type SourceOfAggregatedArray2 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray3 })[keyof TYPE] -type TableOrViewOfAggregatedArray3 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray4 +type SourceOfAggregatedArray3 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray4 })[keyof TYPE] -type TableOrViewOfAggregatedArray4 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray5 +type SourceOfAggregatedArray4 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray5 })[keyof TYPE] -type TableOrViewOfAggregatedArray5 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray6 +type SourceOfAggregatedArray5 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray6 })[keyof TYPE] -type TableOrViewOfAggregatedArray6 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray7 +type SourceOfAggregatedArray6 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray7 })[keyof TYPE] -type TableOrViewOfAggregatedArray7 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray8 +type SourceOfAggregatedArray7 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray8 })[keyof TYPE] -type TableOrViewOfAggregatedArray8 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray9 +type SourceOfAggregatedArray8 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray9 })[keyof TYPE] -type TableOrViewOfAggregatedArray9 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray10 +type SourceOfAggregatedArray9 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray10 })[keyof TYPE] -type TableOrViewOfAggregatedArray10 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray11 +type SourceOfAggregatedArray10 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray11 })[keyof TYPE] -type TableOrViewOfAggregatedArray11 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : TableOrViewOfAggregatedArray12 +type SourceOfAggregatedArray11 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : SourceOfAggregatedArray12 })[keyof TYPE] -type TableOrViewOfAggregatedArray12 = ({ - [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? TABLE_OR_VIEW : never +type SourceOfAggregatedArray12 = ({ + [KEY in keyof TYPE]-?: TYPE[KEY] extends ValueSourceOf ? SOURCE : never })[keyof TYPE] diff --git a/src/connections/MariaDBConnection.ts b/src/connections/MariaDBConnection.ts index 31324d7f..6b9cd28d 100644 --- a/src/connections/MariaDBConnection.ts +++ b/src/connections/MariaDBConnection.ts @@ -1,9 +1,9 @@ +import type { NConnection } from "../utils/sourceName" import type { QueryRunner } from "../queryRunners/QueryRunner" import { MariaDBSqlBuilder } from "../sqlBuilders/MariaDBSqlBuilder" -import type { DB } from "../typeMarks/MariaDBDB" import { AbstractConnection, TransactionIsolationLevel } from "./AbstractConnection" -export abstract class MariaDBConnection extends AbstractConnection> { +export abstract class MariaDBConnection extends AbstractConnection> { protected uuidStrategy: 'string' | 'uuid' = 'uuid' diff --git a/src/connections/MySqlConnection.ts b/src/connections/MySqlConnection.ts index 59ea6d79..f6208b41 100644 --- a/src/connections/MySqlConnection.ts +++ b/src/connections/MySqlConnection.ts @@ -1,9 +1,9 @@ +import type { NConnection } from "../utils/sourceName" import type { QueryRunner } from "../queryRunners/QueryRunner" import { MySqlSqlBuilder } from "../sqlBuilders/MySqlSqlBuilder" -import type { DB } from "../typeMarks/MySqlDB" import { AbstractConnection, TransactionIsolationLevel } from "./AbstractConnection" -export abstract class MySqlConnection extends AbstractConnection> { +export abstract class MySqlConnection extends AbstractConnection> { protected uuidStrategy: 'string' | 'binary' = 'binary' diff --git a/src/connections/NoopDBConnection.ts b/src/connections/NoopDBConnection.ts index 099cf37a..c3057080 100644 --- a/src/connections/NoopDBConnection.ts +++ b/src/connections/NoopDBConnection.ts @@ -1,12 +1,12 @@ import type { BeginTransactionOpts, CommitOpts, QueryRunner, RollbackOpts } from "../queryRunners/QueryRunner" import { NoopDBSqlBuilder } from "../sqlBuilders/NoopDBSqlBuilder" import { NoopQueryRunner } from "../queryRunners/NoopQueryRunner" -import type { DB } from "../typeMarks/NoopDBDB" import { AbstractAdvancedConnection } from "./AbstractAdvancedConnection" import { ChainedQueryRunner } from "../queryRunners/ChainedQueryRunner" import { TransactionIsolationLevel } from "./AbstractConnection" +import type { NConnection } from "../utils/sourceName" -export abstract class NoopDBConnection extends AbstractAdvancedConnection> { +export abstract class NoopDBConnection extends AbstractAdvancedConnection> { constructor(queryRunner: QueryRunner = new NoopQueryRunner(), sqlBuilder = new NoopDBSqlBuilder()) { super(new NoopIterceptQueryRunner(queryRunner), sqlBuilder) diff --git a/src/connections/OracleConnection.ts b/src/connections/OracleConnection.ts index fa29763d..4e645f2d 100644 --- a/src/connections/OracleConnection.ts +++ b/src/connections/OracleConnection.ts @@ -1,10 +1,10 @@ +import type { NConnection } from "../utils/sourceName" import type { QueryRunner } from "../queryRunners/QueryRunner" import { OracleSqlBuilder } from "../sqlBuilders/OracleSqlBuilder" -import type { DB } from "../typeMarks/OracleDB" import { AbstractAdvancedConnection } from "./AbstractAdvancedConnection" import { TransactionIsolationLevel } from "./AbstractConnection" -export abstract class OracleConnection extends AbstractAdvancedConnection> { +export abstract class OracleConnection extends AbstractAdvancedConnection> { protected uuidStrategy: 'string' | 'custom-functions' = 'custom-functions' diff --git a/src/connections/PostgreSqlConnection.ts b/src/connections/PostgreSqlConnection.ts index 719f28f5..91ada466 100644 --- a/src/connections/PostgreSqlConnection.ts +++ b/src/connections/PostgreSqlConnection.ts @@ -1,10 +1,10 @@ +import type { NConnection } from "../utils/sourceName" import type { QueryRunner } from "../queryRunners/QueryRunner" import { PostgreSqlSqlBuilder } from "../sqlBuilders/PostgreSqlSqlBuilder" -import type { DB } from "../typeMarks/PostgreSqlDB" import { AbstractAdvancedConnection } from "./AbstractAdvancedConnection" import { TransactionIsolationLevel } from "./AbstractConnection" -export abstract class PostgreSqlConnection extends AbstractAdvancedConnection> { +export abstract class PostgreSqlConnection extends AbstractAdvancedConnection> { constructor(queryRunner: QueryRunner, sqlBuilder = new PostgreSqlSqlBuilder()) { super(queryRunner, sqlBuilder) diff --git a/src/connections/SqlServerConnection.ts b/src/connections/SqlServerConnection.ts index 4a4f2ed3..9eed9136 100644 --- a/src/connections/SqlServerConnection.ts +++ b/src/connections/SqlServerConnection.ts @@ -1,10 +1,10 @@ +import type { NConnection } from "../utils/sourceName" import type { QueryRunner } from "../queryRunners/QueryRunner" import { SqlServerSqlBuilder } from "../sqlBuilders/SqlServerSqlBuilder" -import type { DB } from "../typeMarks/SqlServerDB" import { AbstractAdvancedConnection } from "./AbstractAdvancedConnection" import type { TransactionIsolationLevel } from "./AbstractConnection" -export abstract class SqlServerConnection extends AbstractAdvancedConnection> { +export abstract class SqlServerConnection extends AbstractAdvancedConnection> { constructor(queryRunner: QueryRunner, sqlBuilder = new SqlServerSqlBuilder()) { super(queryRunner, sqlBuilder) diff --git a/src/connections/SqliteConnection.ts b/src/connections/SqliteConnection.ts index 90200472..72aeb821 100644 --- a/src/connections/SqliteConnection.ts +++ b/src/connections/SqliteConnection.ts @@ -1,10 +1,10 @@ +import type { NConnection } from "../utils/sourceName" import type { QueryRunner } from "../queryRunners/QueryRunner" import { SqliteSqlBuilder } from "../sqlBuilders/SqliteSqlBuilder" -import type { DB } from "../typeMarks/SqliteDB" import { AbstractConnection } from "./AbstractConnection" import type { SqliteDateTimeFormat, SqliteDateTimeFormatType } from "./SqliteConfiguration" -export abstract class SqliteConnection extends AbstractConnection> { +export abstract class SqliteConnection extends AbstractConnection> { protected uuidStrategy: 'string' | 'uuid-extension' = 'uuid-extension' diff --git a/src/databases.ts b/src/databases.ts deleted file mode 100644 index 5e9615aa..00000000 --- a/src/databases.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { anyDBType, mariaDBType, mySqlType, nextMethodNotSupportedByThisConnection, noopDBType, oracleType, postgreSqlType, sqliteType, sqlServerType } from "./utils/symbols"; - -export interface AnyDB { - [anyDBType] : 'AnyDB' -} - -export interface MariaDB extends AnyDB { - [mariaDBType]: 'MariaDB' -} - -export interface MySql extends AnyDB { - [mySqlType]: 'MySql' -} - -export interface NoopDB extends AnyDB { - [noopDBType]: 'NoopDB' -} - -export interface Oracle extends AnyDB { - [oracleType]: 'Oracle' -} - -export interface PostgreSql extends AnyDB { - [postgreSqlType]: 'PostgreSql' -} - -export interface Sqlite extends AnyDB { - [sqliteType]: 'Sqlite' -} - -export interface SqlServer extends AnyDB { - [sqlServerType]: 'SqlServer' -} - -export interface NotSupportedDB { - /* - * If you got here is because the method invoced next to the - * error message is not supperted by the database used in the - * connection, you are trying to use a feature recerved for - * other database - */ - [nextMethodNotSupportedByThisConnection]: 'NotSupportedDB' -} \ No newline at end of file diff --git a/src/examples/MariaDBExample-modern.ts b/src/examples/MariaDBExample-modern.ts index 1278c4f1..eb35323e 100644 --- a/src/examples/MariaDBExample-modern.ts +++ b/src/examples/MariaDBExample-modern.ts @@ -507,7 +507,7 @@ async function main() { firstName: tCustomer.firstName, lastName: tCustomer.lastName }).union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .select({ id: tCustomer.id, @@ -546,7 +546,7 @@ async function main() { firstName: tCustomer.firstName, lastName: tCustomer.lastName }).union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .select({ id: tCustomer.id, @@ -579,7 +579,7 @@ async function main() { .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) .union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) ) @@ -609,7 +609,7 @@ async function main() { .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) .union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) ).orderBy('result') diff --git a/src/examples/MariaDBExample.ts b/src/examples/MariaDBExample.ts index e7e6e899..9a542874 100644 --- a/src/examples/MariaDBExample.ts +++ b/src/examples/MariaDBExample.ts @@ -509,7 +509,7 @@ async function main() { firstName: tCustomer.firstName, lastName: tCustomer.lastName }).union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .select({ id: tCustomer.id, @@ -548,7 +548,7 @@ async function main() { firstName: tCustomer.firstName, lastName: tCustomer.lastName }).union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .select({ id: tCustomer.id, @@ -581,7 +581,7 @@ async function main() { .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) .union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) ) @@ -611,7 +611,7 @@ async function main() { .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) .union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) ).orderBy('result') diff --git a/src/examples/PrismaMariaDBExample.ts b/src/examples/PrismaMariaDBExample.ts index 23fedd66..39a6affc 100644 --- a/src/examples/PrismaMariaDBExample.ts +++ b/src/examples/PrismaMariaDBExample.ts @@ -503,7 +503,7 @@ async function main() { firstName: tCustomer.firstName, lastName: tCustomer.lastName }).union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) .select({ id: tCustomer.id, @@ -542,7 +542,7 @@ async function main() { firstName: tCustomer.firstName, lastName: tCustomer.lastName }).union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .select({ id: tCustomer.id, @@ -575,7 +575,7 @@ async function main() { .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) .union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) ) @@ -605,7 +605,7 @@ async function main() { .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) .union( - connection.subSelectUsing(tCompany).from(tCustomer) + connection.selectFrom(tCustomer) .where(tCustomer.companyId.equals(1)) // Outer reference replaced by value .selectOneColumn(tCustomer.firstName.concat(' ').concat(tCustomer.lastName)) ).orderBy('result') diff --git a/src/expressions/delete.ts b/src/expressions/delete.ts index 94bf3fd7..fc2fc6ca 100644 --- a/src/expressions/delete.ts +++ b/src/expressions/delete.ts @@ -1,176 +1,171 @@ import type { AnyValueSource, IBooleanValueSource, IExecutableDeleteQuery, IIfValueSource, ValueSourceOf, ValueSourceValueTypeForResult } from "./values" -import type { ITableOrView, ITableOrViewOf, NoTableOrViewRequired, OuterJoinSource } from "../utils/ITableOrView" -import type { AnyDB, MariaDB, MySql, NoopDB, Oracle, PostgreSql, Sqlite, SqlServer } from "../databases" -import type { database, tableOrView, tableOrViewRef } from "../utils/symbols" -import type { RawFragment } from "../utils/RawFragment" -import type { OuterJoinTableOrView } from "../utils/tableOrViewUtils" +import type { ForUseInLeftJoin, HasSource, IRawFragment, ITableOrView, OfDB, OfSameDB } from "../utils/ITableOrView" import type { ResultObjectValues, ResultObjectValuesProjectedAsNullable } from "../utils/resultUtils" +import type { NNoTableOrViewRequiredFrom, NSource } from "../utils/sourceName" +import type { source, from, using } from "../utils/symbols" -export interface DeleteCustomization { - afterDeleteKeyword?: RawFragment - beforeQuery?: RawFragment - afterQuery?: RawFragment +export interface DeleteCustomization, /*in|out*/ USING extends HasSource> { + afterDeleteKeyword?: IRawFragment + beforeQuery?: IRawFragment + afterQuery?: IRawFragment queryExecutionName?: string queryExecutionMetadata?: any } -export interface DeleteExpressionOf { - [database]: DB +export interface DeleteExpressionBase, /*in|out*/ USING extends HasSource> { + [from]: TABLE + [using]: USING } -export interface DeleteExpressionBase
> extends DeleteExpressionOf { - [tableOrView]: TABLE -} - -export interface ExecutableDelete
> extends DeleteExpressionBase
, IExecutableDeleteQuery { +export interface ExecutableDelete, /*in|out*/ USING extends HasSource> extends DeleteExpressionBase, IExecutableDeleteQuery, number> { executeDelete(min?: number, max?: number): Promise query(): string params(): any[] } -export interface CustomizableExecutableDelete
> extends ExecutableDelete
{ - customizeQuery(customization: DeleteCustomization): ExecutableDelete
+export interface CustomizableExecutableDelete, /*in|out*/ USING extends HasSource> extends ExecutableDelete { + customizeQuery(customization: DeleteCustomization): ExecutableDelete } -export interface DynamicExecutableDeleteExpression
, USING extends ITableOrView> extends ReturnableExecutableDelete { - and(condition: IIfValueSource, any>): DynamicExecutableDeleteExpression - and(condition: IBooleanValueSource, any>): DynamicExecutableDeleteExpression - or(condition: IIfValueSource, any>): DynamicExecutableDeleteExpression - or(condition: IBooleanValueSource, any>): DynamicExecutableDeleteExpression +export interface DynamicExecutableDeleteExpression, /*in|out*/ USING extends HasSource> extends ReturnableExecutableDelete { + and(condition: IIfValueSource ): DynamicExecutableDeleteExpression + and(condition: IBooleanValueSource ): DynamicExecutableDeleteExpression + or(condition: IIfValueSource ): DynamicExecutableDeleteExpression + or(condition: IBooleanValueSource ): DynamicExecutableDeleteExpression } -export interface DeleteWhereExpression
, USING extends ITableOrView> extends DeleteExpressionBase
{ +export interface DeleteWhereExpression, /*in|out*/ USING extends HasSource> extends DeleteExpressionBase { dynamicWhere() : DynamicExecutableDeleteExpression - where(condition: IIfValueSource, any>): DynamicExecutableDeleteExpression - where(condition: IBooleanValueSource, any>): DynamicExecutableDeleteExpression + where(condition: IIfValueSource ): DynamicExecutableDeleteExpression + where(condition: IBooleanValueSource ): DynamicExecutableDeleteExpression } -export interface DeleteExpression
, USING extends ITableOrView> extends DeleteWhereExpression { +export interface DeleteExpression, /*in|out*/ USING extends HasSource> extends DeleteWhereExpression { using: UsingFnType join: OnExpressionFnType innerJoin: OnExpressionFnType - leftJoin: OuterJoinOnExpressionFnType - leftOuterJoin: OuterJoinOnExpressionFnType + leftJoin: LeftJoinOnExpressionFnType + leftOuterJoin: LeftJoinOnExpressionFnType } -export interface DeleteWhereExpressionAllowingNoWhere
, USING extends ITableOrView> extends ReturnableExecutableDelete { +export interface DeleteWhereExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends ReturnableExecutableDelete { dynamicWhere() : DynamicExecutableDeleteExpression - where(condition: IIfValueSource, any>): DynamicExecutableDeleteExpression - where(condition: IBooleanValueSource, any>): DynamicExecutableDeleteExpression + where(condition: IIfValueSource ): DynamicExecutableDeleteExpression + where(condition: IBooleanValueSource ): DynamicExecutableDeleteExpression } -export interface DeleteExpressionAllowingNoWhere
, USING extends ITableOrView> extends DeleteWhereExpressionAllowingNoWhere { +export interface DeleteExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends DeleteWhereExpressionAllowingNoWhere { using: UsingFnTypeAllowingNoWhere join: OnExpressionFnTypeAllowingNoWhere innerJoin: OnExpressionFnTypeAllowingNoWhere - leftJoin: OuterJoinOnExpressionFnTypeAllowingNoWhere - leftOuterJoin: OuterJoinOnExpressionFnTypeAllowingNoWhere + leftJoin: LeftJoinOnExpressionFnTypeAllowingNoWhere + leftOuterJoin: LeftJoinOnExpressionFnTypeAllowingNoWhere } -export interface DeleteWhereJoinExpression
, USING extends ITableOrView> extends DeleteWhereExpression { - join>(table: TABLE_OR_VIEW2): OnExpression - innerJoin>(table: TABLE_OR_VIEW2): OnExpression - leftJoin, ALIAS>(source: OuterJoinSource): OnExpression> - leftOuterJoin, ALIAS>(source: OuterJoinSource): OnExpression> +export interface DeleteWhereJoinExpression, /*in|out*/ USING extends HasSource> extends DeleteWhereExpression { + join>(table: T2 & OfSameDB
): OnExpression + innerJoin>(table: T2 & OfSameDB
): OnExpression + leftJoin>(source: T2 & OfSameDB
): OnExpression + leftOuterJoin>(source: T2 & OfSameDB
): OnExpression } -export interface DynamicOnExpression
, USING extends ITableOrView> extends DeleteWhereJoinExpression { - and(condition: IIfValueSource, any>): DynamicOnExpression - and(condition: IBooleanValueSource, any>): DynamicOnExpression - or(condition: IIfValueSource, any>): DynamicOnExpression - or(condition: IBooleanValueSource, any>): DynamicOnExpression +export interface DynamicOnExpression, /*in|out*/ USING extends HasSource> extends DeleteWhereJoinExpression { + and(condition: IIfValueSource ): DynamicOnExpression + and(condition: IBooleanValueSource ): DynamicOnExpression + or(condition: IIfValueSource ): DynamicOnExpression + or(condition: IBooleanValueSource ): DynamicOnExpression } -export interface OnExpression
, USING extends ITableOrView> extends DeleteWhereJoinExpression { +export interface OnExpression, /*in|out*/ USING extends HasSource> extends DeleteWhereJoinExpression { dynamicOn(): DynamicOnExpression - on(condition: IIfValueSource, any>): DynamicOnExpression - on(condition: IBooleanValueSource, any>): DynamicOnExpression + on(condition: IIfValueSource ): DynamicOnExpression + on(condition: IBooleanValueSource ): DynamicOnExpression } -export interface DeleteExpressionWithoutJoin
, USING extends ITableOrView> extends DeleteWhereExpression { - using>(table: TABLE_OR_VIEW2): DeleteExpressionWithoutJoin +export interface DeleteExpressionWithoutJoin, /*in|out*/ USING extends HasSource> extends DeleteWhereExpression { + using>(table: T2 & OfSameDB
): DeleteExpressionWithoutJoin } -export interface DeleteUsingExpression
, USING extends ITableOrView> extends DeleteWhereJoinExpression { - using>(table: TABLE_OR_VIEW2): DeleteExpressionWithoutJoin +export interface DeleteUsingExpression, /*in|out*/ USING extends HasSource> extends DeleteWhereJoinExpression { + using>(table: T2 & OfSameDB
): DeleteExpressionWithoutJoin } -type UsingFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | MariaDB | MySql) - ? >(table: TABLE_OR_VIEW2) => DeleteUsingExpression +type UsingFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'mariaDB' | 'mySql'> + ? >(table: T2 & OfSameDB
) => DeleteUsingExpression : never -type OnExpressionFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) - ? >(table: TABLE_OR_VIEW2) => OnExpression +type OnExpressionFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> + ? >(table: T2 & OfSameDB
) => OnExpression : never -type OuterJoinOnExpressionFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) - ? , ALIAS>(source: OuterJoinSource) => OnExpression> +type LeftJoinOnExpressionFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> + ? >(source: T2 & OfSameDB
) => OnExpression : never -export interface DeleteWhereJoinExpressionAllowingNoWhere
, USING extends ITableOrView> extends DeleteWhereExpressionAllowingNoWhere { - join>(table: TABLE_OR_VIEW2): OnExpressionAllowingNoWhere - innerJoin>(table: TABLE_OR_VIEW2): OnExpressionAllowingNoWhere - leftJoin, ALIAS>(source: OuterJoinSource): OnExpressionAllowingNoWhere> - leftOuterJoin, ALIAS>(source: OuterJoinSource): OnExpressionAllowingNoWhere> +export interface DeleteWhereJoinExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends DeleteWhereExpressionAllowingNoWhere { + join>(table: T2 & OfSameDB
): OnExpressionAllowingNoWhere + innerJoin>(table: T2 & OfSameDB
): OnExpressionAllowingNoWhere + leftJoin>(source: T2 & OfSameDB
): OnExpressionAllowingNoWhere + leftOuterJoin>(source: T2 & OfSameDB
): OnExpressionAllowingNoWhere } -export interface DynamicOnExpressionAllowingNoWhere
, USING extends ITableOrView> extends DeleteWhereJoinExpressionAllowingNoWhere { - and(condition: IIfValueSource, any>): DynamicOnExpressionAllowingNoWhere - and(condition: IBooleanValueSource, any>): DynamicOnExpressionAllowingNoWhere - or(condition: IIfValueSource, any>): DynamicOnExpressionAllowingNoWhere - or(condition: IBooleanValueSource, any>): DynamicOnExpressionAllowingNoWhere +export interface DynamicOnExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends DeleteWhereJoinExpressionAllowingNoWhere { + and(condition: IIfValueSource ): DynamicOnExpressionAllowingNoWhere + and(condition: IBooleanValueSource ): DynamicOnExpressionAllowingNoWhere + or(condition: IIfValueSource ): DynamicOnExpressionAllowingNoWhere + or(condition: IBooleanValueSource ): DynamicOnExpressionAllowingNoWhere } -export interface OnExpressionAllowingNoWhere
, USING extends ITableOrView> extends DeleteWhereJoinExpressionAllowingNoWhere { +export interface OnExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends DeleteWhereJoinExpressionAllowingNoWhere { dynamicOn(): DynamicOnExpressionAllowingNoWhere - on(condition: IIfValueSource, any>): DynamicOnExpressionAllowingNoWhere - on(condition: IBooleanValueSource, any>): DynamicOnExpressionAllowingNoWhere + on(condition: IIfValueSource ): DynamicOnExpressionAllowingNoWhere + on(condition: IBooleanValueSource ): DynamicOnExpressionAllowingNoWhere } -export interface DeleteExpressionWithoutJoinAllowingNoWhere
, USING extends ITableOrView> extends DeleteWhereExpressionAllowingNoWhere { - using>(table: TABLE_OR_VIEW2): DeleteExpressionWithoutJoinAllowingNoWhere +export interface DeleteExpressionWithoutJoinAllowingNoWhere, /*in|out*/ USING extends HasSource> extends DeleteWhereExpressionAllowingNoWhere { + using>(table: T2 & OfSameDB
): DeleteExpressionWithoutJoinAllowingNoWhere } -export interface DeleteUsingExpressionAllowingNoWhere
, USING extends ITableOrView> extends DeleteWhereJoinExpressionAllowingNoWhere { - using>(table: TABLE_OR_VIEW2): DeleteExpressionWithoutJoinAllowingNoWhere +export interface DeleteUsingExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends DeleteWhereJoinExpressionAllowingNoWhere { + using>(table: T2 & OfSameDB
): DeleteExpressionWithoutJoinAllowingNoWhere } -type UsingFnTypeAllowingNoWhere
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | MariaDB | MySql) - ? >(table: TABLE_OR_VIEW2) => DeleteUsingExpressionAllowingNoWhere +type UsingFnTypeAllowingNoWhere
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'mariaDB' | 'mySql'> + ? >(table: T2 & OfSameDB
) => DeleteUsingExpressionAllowingNoWhere : never -type OnExpressionFnTypeAllowingNoWhere
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) - ? >(table: TABLE_OR_VIEW2) => OnExpressionAllowingNoWhere +type OnExpressionFnTypeAllowingNoWhere
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> + ? >(table: T2 & OfSameDB
) => OnExpressionAllowingNoWhere : never -type OuterJoinOnExpressionFnTypeAllowingNoWhere
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) - ? , ALIAS>(source: OuterJoinSource) => OnExpressionAllowingNoWhere> +type LeftJoinOnExpressionFnTypeAllowingNoWhere
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> + ? >(source: T2 & OfSameDB
) => OnExpressionAllowingNoWhere : never -export interface ReturnableExecutableDelete
, USING extends ITableOrView> extends CustomizableExecutableDelete
{ +export interface ReturnableExecutableDelete, /*in|out*/ USING extends HasSource> extends CustomizableExecutableDelete { returning: ReturningFnType returningOneColumn: ReturningOneColumnFnType } -export interface ExecutableDeleteReturning
, COLUMNS, RESULT> extends DeleteExpressionBase
, IExecutableDeleteQuery { +export interface ExecutableDeleteReturning, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends DeleteExpressionBase, IExecutableDeleteQuery, RESULT> { executeDeleteNoneOrOne(): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] }) | null> executeDeleteOne(): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })> executeDeleteMany(min?: number, max?: number): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[]> @@ -179,25 +174,29 @@ export interface ExecutableDeleteReturning
, COLU params(): any[] } -export interface ComposableCustomizableExecutableDelete
, COLUMNS, RESULT> extends ExecutableDeleteReturning { - customizeQuery(customization: DeleteCustomization): ExecutableDeleteReturning +export interface ComposableCustomizableExecutableDelete, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends ExecutableDeleteReturning { + customizeQuery(customization: DeleteCustomization): ExecutableDeleteReturning } -export interface ComposableCustomizableExecutableDeleteProjectableAsNullable
, COLUMNS> extends ComposableCustomizableExecutableDelete> { - projectingOptionalValuesAsNullable(): ComposableCustomizableExecutableDelete> +export interface CustomizableExecutableDeleteProjectableAsNullable, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS> extends ComposableCustomizableExecutableDelete> { + projectingOptionalValuesAsNullable(): ComposableCustomizableExecutableDelete> } -type ReturningFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB | Oracle) - ? >(columns: COLUMNS) => ComposableCustomizableExecutableDeleteProjectableAsNullable +type ReturningFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'mariaDB' | 'oracle'> + ? >(columns: COLUMNS) => CustomizableExecutableDeleteProjectableAsNullable + : TABLE extends OfDB<'sqlite'> + ? >>(columns: COLUMNS) => CustomizableExecutableDeleteProjectableAsNullable : never -type ReturningOneColumnFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB | Oracle) - ? >>(column: COLUMN) => ComposableCustomizableExecutableDelete> +type ReturningOneColumnFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'mariaDB' | 'oracle'> + ? >(column: COLUMN) => ComposableCustomizableExecutableDelete> + : TABLE extends OfDB<'sqlite'> + ? >>(column: COLUMN) => ComposableCustomizableExecutableDelete> : never -export type DeleteColumns
, USING extends ITableOrView> = { - [P: string]: ValueSourceOf> | DeleteColumns +export type DeleteColumns = { + [P: string]: ValueSourceOf | DeleteColumns [P: number | symbol]: never } \ No newline at end of file diff --git a/src/expressions/fragment.ts b/src/expressions/fragment.ts index 5c7ac5b8..3ba356f7 100644 --- a/src/expressions/fragment.ts +++ b/src/expressions/fragment.ts @@ -1,512 +1,495 @@ -import type { AnyDB } from "../databases" -import type { ITableOrViewRef, NoTableOrViewRequired } from "../utils/ITableOrView" import type { BooleanValueSource, NumberValueSource, StringValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, EqualableValueSource, ComparableValueSource, RemapValueSourceType, TypeOfArgument, MapArgumentToValueSource, ArgForFn, IfValueSource, ArgForBuilderIfValue, IBooleanValueSource, IIfValueSource, BigintValueSource, OptionalType, ValueSourceOf, UuidValueSource, CustomIntValueSource, CustomDoubleValueSource, CustomUuidValueSource, CustomLocalDateTimeValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource, IValueSource, RemapValueSourceTypeWithOptionalType, OptionalTypeOfValue, ArgBaseTypeForFn, MergeOptionalUnion } from "../expressions/values" -import type { optionalType, tableOrView } from "../utils/symbols" - -export interface BooleanFragmentExpression { - sql(sql: TemplateStringsArray): BooleanValueSource, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): BooleanValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): BooleanValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): BooleanValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): BooleanValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): BooleanValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): BooleanValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): BooleanValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): BooleanValueSource -} - -export interface NumberFragmentExpression { - sql(sql: TemplateStringsArray): NumberValueSource, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): NumberValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): NumberValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): NumberValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): NumberValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): NumberValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): NumberValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): NumberValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): NumberValueSource -} - -export interface BigintFragmentExpression { - sql(sql: TemplateStringsArray): BigintValueSource, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): BigintValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): BigintValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): BigintValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): BigintValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): BigintValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): BigintValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): BigintValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): NumberValueSource -} - -export interface StringFragmentExpression { - sql(sql: TemplateStringsArray): StringValueSource, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): StringValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): StringValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): StringValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): StringValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): StringValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): StringValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): StringValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): StringValueSource -} - -export interface UuidFragmentExpression { - sql(sql: TemplateStringsArray): UuidValueSource, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): UuidValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): UuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): UuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): UuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): UuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): UuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): UuidValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): UuidValueSource -} - -export interface LocalDateFragmentExpression { - sql(sql: TemplateStringsArray): LocalDateValueSource, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): LocalDateValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): LocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): LocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): LocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): LocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): LocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): LocalDateValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): LocalDateValueSource -} - -export interface LocalTimeFragmentExpression { - sql(sql: TemplateStringsArray): LocalTimeValueSource, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): LocalTimeValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): LocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): LocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): LocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): LocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): LocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): LocalTimeValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): LocalTimeValueSource -} - -export interface LocalDateTimeFragmentExpression { - sql(sql: TemplateStringsArray): LocalDateTimeValueSource, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): LocalDateTimeValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): LocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): LocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): LocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): LocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): LocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): LocalDateTimeValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): LocalDateTimeValueSource -} - -export interface EqualableFragmentExpression { - sql(sql: TemplateStringsArray): EqualableValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): EqualableValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): EqualableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): EqualableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): EqualableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): EqualableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): EqualableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): EqualableValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): EqualableValueSource -} - -export interface ComparableFragmentExpression { - sql(sql: TemplateStringsArray): ComparableValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): ComparableValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): ComparableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): ComparableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): ComparableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): ComparableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): ComparableValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): ComparableValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): ComparableValueSource -} - -export interface CustomIntFragmentExpression { - sql(sql: TemplateStringsArray): CustomIntValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): CustomIntValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomIntValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomIntValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomIntValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomIntValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomIntValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomIntValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): CustomIntValueSource -} - -export interface CustomDoubleFragmentExpression { - sql(sql: TemplateStringsArray): CustomDoubleValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): CustomDoubleValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomDoubleValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomDoubleValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomDoubleValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomDoubleValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomDoubleValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomDoubleValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): CustomDoubleValueSource -} - -export interface CustomUuidFragmentExpression { - sql(sql: TemplateStringsArray): CustomUuidValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): CustomUuidValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomUuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomUuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomUuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomUuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomUuidValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomUuidValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): CustomUuidValueSource -} - -export interface CustomLocalDateTimeFragmentExpression { - sql(sql: TemplateStringsArray): CustomLocalDateTimeValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): CustomLocalDateTimeValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomLocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomLocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomLocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomLocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomLocalDateTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomLocalDateTimeValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): CustomLocalDateTimeValueSource -} - -export interface CustomLocalDateFragmentExpression { - sql(sql: TemplateStringsArray): CustomLocalDateValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): CustomLocalDateValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomLocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomLocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomLocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomLocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomLocalDateValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomLocalDateValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): CustomLocalDateValueSource -} - -export interface CustomLocalTimeFragmentExpression { - sql(sql: TemplateStringsArray): CustomLocalTimeValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE> - sql>(sql: TemplateStringsArray, p1: ValueSourceOf): CustomLocalTimeValueSource - sql, T2 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomLocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomLocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomLocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomLocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomLocalTimeValueSource - sql, T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef, T6 extends ITableOrViewRef, T7 extends ITableOrViewRef>(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomLocalTimeValueSource - sql>(sql: TemplateStringsArray, ...p: ValueSourceOf[]): CustomLocalTimeValueSource -} - - -export interface FragmentBuilder0 { - as>>(impl: () => RESULT): () => RESULT -} - -export interface FragmentBuilder1 { - as>>(impl: (a1: MapArgumentToValueSource, A1>) => RESULT): FragmentFunction1 -} - -export interface FragmentBuilder2 { - as>>(impl: (a1: MapArgumentToValueSource, A1>, a2: MapArgumentToValueSource, A2>) => RESULT): FragmentFunction2 -} - -export interface FragmentBuilder3 { - as>>(impl: (a1: MapArgumentToValueSource, A1>, a2: MapArgumentToValueSource, A2>, a3: MapArgumentToValueSource, A3>) => RESULT): FragmentFunction3 -} - -export interface FragmentBuilder4 { - as>>(impl: (a1: MapArgumentToValueSource, A1>, a2: MapArgumentToValueSource, A2>, a3: MapArgumentToValueSource, A3>, a4: MapArgumentToValueSource, A4>) => RESULT): FragmentFunction4 -} - -export interface FragmentBuilder5 { - as>>(impl: (a1: MapArgumentToValueSource, A1>, a2: MapArgumentToValueSource, A2>, a3: MapArgumentToValueSource, A3>, a4: MapArgumentToValueSource, A4>, a5: MapArgumentToValueSource, A5>) => RESULT): FragmentFunction5 -} +import type { optionalType, source } from "../utils/symbols" +import type { NSource } from "../utils/sourceName" + +export interface BooleanFragmentExpression { + sql(sql: TemplateStringsArray): BooleanValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): BooleanValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): BooleanValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): BooleanValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): BooleanValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): BooleanValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): BooleanValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): BooleanValueSource +} + +export interface NumberFragmentExpression { + sql(sql: TemplateStringsArray): NumberValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): NumberValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): NumberValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): NumberValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): NumberValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): NumberValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): NumberValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): NumberValueSource +} + +export interface BigintFragmentExpression { + sql(sql: TemplateStringsArray): BigintValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): BigintValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): BigintValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): BigintValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): BigintValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): BigintValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): BigintValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): BigintValueSource +} + +export interface StringFragmentExpression { + sql(sql: TemplateStringsArray): StringValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): StringValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): StringValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): StringValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): StringValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): StringValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): StringValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): StringValueSource +} + +export interface UuidFragmentExpression { + sql(sql: TemplateStringsArray): UuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): UuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): UuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): UuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): UuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): UuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): UuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): UuidValueSource +} + +export interface LocalDateFragmentExpression { + sql(sql: TemplateStringsArray): LocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): LocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): LocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): LocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): LocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): LocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): LocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): LocalDateValueSource +} + +export interface LocalTimeFragmentExpression { + sql(sql: TemplateStringsArray): LocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): LocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): LocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): LocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): LocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): LocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): LocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): LocalTimeValueSource +} + +export interface LocalDateTimeFragmentExpression { + sql(sql: TemplateStringsArray): LocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): LocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): LocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): LocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): LocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): LocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): LocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): LocalDateTimeValueSource +} + +export interface EqualableFragmentExpression { + sql(sql: TemplateStringsArray): EqualableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): EqualableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): EqualableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): EqualableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): EqualableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): EqualableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): EqualableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): EqualableValueSource +} + +export interface ComparableFragmentExpression { + sql(sql: TemplateStringsArray): ComparableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): ComparableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): ComparableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): ComparableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): ComparableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): ComparableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): ComparableValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): ComparableValueSource +} + +export interface CustomIntFragmentExpression { + sql(sql: TemplateStringsArray): CustomIntValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): CustomIntValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomIntValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomIntValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomIntValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomIntValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomIntValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomIntValueSource +} + +export interface CustomDoubleFragmentExpression { + sql(sql: TemplateStringsArray): CustomDoubleValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): CustomDoubleValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomDoubleValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomDoubleValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomDoubleValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomDoubleValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomDoubleValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomDoubleValueSource +} + +export interface CustomUuidFragmentExpression { + sql(sql: TemplateStringsArray): CustomUuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): CustomUuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomUuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomUuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomUuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomUuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomUuidValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomUuidValueSource +} + +export interface CustomLocalDateTimeFragmentExpression { + sql(sql: TemplateStringsArray): CustomLocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): CustomLocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomLocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomLocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomLocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomLocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomLocalDateTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomLocalDateTimeValueSource +} + +export interface CustomLocalDateFragmentExpression { + sql(sql: TemplateStringsArray): CustomLocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): CustomLocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomLocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomLocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomLocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomLocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomLocalDateValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomLocalDateValueSource +} + +export interface CustomLocalTimeFragmentExpression { + sql(sql: TemplateStringsArray): CustomLocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf): CustomLocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf): CustomLocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf): CustomLocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf): CustomLocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf): CustomLocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf): CustomLocalTimeValueSource + sql(sql: TemplateStringsArray, p1: ValueSourceOf, p2: ValueSourceOf, p3: ValueSourceOf, p4: ValueSourceOf, p5: ValueSourceOf, p6: ValueSourceOf, p7: ValueSourceOf): CustomLocalTimeValueSource +} + + +export interface FragmentBuilder0 { + as>(impl: () => RESULT): () => RESULT +} + +export interface FragmentBuilder1 { + as>(impl: (a1: MapArgumentToValueSource) => RESULT): FragmentFunction1 +} + +export interface FragmentBuilder2 { + as>(impl: (a1: MapArgumentToValueSource, a2: MapArgumentToValueSource) => RESULT): FragmentFunction2 +} + +export interface FragmentBuilder3 { + as>(impl: (a1: MapArgumentToValueSource, a2: MapArgumentToValueSource, a3: MapArgumentToValueSource) => RESULT): FragmentFunction3 +} + +export interface FragmentBuilder4 { + as>(impl: (a1: MapArgumentToValueSource, a2: MapArgumentToValueSource, a3: MapArgumentToValueSource, a4: MapArgumentToValueSource) => RESULT): FragmentFunction4 +} -export interface FragmentFunction1 { - (a1: TypeOfArgument): RemapValueSourceType, RESULT> - >(a1: ArgForFn): RemapValueSourceType +export interface FragmentBuilder5 { + as>(impl: (a1: MapArgumentToValueSource, a2: MapArgumentToValueSource, a3: MapArgumentToValueSource, a4: MapArgumentToValueSource, a5: MapArgumentToValueSource) => RESULT): FragmentFunction5 +} + +export interface FragmentFunction1 { + (a1: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn): RemapValueSourceType } -export interface FragmentFunction2 { - (a1: TypeOfArgument, a2: TypeOfArgument): RemapValueSourceType, RESULT> - >(a1: ArgForFn, a2: TypeOfArgument): RemapValueSourceType +export interface FragmentFunction2 { + (a1: TypeOfArgument, a2: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: ArgForFn): RemapValueSourceType - , T2 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn): RemapValueSourceType } -export interface FragmentFunction3 { - (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument): RemapValueSourceType, RESULT> - >(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument): RemapValueSourceType - , T2 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument): RemapValueSourceType +export interface FragmentFunction3 { + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn): RemapValueSourceType - , T3 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn): RemapValueSourceType - , T3 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn): RemapValueSourceType - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn): RemapValueSourceType } -export interface FragmentFunction4 { - (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument): RemapValueSourceType, RESULT> - >(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument): RemapValueSourceType - , T2 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument): RemapValueSourceType - , T3 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument): RemapValueSourceType - , T3 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument): RemapValueSourceType - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument): RemapValueSourceType +export interface FragmentFunction4 { + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn): RemapValueSourceType - , T4 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn): RemapValueSourceType - , T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn): RemapValueSourceType - , T2 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn): RemapValueSourceType - , T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn): RemapValueSourceType - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn): RemapValueSourceType - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn): RemapValueSourceType - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn): RemapValueSourceType } -export interface FragmentFunction5 { - (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType, RESULT> - >(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType - , T2 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType - , T3 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType - , T3 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType - , T4 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType - , T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType - , T2 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType - , T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType +export interface FragmentFunction5 { + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): RemapValueSourceType - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType - , T5 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType - , T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType - , T2 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType - , T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType - , T3 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType - , T3 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType - , T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType - , T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType - , T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType - , T2 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType - , T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType -} - -export interface FragmentBuilder0IfValue { - as, any> | IIfValueSource, any>>(impl: () => RESULT): () => IfValueSource, RESULT[typeof optionalType]> -} - -export interface FragmentBuilder1IfValue { - as, any> | IIfValueSource, any>>(impl: (a1: ArgForBuilderIfValue, A1>) => RESULT): FragmentFunctionIfValue1 -} - -export interface FragmentBuilder2IfValue { - as, any> | IIfValueSource, any>>(impl: (a1: ArgForBuilderIfValue, A1>, a2: ArgForBuilderIfValue, A2>) => RESULT): FragmentFunctionIfValue2 -} - -export interface FragmentBuilder3IfValue { - as, any> | IIfValueSource, any>>(impl: (a1: ArgForBuilderIfValue, A1>, a2: ArgForBuilderIfValue, A2>, a3: ArgForBuilderIfValue, A3>) => RESULT): FragmentFunctionIfValue3 -} - -export interface FragmentBuilder4IfValue { - as, any> | IIfValueSource, any>>(impl: (a1: ArgForBuilderIfValue, A1>, a2: ArgForBuilderIfValue, A2>, a3: ArgForBuilderIfValue, A3>, a4: ArgForBuilderIfValue, A4>) => RESULT): FragmentFunctionIfValue4 -} - -export interface FragmentBuilder5IfValue { - as, any> | IIfValueSource, any>>(impl: (a1: ArgForBuilderIfValue, A1>, a2: ArgForBuilderIfValue, A2>, a3: ArgForBuilderIfValue, A3>, a4: ArgForBuilderIfValue, A4>, a5: ArgForBuilderIfValue, A5>) => RESULT): FragmentFunctionIfValue5 -} - -export interface FragmentFunctionIfValue1 { - (a1: TypeOfArgument): IfValueSource, OPTIONAL_TYPE> - >(a1: ArgForFn): IfValueSource -} - -export interface FragmentFunctionIfValue2 { - (a1: TypeOfArgument, a2: TypeOfArgument): IfValueSource, OPTIONAL_TYPE> - >(a1: ArgForFn, a2: TypeOfArgument): IfValueSource - - >(a1: TypeOfArgument, a2: ArgForFn): IfValueSource - , T2 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn): IfValueSource -} - -export interface FragmentFunctionIfValue3 { - (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument): IfValueSource, OPTIONAL_TYPE> - >(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument): IfValueSource - , T2 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): RemapValueSourceType +} + +export interface FragmentBuilder0IfValue { + as | IIfValueSource>(impl: () => RESULT): () => IfValueSource +} + +export interface FragmentBuilder1IfValue { + as | IIfValueSource>(impl: (a1: ArgForBuilderIfValue) => RESULT): FragmentFunctionIfValue1 +} + +export interface FragmentBuilder2IfValue { + as | IIfValueSource>(impl: (a1: ArgForBuilderIfValue, a2: ArgForBuilderIfValue) => RESULT): FragmentFunctionIfValue2 +} + +export interface FragmentBuilder3IfValue { + as | IIfValueSource>(impl: (a1: ArgForBuilderIfValue, a2: ArgForBuilderIfValue, a3: ArgForBuilderIfValue) => RESULT): FragmentFunctionIfValue3 +} + +export interface FragmentBuilder4IfValue { + as | IIfValueSource>(impl: (a1: ArgForBuilderIfValue, a2: ArgForBuilderIfValue, a3: ArgForBuilderIfValue, a4: ArgForBuilderIfValue) => RESULT): FragmentFunctionIfValue4 +} + +export interface FragmentBuilder5IfValue { + as | IIfValueSource>(impl: (a1: ArgForBuilderIfValue, a2: ArgForBuilderIfValue, a3: ArgForBuilderIfValue, a4: ArgForBuilderIfValue, a5: ArgForBuilderIfValue) => RESULT): FragmentFunctionIfValue5 +} + +export interface FragmentFunctionIfValue1 { + (a1: TypeOfArgument): IfValueSource + (a1: ArgForFn): IfValueSource +} + +export interface FragmentFunctionIfValue2 { + (a1: TypeOfArgument, a2: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument): IfValueSource + + (a1: TypeOfArgument, a2: ArgForFn): IfValueSource + (a1: ArgForFn, a2: ArgForFn): IfValueSource +} + +export interface FragmentFunctionIfValue3 { + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn): IfValueSource - , T3 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn): IfValueSource - , T3 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn): IfValueSource - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn): IfValueSource } -export interface FragmentFunctionIfValue4 { - (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument): IfValueSource, OPTIONAL_TYPE> - >(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument): IfValueSource - , T2 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument): IfValueSource - , T3 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument): IfValueSource - , T3 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument): IfValueSource - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument): IfValueSource +export interface FragmentFunctionIfValue4 { + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn): IfValueSource - , T4 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn): IfValueSource - , T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn): IfValueSource - , T2 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn): IfValueSource - , T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn): IfValueSource - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn): IfValueSource - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn): IfValueSource - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn): IfValueSource } -export interface FragmentFunctionIfValue5 { - (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource, OPTIONAL_TYPE> - >(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource - , T2 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource - , T3 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource - , T3 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): IfValueSource - , T4 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): IfValueSource - , T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): IfValueSource - , T2 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): IfValueSource - , T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): IfValueSource - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): IfValueSource - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): IfValueSource - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): IfValueSource +export interface FragmentFunctionIfValue5 { + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: TypeOfArgument): IfValueSource - >(a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): IfValueSource - , T5 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): IfValueSource - , T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): IfValueSource - , T2 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): IfValueSource - , T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): IfValueSource - , T3 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): IfValueSource - , T3 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): IfValueSource - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): IfValueSource - , T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): IfValueSource - , T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): IfValueSource - , T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): IfValueSource - , T2 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): IfValueSource - , T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): IfValueSource - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): IfValueSource - , T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): IfValueSource - , T2 extends ITableOrViewRef, T3 extends ITableOrViewRef, T4 extends ITableOrViewRef, T5 extends ITableOrViewRef>(a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): IfValueSource -} - -export interface FragmentBuilderMaybeOptional0 { - as>>(impl: () => RESULT): () => RESULT -} - -export interface FragmentBuilderMaybeOptional1 { - as, any, any, 'optional'>>(impl: (a1: MapArgumentToValueSource, A1>) => RESULT): FragmentFunctionMaybeOptional1 -} - -export interface FragmentBuilderMaybeOptional2 { - as, any, any, 'optional'>>(impl: (a1: MapArgumentToValueSource, A1>, a2: MapArgumentToValueSource, A2>) => RESULT): FragmentFunctionMaybeOptional2 -} - -export interface FragmentBuilderMaybeOptional3 { - as, any, any, 'optional'>>(impl: (a1: MapArgumentToValueSource, A1>, a2: MapArgumentToValueSource, A2>, a3: MapArgumentToValueSource, A3>) => RESULT): FragmentFunctionMaybeOptional3 -} - -export interface FragmentBuilderMaybeOptional4 { - as, any, any, 'optional'>>(impl: (a1: MapArgumentToValueSource, A1>, a2: MapArgumentToValueSource, A2>, a3: MapArgumentToValueSource, A3>, a4: MapArgumentToValueSource, A4>) => RESULT): FragmentFunctionMaybeOptional4 -} - -export interface FragmentBuilderMaybeOptional5 { - as, any, any, 'optional'>>(impl: (a1: MapArgumentToValueSource, A1>, a2: MapArgumentToValueSource, A2>, a3: MapArgumentToValueSource, A3>, a4: MapArgumentToValueSource, A4>, a5: MapArgumentToValueSource, A5>) => RESULT): FragmentFunctionMaybeOptional5 -} - -export interface FragmentFunctionMaybeOptional1 { - >(a1: T1): RemapValueSourceTypeWithOptionalType, RESULT, OptionalTypeOfValue> - >(a1: T1): RemapValueSourceTypeWithOptionalType -} - -export interface FragmentFunctionMaybeOptional2 { - , T2 extends TypeOfArgument>(a1: T1, a2: T2): RemapValueSourceTypeWithOptionalType, RESULT, MergeOptionalUnion | OptionalTypeOfValue>> - , T2 extends TypeOfArgument>(a1: T1, a2: T2): RemapValueSourceTypeWithOptionalType>> - - , T2 extends ArgBaseTypeForFn>(a1: T1, a2: T2): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn>(a1: T1, a2: T2): RemapValueSourceTypeWithOptionalType> -} - -export interface FragmentFunctionMaybeOptional3 { - , T2 extends TypeOfArgument, T3 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType, RESULT, MergeOptionalUnion | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType>> - - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType> -} - -export interface FragmentFunctionMaybeOptional4 { - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType, RESULT, MergeOptionalUnion | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType>> - - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | T4[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T4[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | T4[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | T4[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | T4[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType> -} - -export interface FragmentFunctionMaybeOptional5 { - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType, RESULT, MergeOptionalUnion | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | T4[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T4[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | T4[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | T4[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | T4[typeof optionalType] | OptionalTypeOfValue>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType>> - - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue | T5[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | T5[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue | T5[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T5[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | OptionalTypeOfValue | T5[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T5[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | OptionalTypeOfValue | T5[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T5[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | T4[typeof optionalType] | T5[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T4[typeof optionalType] | T5[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | T4[typeof optionalType] | T5[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType] | T5[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | T4[typeof optionalType] | T5[typeof optionalType]>> - , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType] | T5[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | T4[typeof optionalType] | T5[typeof optionalType]>> - , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType> + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: TypeOfArgument, a5: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: TypeOfArgument, a5: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: TypeOfArgument, a4: ArgForFn, a5: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): IfValueSource + (a1: ArgForFn, a2: TypeOfArgument, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): IfValueSource + (a1: TypeOfArgument, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): IfValueSource + (a1: ArgForFn, a2: ArgForFn, a3: ArgForFn, a4: ArgForFn, a5: ArgForFn): IfValueSource +} + +export interface FragmentBuilderMaybeOptional0 { + as>(impl: () => RESULT): () => RESULT +} + +export interface FragmentBuilderMaybeOptional1 { + as>(impl: (a1: MapArgumentToValueSource) => RESULT): FragmentFunctionMaybeOptional1 +} + +export interface FragmentBuilderMaybeOptional2 { + as>(impl: (a1: MapArgumentToValueSource, a2: MapArgumentToValueSource) => RESULT): FragmentFunctionMaybeOptional2 +} + +export interface FragmentBuilderMaybeOptional3 { + as>(impl: (a1: MapArgumentToValueSource, a2: MapArgumentToValueSource, a3: MapArgumentToValueSource) => RESULT): FragmentFunctionMaybeOptional3 +} + +export interface FragmentBuilderMaybeOptional4 { + as>(impl: (a1: MapArgumentToValueSource, a2: MapArgumentToValueSource, a3: MapArgumentToValueSource, a4: MapArgumentToValueSource) => RESULT): FragmentFunctionMaybeOptional4 +} + +export interface FragmentBuilderMaybeOptional5 { + as>(impl: (a1: MapArgumentToValueSource, a2: MapArgumentToValueSource, a3: MapArgumentToValueSource, a4: MapArgumentToValueSource, a5: MapArgumentToValueSource) => RESULT): FragmentFunctionMaybeOptional5 +} + +export interface FragmentFunctionMaybeOptional1 { + >(a1: T1): RemapValueSourceTypeWithOptionalType> + >(a1: T1): RemapValueSourceTypeWithOptionalType +} + +export interface FragmentFunctionMaybeOptional2 { + , T2 extends TypeOfArgument>(a1: T1, a2: T2): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> + , T2 extends TypeOfArgument>(a1: T1, a2: T2): RemapValueSourceTypeWithOptionalType>> + + , T2 extends ArgBaseTypeForFn>(a1: T1, a2: T2): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn>(a1: T1, a2: T2): RemapValueSourceTypeWithOptionalType> +} + +export interface FragmentFunctionMaybeOptional3 { + , T2 extends TypeOfArgument, T3 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType>> + + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3): RemapValueSourceTypeWithOptionalType> +} + +export interface FragmentFunctionMaybeOptional4 { + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType>> + + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | T4[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T4[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | T4[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | T4[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | T4[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4): RemapValueSourceTypeWithOptionalType> +} + +export interface FragmentFunctionMaybeOptional5 { + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | T4[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T4[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | T4[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | T4[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | T4[typeof optionalType] | OptionalTypeOfValue>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends TypeOfArgument>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType>> + + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | OptionalTypeOfValue | T5[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | T5[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | OptionalTypeOfValue | T5[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T5[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | OptionalTypeOfValue | T5[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T5[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | OptionalTypeOfValue | T5[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends TypeOfArgument, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T5[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | OptionalTypeOfValue | T4[typeof optionalType] | T5[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T4[typeof optionalType] | T5[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | OptionalTypeOfValue | T4[typeof optionalType] | T5[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends TypeOfArgument, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType] | T5[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | OptionalTypeOfValue | T3[typeof optionalType] | T4[typeof optionalType] | T5[typeof optionalType]>> + , T2 extends TypeOfArgument, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T4[typeof optionalType] | T5[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType | T2[typeof optionalType] | T3[typeof optionalType] | T4[typeof optionalType] | T5[typeof optionalType]>> + , T2 extends ArgBaseTypeForFn, T3 extends ArgBaseTypeForFn, T4 extends ArgBaseTypeForFn, T5 extends ArgBaseTypeForFn>(a1: T1, a2: T2, a3: T3, a4: T4, a5: T5): RemapValueSourceTypeWithOptionalType> } \ No newline at end of file diff --git a/src/expressions/insert.ts b/src/expressions/insert.ts index 8aee94d2..af59284a 100644 --- a/src/expressions/insert.ts +++ b/src/expressions/insert.ts @@ -1,640 +1,637 @@ import type { IExecutableSelectQuery, RemapIValueSourceType, ValueSourceValueType, AnyValueSource, ValueSourceOf, ValueSourceValueTypeForResult, RemapIValueSourceTypeWithOptionalType, IExecutableInsertQuery, IIfValueSource, IBooleanValueSource, IStringValueSource } from "./values" -import type { ITableOrView, NoTableOrViewRequired, NoTableOrViewRequiredView, ResolvedShape, VALUES_FOR_INSERT } from "../utils/ITableOrView" -import type { AnyDB, NoopDB, PostgreSql, SqlServer, Oracle, Sqlite, MariaDB, MySql } from "../databases" -import type { database, tableOrView, tableOrViewRef } from "../utils/symbols" +import type { HasSource, IRawFragment, OfDB, ResolvedShape } from "../utils/ITableOrView" +import type { from, source, using } from "../utils/symbols" import type { ColumnWithDefaultValue } from "../utils/Column" import type { RawFragment } from "../utils/RawFragment" import type { Default } from "./Default" -import type { AutogeneratedPrimaryKeyColumnsTypesOf, ColumnsForSetOf, ColumnsForSetOfWithShape, ColumnsOf, OptionalColumnsForSetOf, OptionalColumnsForSetOfWithShape, RequiredColumnsForSetOf, RequiredColumnsForSetOfWithShape, ResolveShape } from "../utils/tableOrViewUtils" +import type { AutogeneratedPrimaryKeyColumnsTypesOf, ColumnsForSetOf, ColumnsForSetOfWithShape, ColumnsKeyOf, OptionalColumnsForSetOf, OptionalColumnsForSetOfWithShape, RequiredColumnsForSetOf, RequiredColumnsForSetOfWithShape, ResolveShape } from "../utils/tableOrViewUtils" import type { ResultObjectValues, MandatoryPropertiesOf, ResultObjectValuesProjectedAsNullable } from "../utils/resultUtils" +import type { NNoTableOrViewRequiredFrom, NSource, NValuesForInsertFrom } from "../utils/sourceName" -export interface InsertCustomization { - afterInsertKeyword?: RawFragment - beforeQuery?: RawFragment - afterQuery?: RawFragment +export interface InsertCustomization, /*in|out*/ USING extends HasSource> { + afterInsertKeyword?: IRawFragment + beforeQuery?: IRawFragment + afterQuery?: IRawFragment queryExecutionName?: string queryExecutionMetadata?: any } -export interface InsertExpressionOf { - [database]: DB +export interface InsertExpressionBase, /*in|out*/ USING extends HasSource> { + [from]: TABLE + [using]: USING } -export interface InsertExpressionBase
> extends InsertExpressionOf { - [tableOrView]: TABLE -} - -export interface ExecutableInsert
> extends InsertExpressionBase
, IExecutableInsertQuery { +export interface ExecutableInsert, /*in|out*/ USING extends HasSource> extends InsertExpressionBase, IExecutableInsertQuery, number> { executeInsert(min?: number, max?: number): Promise query(): string params(): any[] } -export interface ExecutableInsertReturningLastInsertedId
, RESULT> extends InsertExpressionBase
, IExecutableInsertQuery { +export interface ExecutableInsertReturningLastInsertedId, /*in|out*/ USING extends HasSource, RESULT> extends InsertExpressionBase, IExecutableInsertQuery, RESULT> { executeInsert(min?: number, max?: number): Promise query(): string params(): any[] } -export interface CustomizableExecutableInsert
> extends ExecutableInsert
{ - customizeQuery(customization: InsertCustomization): ExecutableInsert
+export interface CustomizableExecutableInsert, /*in|out*/ USING extends HasSource> extends ExecutableInsert { + customizeQuery(customization: InsertCustomization): ExecutableInsert } -export interface CustomizableExecutableInsertReturningLastInsertedId
, RESULT> extends ExecutableInsertReturningLastInsertedId { - customizeQuery(customization: InsertCustomization): ExecutableInsertReturningLastInsertedId +export interface CustomizableExecutableInsertReturningLastInsertedId, /*in|out*/ USING extends HasSource, /*in|out*/ RESULT> extends ExecutableInsertReturningLastInsertedId { + customizeQuery(customization: InsertCustomization): ExecutableInsertReturningLastInsertedId } -export interface CustomizableExecutableInsertFromSelectOnConflict
> extends CustomizableExecutableInsert
{ - returningLastInsertedId: ReturningLastInsertedIdFromSelectType
- returning: ReturningFromSelectFnType
- returningOneColumn: ReturningOneColumnFromSelectFnType
+export interface CustomizableExecutableInsertFromSelectOnConflict, /*in|out*/ USING extends HasSource> extends CustomizableExecutableInsert { + returningLastInsertedId: ReturningLastInsertedIdFromSelectType + returning: ReturningFromSelectFnType + returningOneColumn: ReturningOneColumnFromSelectFnType } -export interface CustomizableExecutableInsertFromSelectOnConflictOptional
> extends CustomizableExecutableInsert
{ - returningLastInsertedId: ReturningLastInsertedIdFromSelectOptionalType
- returning: ReturningFromSelectOptionalFnType
- returningOneColumn: ReturningOneColumnFromSelectOptionalFnType
+export interface CustomizableExecutableInsertFromSelectOnConflictOptional, /*in|out*/ USING extends HasSource> extends CustomizableExecutableInsert { + returningLastInsertedId: ReturningLastInsertedIdFromSelectOptionalType + returning: ReturningFromSelectOptionalFnType + returningOneColumn: ReturningOneColumnFromSelectOptionalFnType } -export interface CustomizableExecutableInsertFromSelect
, SHAPE> extends CustomizableExecutableInsert
{ - returningLastInsertedId: ReturningLastInsertedIdFromSelectType
- returning: ReturningFromSelectFnType
- returningOneColumn: ReturningOneColumnFromSelectFnType
- onConflictDoNothing: OnConflictDoNothingFnType> - onConflictDoUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional
> - onConflictDoUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional
> - onConflictDoUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional
> - onConflictOn: OnConflictOnColumnFnType> - onConflictOnConstraint: OnConflictOnConstraintFnType> +export interface CustomizableExecutableInsertFromSelect, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends CustomizableExecutableInsert { + returningLastInsertedId: ReturningLastInsertedIdFromSelectType + returning: ReturningFromSelectFnType + returningOneColumn: ReturningOneColumnFromSelectFnType + onConflictDoNothing: OnConflictDoNothingFnType> + onConflictDoUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional> + onConflictDoUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional> + onConflictDoUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional> + onConflictOn: OnConflictOnColumnFnType> + onConflictOnConstraint: OnConflictOnConstraintFnType> } -export interface OnConflictDoInsertFromSelect
, SHAPE> { - doNothing: OnConflictDoNothingFnType> - doUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional
> - doUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional
> - doUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional
> +export interface OnConflictDoInsertFromSelect, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> { + doNothing: OnConflictDoNothingFnType> + doUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional> + doUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional> + doUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableInsertFromSelectOnConflictOptional> } -export interface CustomizableExecutableSimpleInsertOnConflict
> extends CustomizableExecutableInsert
{ - returningLastInsertedId: OnConflictReturningLastInsertedIdType
- returning: ReturningFnType
- returningOneColumn: ReturningOneColumnFnType
+export interface CustomizableExecutableSimpleInsertOnConflict, /*in|out*/ USING extends HasSource> extends CustomizableExecutableInsert { + returningLastInsertedId: OnConflictReturningLastInsertedIdType + returning: ReturningFnType + returningOneColumn: ReturningOneColumnFnType } -export interface CustomizableExecutableSimpleInsertOnConflictOptional
> extends CustomizableExecutableInsert
{ - returningLastInsertedId: OnConflictReturningLastInsertedIdOptionalType
- returning: ReturningOptionalFnType
- returningOneColumn: ReturningOneColumnOptionalFnType
+export interface CustomizableExecutableSimpleInsertOnConflictOptional, /*in|out*/ USING extends HasSource> extends CustomizableExecutableInsert { + returningLastInsertedId: OnConflictReturningLastInsertedIdOptionalType + returning: ReturningOptionalFnType + returningOneColumn: ReturningOneColumnOptionalFnType } -export interface CustomizableExecutableSimpleInsert
, SHAPE> extends CustomizableExecutableInsert
{ - returningLastInsertedId: ReturningLastInsertedIdType
- returning: ReturningFnType
- returningOneColumn: ReturningOneColumnFnType
- onConflictDoNothing: OnConflictDoNothingFnType> - onConflictDoUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional
> - onConflictDoUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional
> - onConflictDoUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional
> - onConflictOn: OnConflictOnColumnFnType> - onConflictOnConstraint: OnConflictOnConstraintFnType> +export interface CustomizableExecutableSimpleInsert, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends CustomizableExecutableInsert { + returningLastInsertedId: ReturningLastInsertedIdType + returning: ReturningFnType + returningOneColumn: ReturningOneColumnFnType + onConflictDoNothing: OnConflictDoNothingFnType> + onConflictDoUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional> + onConflictDoUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional> + onConflictDoUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional> + onConflictOn: OnConflictOnColumnFnType> + onConflictOnConstraint: OnConflictOnConstraintFnType> } -export interface OnConflictDoSimpleInsert
, SHAPE> { - doNothing: OnConflictDoNothingFnType> - doUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional
> - doUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional
> - doUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional
> +export interface OnConflictDoSimpleInsert, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> { + doNothing: OnConflictDoNothingFnType> + doUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional> + doUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional> + doUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableSimpleInsertOnConflictOptional> } -export interface CustomizableExecutableMultipleInsertOnConfict
> extends CustomizableExecutableInsert
{ - returningLastInsertedId: ReturningMultipleLastInsertedIdType
- returning: ReturningFnType
- returningOneColumn: ReturningOneColumnFnType
+export interface CustomizableExecutableMultipleInsertOnConfict, /*in|out*/ USING extends HasSource> extends CustomizableExecutableInsert { + returningLastInsertedId: ReturningMultipleLastInsertedIdType + returning: ReturningFnType + returningOneColumn: ReturningOneColumnFnType } -export interface CustomizableExecutableMultipleInsertOnConfictOptional
> extends CustomizableExecutableInsert
{ - returningLastInsertedId: ReturningMultipleLastInsertedIdOptionalType
- returning: ReturningOptionalFnType
- returningOneColumn: ReturningOneColumnOptionalFnType
+export interface CustomizableExecutableMultipleInsertOnConfictOptional, /*in|out*/ USING extends HasSource> extends CustomizableExecutableInsert { + returningLastInsertedId: ReturningMultipleLastInsertedIdOptionalType + returning: ReturningOptionalFnType + returningOneColumn: ReturningOneColumnOptionalFnType } -export interface CustomizableExecutableMultipleInsert
, SHAPE> extends CustomizableExecutableInsert
{ - returningLastInsertedId: ReturningMultipleLastInsertedIdType
- returning: ReturningFnType
- returningOneColumn: ReturningOneColumnFnType
- onConflictDoNothing: OnConflictDoNothingFnType> - onConflictDoUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional
> - onConflictDoUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional
> - onConflictDoUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional
> - onConflictOn: OnConflictOnColumnFnType> - onConflictOnConstraint: OnConflictOnConstraintFnType> +export interface CustomizableExecutableMultipleInsert, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends CustomizableExecutableInsert { + returningLastInsertedId: ReturningMultipleLastInsertedIdType + returning: ReturningFnType + returningOneColumn: ReturningOneColumnFnType + onConflictDoNothing: OnConflictDoNothingFnType> + onConflictDoUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional> + onConflictDoUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional> + onConflictDoUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional> + onConflictOn: OnConflictOnColumnFnType> + onConflictOnConstraint: OnConflictOnConstraintFnType> } -export interface OnConflictDoMultipleInsert
, SHAPE> { - doNothing: OnConflictDoNothingFnType> - doUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional
> - doUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional
> - doUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional
> +export interface OnConflictDoMultipleInsert, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> { + doNothing: OnConflictDoNothingFnType> + doUpdateDynamicSet: OnConflictDoUpdateDynamicSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional> + doUpdateSet: OnConflictDoUpdateSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional> + doUpdateSetIfValue: OnConflictDoUpdateSetFnType, CustomizableExecutableMultipleInsertOnConfictOptional> } -export interface ExecutableInsertExpression
> extends CustomizableExecutableSimpleInsert { - set(columns: InsertSets): ExecutableInsertExpression
- setIfValue(columns: OptionalInsertSets): ExecutableInsertExpression
- setIfSet(columns: InsertSets): ExecutableInsertExpression
- setIfSetIfValue(columns: OptionalInsertSets): ExecutableInsertExpression
- setIfNotSet(columns: InsertSets): ExecutableInsertExpression
- setIfNotSetIfValue(columns: OptionalInsertSets): ExecutableInsertExpression
- ignoreIfSet>(...columns: COLUMNS[]): MaybeExecutableInsertExpression> - keepOnly>(...columns: COLUMNS[]): MaybeExecutableInsertExpression, COLUMNS>> - - setIfHasValue(columns: InsertSets): ExecutableInsertExpression
- setIfHasValueIfValue(columns: OptionalInsertSets): ExecutableInsertExpression
- setIfHasNoValue(columns: InsertSets): ExecutableInsertExpression
- setIfHasNoValueIfValue(columns: OptionalInsertSets): ExecutableInsertExpression
- ignoreIfHasValue(...columns: OptionalColumnsForSetOf
[]): ExecutableInsertExpression
- ignoreIfHasNoValue(...columns: OptionalColumnsForSetOf
[]): ExecutableInsertExpression
- ignoreAnySetWithNoValue(): ExecutableInsertExpression
- - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfNoValue(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
+export interface ExecutableInsertExpression, /*in|out*/ USING extends HasSource> extends CustomizableExecutableSimpleInsert { + set(columns: InsertSets): ExecutableInsertExpression + setIfValue(columns: OptionalInsertSets): ExecutableInsertExpression + setIfSet(columns: InsertSets): ExecutableInsertExpression + setIfSetIfValue(columns: OptionalInsertSets): ExecutableInsertExpression + setIfNotSet(columns: InsertSets): ExecutableInsertExpression + setIfNotSetIfValue(columns: OptionalInsertSets): ExecutableInsertExpression + ignoreIfSet>(...columns: COLUMNS[]): MaybeExecutableInsertExpression> + keepOnly>(...columns: COLUMNS[]): MaybeExecutableInsertExpression, COLUMNS>> + + setIfHasValue(columns: InsertSets): ExecutableInsertExpression + setIfHasValueIfValue(columns: OptionalInsertSets): ExecutableInsertExpression + setIfHasNoValue(columns: InsertSets): ExecutableInsertExpression + setIfHasNoValueIfValue(columns: OptionalInsertSets): ExecutableInsertExpression + ignoreIfHasValue(...columns: OptionalColumnsForSetOf
[]): ExecutableInsertExpression + ignoreIfHasNoValue(...columns: OptionalColumnsForSetOf
[]): ExecutableInsertExpression + ignoreAnySetWithNoValue(): ExecutableInsertExpression + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfNoValue(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression - setWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression
- setIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression
- setIfSetWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression
- setIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression
- setIfNotSetWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression
- setIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression
- ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MaybeExecutableInsertExpression> - keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MaybeExecutableInsertExpression, COLUMNS>> - - setIfHasValueWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression
- setIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression
- setIfHasNoValueWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression
- setIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression
- ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): ExecutableInsertExpression
- ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): ExecutableInsertExpression
- ignoreAnySetWithNoValueWhen(when: boolean): ExecutableInsertExpression
- - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
- disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression
+ setWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression + setIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression + setIfSetWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression + setIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression + setIfNotSetWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression + setIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression + ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MaybeExecutableInsertExpression> + keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MaybeExecutableInsertExpression, COLUMNS>> + + setIfHasValueWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression + setIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression + setIfHasNoValueWhen(when: boolean, columns: InsertSets): ExecutableInsertExpression + setIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableInsertExpression + ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): ExecutableInsertExpression + ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): ExecutableInsertExpression + ignoreAnySetWithNoValueWhen(when: boolean): ExecutableInsertExpression + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableInsertExpression } -export interface ShapedExecutableInsertExpression
, SHAPE> extends CustomizableExecutableSimpleInsert { - extendShape>(shape: EXTEND_SHAPE): MaybeShapedExecutableInsertExpression, keyof EXTEND_SHAPE, never> - set(columns: InsertSets): ShapedExecutableInsertExpression - setIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression - setIfSet(columns: InsertSets): ShapedExecutableInsertExpression - setIfSetIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression - setIfNotSet(columns: InsertSets): ShapedExecutableInsertExpression - setIfNotSetIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression - ignoreIfSet>(...columns: COLUMNS[]): MaybeShapedExecutableInsertExpression, never> - keepOnly>(...columns: COLUMNS[]): MaybeShapedExecutableInsertExpression, COLUMNS>, never> - - setIfHasValue(columns: InsertSets): ShapedExecutableInsertExpression - setIfHasValueIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression - setIfHasNoValue(columns: InsertSets): ShapedExecutableInsertExpression - setIfHasNoValueIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression - ignoreIfHasValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - ignoreIfHasNoValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - ignoreAnySetWithNoValue(): ShapedExecutableInsertExpression - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfNoValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - - setWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression - setIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression - setIfSetWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression - setIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression - setIfNotSetWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression - setIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression - ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MaybeShapedExecutableInsertExpression, never> - keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MaybeShapedExecutableInsertExpression, COLUMNS>, never> - - setIfHasValueWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression - setIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression - setIfHasNoValueWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression - setIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression - ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - ignoreAnySetWithNoValueWhen(when: boolean): ShapedExecutableInsertExpression - - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression - disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression +export interface ShapedExecutableInsertExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends CustomizableExecutableSimpleInsert { + extendShape>(shape: EXTEND_SHAPE): MaybeShapedExecutableInsertExpression, keyof EXTEND_SHAPE, never> + set(columns: InsertSets): ShapedExecutableInsertExpression + setIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression + setIfSet(columns: InsertSets): ShapedExecutableInsertExpression + setIfSetIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression + setIfNotSet(columns: InsertSets): ShapedExecutableInsertExpression + setIfNotSetIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression + ignoreIfSet>(...columns: COLUMNS[]): MaybeShapedExecutableInsertExpression, never> + keepOnly>(...columns: COLUMNS[]): MaybeShapedExecutableInsertExpression, COLUMNS>, never> + + setIfHasValue(columns: InsertSets): ShapedExecutableInsertExpression + setIfHasValueIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression + setIfHasNoValue(columns: InsertSets): ShapedExecutableInsertExpression + setIfHasNoValueIfValue(columns: OptionalInsertSets): ShapedExecutableInsertExpression + ignoreIfHasValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + ignoreIfHasNoValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + ignoreAnySetWithNoValue(): ShapedExecutableInsertExpression + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfNoValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + + setWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression + setIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression + setIfSetWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression + setIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression + setIfNotSetWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression + setIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression + ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MaybeShapedExecutableInsertExpression, never> + keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MaybeShapedExecutableInsertExpression, COLUMNS>, never> + + setIfHasValueWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression + setIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression + setIfHasNoValueWhen(when: boolean, columns: InsertSets): ShapedExecutableInsertExpression + setIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableInsertExpression + ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + ignoreAnySetWithNoValueWhen(when: boolean): ShapedExecutableInsertExpression + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableInsertExpression } -export interface MissingKeysInsertExpression
, MISSING_KEYS> extends InsertExpressionBase
{ - set>(columns: COLUMNS): MaybeExecutableInsertExpression>> - setIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> - setIfSet>(columns: COLUMNS): MaybeExecutableInsertExpression>> - setIfSetIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> - setIfNotSet>(columns: COLUMNS): MaybeExecutableInsertExpression>> - setIfNotSetIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> - ignoreIfSet>(...columns: COLUMNS[]): MissingKeysInsertExpression) | MISSING_KEYS> - keepOnly>(...columns: COLUMNS[]): MissingKeysInsertExpression, COLUMNS> | MISSING_KEYS> +export interface MissingKeysInsertExpression, /*in|out*/ USING extends HasSource, /*in|out*/ MISSING_KEYS> extends InsertExpressionBase { + set>(columns: COLUMNS): MaybeExecutableInsertExpression>> + setIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> + setIfSet>(columns: COLUMNS): MaybeExecutableInsertExpression>> + setIfSetIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> + setIfNotSet>(columns: COLUMNS): MaybeExecutableInsertExpression>> + setIfNotSetIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> + ignoreIfSet>(...columns: COLUMNS[]): MissingKeysInsertExpression) | MISSING_KEYS> + keepOnly>(...columns: COLUMNS[]): MissingKeysInsertExpression, COLUMNS> | MISSING_KEYS> - setIfHasValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> - setIfHasValueIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> - setIfHasNoValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> - setIfHasNoValueIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> - ignoreIfHasValue(...columns: OptionalColumnsForSetOf
[]): MissingKeysInsertExpression - ignoreIfHasNoValue(...columns: OptionalColumnsForSetOf
[]): MissingKeysInsertExpression - ignoreAnySetWithNoValue(): MissingKeysInsertExpression - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfNoValue>(errorMessage: string, ...columns: COLUMNS[]): MissingKeysInsertExpression> - disallowIfNoValue>(error: Error, ...columns:COLUMNS[]): MissingKeysInsertExpression> - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - - setWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression - setIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression - setIfSetWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression - setIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression - setIfNotSetWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression - setIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression - ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MissingKeysInsertExpression) | MISSING_KEYS> - keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MissingKeysInsertExpression | MISSING_KEYS, COLUMNS>> - - setIfHasValueWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression - setIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression - setIfHasNoValueWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression - setIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression - ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): MissingKeysInsertExpression - ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): MissingKeysInsertExpression - ignoreAnySetWithNoValueWhen(when: boolean): MissingKeysInsertExpression - - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression - disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + setIfHasValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> + setIfHasValueIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> + setIfHasNoValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> + setIfHasNoValueIfValue>(columns: COLUMNS): MaybeExecutableInsertExpression>> + ignoreIfHasValue(...columns: OptionalColumnsForSetOf
[]): MissingKeysInsertExpression + ignoreIfHasNoValue(...columns: OptionalColumnsForSetOf
[]): MissingKeysInsertExpression + ignoreAnySetWithNoValue(): MissingKeysInsertExpression + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfNoValue>(errorMessage: string, ...columns: COLUMNS[]): MissingKeysInsertExpression> + disallowIfNoValue>(error: Error, ...columns:COLUMNS[]): MissingKeysInsertExpression> + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + + setWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression + setIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression + setIfSetWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression + setIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression + setIfNotSetWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression + setIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression + ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MissingKeysInsertExpression) | MISSING_KEYS> + keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MissingKeysInsertExpression | MISSING_KEYS, COLUMNS>> + + setIfHasValueWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression + setIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression + setIfHasNoValueWhen(when: boolean, columns: InsertSets): MissingKeysInsertExpression + setIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysInsertExpression + ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): MissingKeysInsertExpression + ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): MissingKeysInsertExpression + ignoreAnySetWithNoValueWhen(when: boolean): MissingKeysInsertExpression + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysInsertExpression } -export interface ShapedMissingKeysInsertExpression
, SHAPE, MISSING_KEYS, MISSING_KEYS_IN_SHAPE> extends InsertExpressionBase
{ - extendShape>(shape: EXTEND_SHAPE): ShapedMissingKeysInsertExpression, MISSING_KEYS | keyof EXTEND_SHAPE, Exclude> - set>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - setIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - setIfSet>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - setIfSetIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - setIfNotSet>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - setIfNotSetIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - ignoreIfSet>(...columns: COLUMNS[]): ShapedMissingKeysInsertExpression) | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> - keepOnly>(...columns: COLUMNS[]): ShapedMissingKeysInsertExpression, COLUMNS> | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> +export interface ShapedMissingKeysInsertExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE, /*in|out*/ MISSING_KEYS, /*in|out*/ MISSING_KEYS_IN_SHAPE> extends InsertExpressionBase { + extendShape>(shape: EXTEND_SHAPE): ShapedMissingKeysInsertExpression, MISSING_KEYS | keyof EXTEND_SHAPE, Exclude> + set>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + setIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + setIfSet>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + setIfSetIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + setIfNotSet>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + setIfNotSetIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + ignoreIfSet>(...columns: COLUMNS[]): ShapedMissingKeysInsertExpression) | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> + keepOnly>(...columns: COLUMNS[]): ShapedMissingKeysInsertExpression, COLUMNS> | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> - setIfHasValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - setIfHasValueIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - setIfHasNoValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - setIfHasNoValueIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> - ignoreIfHasValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - ignoreIfHasNoValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - ignoreAnySetWithNoValue(): ShapedMissingKeysInsertExpression - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfNoValue>(errorMessage: string, ...columns: COLUMNS[]): ShapedMissingKeysInsertExpression, MISSING_KEYS_IN_SHAPE> - disallowIfNoValue>(error: Error, ...columns: COLUMNS[]): ShapedMissingKeysInsertExpression, MISSING_KEYS_IN_SHAPE> - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - - setWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression - setIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression - setIfSetWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression - setIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression - setIfNotSetWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression - setIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression - ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): ShapedMissingKeysInsertExpression) | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> - keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): ShapedMissingKeysInsertExpression | MISSING_KEYS, COLUMNS>, MISSING_KEYS_IN_SHAPE> - - setIfHasValueWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression - setIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression - setIfHasNoValueWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression - setIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression - ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - ignoreAnySetWithNoValueWhen(when: boolean): ShapedMissingKeysInsertExpression - - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression - disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + setIfHasValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + setIfHasValueIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + setIfHasNoValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + setIfHasNoValueIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression>, MISSING_KEYS_IN_SHAPE> + ignoreIfHasValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + ignoreIfHasNoValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + ignoreAnySetWithNoValue(): ShapedMissingKeysInsertExpression + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfNoValue>(errorMessage: string, ...columns: COLUMNS[]): ShapedMissingKeysInsertExpression, MISSING_KEYS_IN_SHAPE> + disallowIfNoValue>(error: Error, ...columns: COLUMNS[]): ShapedMissingKeysInsertExpression, MISSING_KEYS_IN_SHAPE> + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + + setWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression + setIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression + setIfSetWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression + setIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression + setIfNotSetWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression + setIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression + ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): ShapedMissingKeysInsertExpression) | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> + keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): ShapedMissingKeysInsertExpression | MISSING_KEYS, COLUMNS>, MISSING_KEYS_IN_SHAPE> + + setIfHasValueWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression + setIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression + setIfHasNoValueWhen(when: boolean, columns: InsertSets): ShapedMissingKeysInsertExpression + setIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysInsertExpression + ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + ignoreAnySetWithNoValueWhen(when: boolean): ShapedMissingKeysInsertExpression + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysInsertExpression } -export interface ExecutableMultipleInsertExpression
> extends CustomizableExecutableMultipleInsert { - setForAll(columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- setForAllIfSet(columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfSetIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- setForAllIfNotSet(columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfNotSetIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- ignoreIfSet>(...columns: COLUMNS[]): MaybeExecutableMultipleInsertExpression> - keepOnly>(...columns: COLUMNS[]): MaybeExecutableMultipleInsertExpression, COLUMNS>> - - setForAllIfHasValue(columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfHasValueIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- setForAllIfHasNoValue(columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfHasNoValueIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- ignoreIfHasValue(...columns: OptionalColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- ignoreIfHasNoValue(...columns: OptionalColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- ignoreAnySetWithNoValue(): ExecutableMultipleInsertExpression
- - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfNoValue(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- - setForAllWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- setForAllIfSetWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- setForAllIfNotSetWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MaybeExecutableMultipleInsertExpression> - keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MaybeExecutableMultipleInsertExpression, COLUMNS>> - - setForAllIfHasValueWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- setForAllIfHasNoValueWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression
- setForAllIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression
- ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- ignoreAnySetWithNoValueWhen(when: boolean): ExecutableMultipleInsertExpression
- - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
- disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression
+export interface ExecutableMultipleInsertExpression, /*in|out*/ USING extends HasSource> extends CustomizableExecutableMultipleInsert { + setForAll(columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression + setForAllIfSet(columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfSetIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression + setForAllIfNotSet(columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfNotSetIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression + ignoreIfSet>(...columns: COLUMNS[]): MaybeExecutableMultipleInsertExpression> + keepOnly>(...columns: COLUMNS[]): MaybeExecutableMultipleInsertExpression, COLUMNS>> + + setForAllIfHasValue(columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfHasValueIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression + setForAllIfHasNoValue(columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfHasNoValueIfValue(columns: OptionalInsertSets): ExecutableMultipleInsertExpression + ignoreIfHasValue(...columns: OptionalColumnsForSetOf
[]): ExecutableMultipleInsertExpression + ignoreIfHasNoValue(...columns: OptionalColumnsForSetOf
[]): ExecutableMultipleInsertExpression + ignoreAnySetWithNoValue(): ExecutableMultipleInsertExpression + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfNoValue(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + + setForAllWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression + setForAllIfSetWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression + setForAllIfNotSetWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression + ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MaybeExecutableMultipleInsertExpression> + keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MaybeExecutableMultipleInsertExpression, COLUMNS>> + + setForAllIfHasValueWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression + setForAllIfHasNoValueWhen(when: boolean, columns: InsertSets): ExecutableMultipleInsertExpression + setForAllIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ExecutableMultipleInsertExpression + ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): ExecutableMultipleInsertExpression + ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): ExecutableMultipleInsertExpression + ignoreAnySetWithNoValueWhen(when: boolean): ExecutableMultipleInsertExpression + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableMultipleInsertExpression } -export interface ShapedExecutableMultipleInsertExpression
, SHAPE> extends CustomizableExecutableMultipleInsert { - extendShape>(shape: EXTEND_SHAPE): MaybeShapedExecutableMultipleInsertExpression, keyof EXTEND_SHAPE, never> - setForAll(columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfSet(columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfSetIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfNotSet(columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfNotSetIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - ignoreIfSet>(...columns: COLUMNS[]): MaybeShapedExecutableMultipleInsertExpression, never> - keepOnly>(...columns: COLUMNS[]): MaybeShapedExecutableMultipleInsertExpression, COLUMNS>, never> - - setForAllIfHasValue(columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfHasValueIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfHasNoValue(columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfHasNoValueIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - ignoreIfHasValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - ignoreIfHasNoValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - ignoreAnySetWithNoValue(): ShapedExecutableMultipleInsertExpression - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfNoValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - - setForAllWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfSetWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfNotSetWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MaybeShapedExecutableMultipleInsertExpression, never> - keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MaybeShapedExecutableMultipleInsertExpression, COLUMNS>, never> - - setForAllIfHasValueWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfHasNoValueWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression - setForAllIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression - ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - ignoreAnySetWithNoValueWhen(when: boolean): ShapedExecutableMultipleInsertExpression - - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression - disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression +export interface ShapedExecutableMultipleInsertExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends CustomizableExecutableMultipleInsert { + extendShape>(shape: EXTEND_SHAPE): MaybeShapedExecutableMultipleInsertExpression, keyof EXTEND_SHAPE, never> + setForAll(columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfSet(columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfSetIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfNotSet(columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfNotSetIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + ignoreIfSet>(...columns: COLUMNS[]): MaybeShapedExecutableMultipleInsertExpression, never> + keepOnly>(...columns: COLUMNS[]): MaybeShapedExecutableMultipleInsertExpression, COLUMNS>, never> + + setForAllIfHasValue(columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfHasValueIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfHasNoValue(columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfHasNoValueIfValue(columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + ignoreIfHasValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + ignoreIfHasNoValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + ignoreAnySetWithNoValue(): ShapedExecutableMultipleInsertExpression + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfNoValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + + setForAllWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfSetWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfNotSetWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MaybeShapedExecutableMultipleInsertExpression, never> + keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MaybeShapedExecutableMultipleInsertExpression, COLUMNS>, never> + + setForAllIfHasValueWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfHasNoValueWhen(when: boolean, columns: InsertSets): ShapedExecutableMultipleInsertExpression + setForAllIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedExecutableMultipleInsertExpression + ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + ignoreAnySetWithNoValueWhen(when: boolean): ShapedExecutableMultipleInsertExpression + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedExecutableMultipleInsertExpression } -export interface MissingKeysMultipleInsertExpression
, MISSING_KEYS> extends InsertExpressionBase
{ - setForAll>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - setForAllIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - setForAllIfSet>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - setForAllIfSetIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - setForAllIfNotSet>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - setForAllIfNotSetIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - ignoreIfSet>(...columns: COLUMNS[]): MissingKeysMultipleInsertExpression) | MISSING_KEYS> - keepOnly>(...columns: COLUMNS[]): MissingKeysMultipleInsertExpression, COLUMNS> | MISSING_KEYS> +export interface MissingKeysMultipleInsertExpression, /*in|out*/ USING extends HasSource, /*in|out*/ MISSING_KEYS> extends InsertExpressionBase { + setForAll>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + setForAllIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + setForAllIfSet>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + setForAllIfSetIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + setForAllIfNotSet>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + setForAllIfNotSetIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + ignoreIfSet>(...columns: COLUMNS[]): MissingKeysMultipleInsertExpression) | MISSING_KEYS> + keepOnly>(...columns: COLUMNS[]): MissingKeysMultipleInsertExpression, COLUMNS> | MISSING_KEYS> - setForAllIfHasValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - setForAllIfHasValueIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - setForAllIfHasNoValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - setForAllIfHasNoValueIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> - ignoreIfHasValue(...columns: OptionalColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - ignoreIfHasNoValue(...columns: OptionalColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - ignoreAnySetWithNoValue(): MissingKeysMultipleInsertExpression - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfNoValue>(errorMessage: string, ...columns: COLUMNS[]): MissingKeysMultipleInsertExpression> - disallowIfNoValue>(error: Error, ...columns: COLUMNS[]): MissingKeysMultipleInsertExpression> - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - - setForAllWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression - setForAllIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression - setForAllIfSetWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression - setForAllIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression - setForAllIfNotSetWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression - setForAllIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression - ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MissingKeysMultipleInsertExpression) | MISSING_KEYS> - keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MissingKeysMultipleInsertExpression, COLUMNS> | MISSING_KEYS> - - setForAllIfHasValueWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression - setForAllIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression - setForAllIfHasNoValueWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression - setForAllIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression - ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - ignoreAnySetWithNoValueWhen(when: boolean): MissingKeysMultipleInsertExpression - - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression - disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + setForAllIfHasValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + setForAllIfHasValueIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + setForAllIfHasNoValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + setForAllIfHasNoValueIfValue>(columns: COLUMNS): MaybeExecutableMultipleInsertExpression>> + ignoreIfHasValue(...columns: OptionalColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + ignoreIfHasNoValue(...columns: OptionalColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + ignoreAnySetWithNoValue(): MissingKeysMultipleInsertExpression + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfNoValue>(errorMessage: string, ...columns: COLUMNS[]): MissingKeysMultipleInsertExpression> + disallowIfNoValue>(error: Error, ...columns: COLUMNS[]): MissingKeysMultipleInsertExpression> + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + + setForAllWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression + setForAllIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression + setForAllIfSetWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression + setForAllIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression + setForAllIfNotSetWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression + setForAllIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression + ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): MissingKeysMultipleInsertExpression) | MISSING_KEYS> + keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): MissingKeysMultipleInsertExpression, COLUMNS> | MISSING_KEYS> + + setForAllIfHasValueWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression + setForAllIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression + setForAllIfHasNoValueWhen(when: boolean, columns: InsertSets): MissingKeysMultipleInsertExpression + setForAllIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): MissingKeysMultipleInsertExpression + ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + ignoreAnySetWithNoValueWhen(when: boolean): MissingKeysMultipleInsertExpression + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): MissingKeysMultipleInsertExpression } -export interface ShapedMissingKeysMultipleInsertExpression
, SHAPE, MISSING_KEYS, MISSING_KEYS_IN_SHAPE> extends InsertExpressionBase
{ - extendShape>(shape: EXTEND_SHAPE): ShapedMissingKeysMultipleInsertExpression, MISSING_KEYS | keyof EXTEND_SHAPE, Exclude> - setForAll>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - setForAllIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - setForAllIfSet>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - setForAllIfSetIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - setForAllIfNotSet>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - setForAllIfNotSetIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - ignoreIfSet>(...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression) | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> - keepOnly>(...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression, COLUMNS> | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> +export interface ShapedMissingKeysMultipleInsertExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE, /*in|out*/ MISSING_KEYS, /*in|out*/ MISSING_KEYS_IN_SHAPE> extends InsertExpressionBase { + extendShape>(shape: EXTEND_SHAPE): ShapedMissingKeysMultipleInsertExpression, MISSING_KEYS | keyof EXTEND_SHAPE, Exclude> + setForAll>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + setForAllIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + setForAllIfSet>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + setForAllIfSetIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + setForAllIfNotSet>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + setForAllIfNotSetIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + ignoreIfSet>(...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression) | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> + keepOnly>(...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression, COLUMNS> | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> - setForAllIfHasValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - setForAllIfHasValueIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - setForAllIfHasNoValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - setForAllIfHasNoValueIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> - ignoreIfHasValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - ignoreIfHasNoValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - ignoreAnySetWithNoValue(): ShapedMissingKeysMultipleInsertExpression - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfNoValue>(errorMessage: string, ...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression, MISSING_KEYS_IN_SHAPE> - disallowIfNoValue>(error: Error, ...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression, MISSING_KEYS_IN_SHAPE> - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - - setForAllWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression - setForAllIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression - setForAllIfSetWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression - setForAllIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression - setForAllIfNotSetWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression - setForAllIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression - ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression) | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> - keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression, COLUMNS> | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> - - setForAllIfHasValueWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression - setForAllIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression - setForAllIfHasNoValueWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression - setForAllIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression - ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - ignoreAnySetWithNoValueWhen(when: boolean): ShapedMissingKeysMultipleInsertExpression - - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression - disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + setForAllIfHasValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + setForAllIfHasValueIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + setForAllIfHasNoValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + setForAllIfHasNoValueIfValue>(columns: COLUMNS): MaybeShapedExecutableMultipleInsertExpression>, MISSING_KEYS_IN_SHAPE> + ignoreIfHasValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + ignoreIfHasNoValue(...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + ignoreAnySetWithNoValue(): ShapedMissingKeysMultipleInsertExpression + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfNoValue>(errorMessage: string, ...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression, MISSING_KEYS_IN_SHAPE> + disallowIfNoValue>(error: Error, ...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression, MISSING_KEYS_IN_SHAPE> + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + + setForAllWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression + setForAllIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression + setForAllIfSetWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression + setForAllIfSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression + setForAllIfNotSetWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression + setForAllIfNotSetIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression + ignoreIfSetWhen>(when: boolean, ...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression) | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> + keepOnlyWhen>(when: boolean, ...columns: COLUMNS[]): ShapedMissingKeysMultipleInsertExpression, COLUMNS> | MISSING_KEYS, MISSING_KEYS_IN_SHAPE> + + setForAllIfHasValueWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression + setForAllIfHasValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression + setForAllIfHasNoValueWhen(when: boolean, columns: InsertSets): ShapedMissingKeysMultipleInsertExpression + setForAllIfHasNoValueIfValueWhen(when: boolean, columns: OptionalInsertSets): ShapedMissingKeysMultipleInsertExpression + ignoreIfHasValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + ignoreIfHasNoValueWhen(when: boolean, ...columns: OptionalColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + ignoreAnySetWithNoValueWhen(when: boolean): ShapedMissingKeysMultipleInsertExpression + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedMissingKeysMultipleInsertExpression } -export interface InsertExpression
> extends InsertExpressionBase
{ - shapedAs>(shape: SHAPE): ShapedInsertExpression, Exclude, SHAPE[keyof SHAPE]>> - dynamicSet(): MissingKeysInsertExpression> - dynamicSet>(columns: COLUMNS): MaybeExecutableInsertExpression, NonOptionalKeys>> - set(columns: MandatoryInsertSets): ExecutableInsertExpression
- setIfValue(columns: MandatoryOptionalInsertSets): ExecutableInsertExpression
- values(columns: Array>): CustomizableExecutableMultipleInsert - values(columns: MandatoryInsertSets): ExecutableInsertExpression
- dynamicValues>(columns: Array): MaybeExecutableMultipleInsertExpression, NonOptionalKeys>> - dynamicValues>(columns: COLUMNS): MaybeExecutableInsertExpression, NonOptionalKeys>> - defaultValues: DefaultValueType
- from(select: IExecutableSelectQuery, SelectForInsertColumns
, NoTableOrViewRequiredView>): CustomizableExecutableInsertFromSelect +export interface InsertExpression, /*in|out*/ USING extends HasSource> extends InsertExpressionBase { + shapedAs>(shape: SHAPE): ShapedInsertExpression, Exclude, SHAPE[keyof SHAPE]>> + dynamicSet(): MissingKeysInsertExpression> + dynamicSet>(columns: COLUMNS): MaybeExecutableInsertExpression, NonOptionalKeys>> + set(columns: MandatoryInsertSets): ExecutableInsertExpression + setIfValue(columns: MandatoryOptionalInsertSets): ExecutableInsertExpression + values(columns: Array>): CustomizableExecutableMultipleInsert + values(columns: MandatoryInsertSets): ExecutableInsertExpression + dynamicValues>(columns: Array): MaybeExecutableMultipleInsertExpression, NonOptionalKeys>> + dynamicValues>(columns: COLUMNS): MaybeExecutableInsertExpression, NonOptionalKeys>> + defaultValues: DefaultValueType + from(select: IExecutableSelectQuery, SelectForInsertResultType>): CustomizableExecutableInsertFromSelect } -export interface ShapedInsertExpression
, SHAPE, MISSING_KEYS_IN_SHAPE> extends InsertExpressionBase
{ - extendShape>(shape: EXTEND_SHAPE): ShapedInsertExpression, Exclude> - dynamicSet(): ShapedMissingKeysInsertExpression, MISSING_KEYS_IN_SHAPE> - dynamicSet>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> - set>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> - setIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> - values>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> - values>(columns: Array): MaybeShapedExecutableMultipleInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> - dynamicValues>(columns: Array): MaybeShapedExecutableMultipleInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> - dynamicValues>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> +export interface ShapedInsertExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE, /*in|out*/ MISSING_KEYS_IN_SHAPE> extends InsertExpressionBase { + extendShape>(shape: EXTEND_SHAPE): ShapedInsertExpression, Exclude> + dynamicSet(): ShapedMissingKeysInsertExpression, MISSING_KEYS_IN_SHAPE> + dynamicSet>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> + set>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> + setIfValue>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> + values>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> + values>(columns: Array): MaybeShapedExecutableMultipleInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> + dynamicValues>(columns: Array): MaybeShapedExecutableMultipleInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> + dynamicValues>(columns: COLUMNS): MaybeShapedExecutableInsertExpression, NonOptionalKeys>, MISSING_KEYS_IN_SHAPE> } -export interface ExecutableInsertReturning
, COLUMNS, RESULT> extends InsertExpressionBase
, IExecutableInsertQuery { +export interface ExecutableInsertReturning, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends InsertExpressionBase, IExecutableInsertQuery, RESULT> { executeInsertNoneOrOne(): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] }) | null> executeInsertOne(): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })> executeInsertMany(min?: number, max?: number): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[]> @@ -643,12 +640,12 @@ export interface ExecutableInsertReturning
, COLU params(): any[] } -export interface ComposableCustomizableExecutableInsert
, COLUMNS, RESULT> extends ExecutableInsertReturning { - customizeQuery(customization: InsertCustomization): ExecutableInsertReturning +export interface ComposableCustomizableExecutableInsert, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends ExecutableInsertReturning { + customizeQuery(customization: InsertCustomization): ExecutableInsertReturning } -export interface ComposableCustomizableExecutableInsertProjectableAsNullable
, COLUMNS> extends ComposableCustomizableExecutableInsert> { - projectingOptionalValuesAsNullable(): ComposableCustomizableExecutableInsert> +export interface ComposableCustomizableExecutableInsertProjectableAsNullable, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS> extends ComposableCustomizableExecutableInsert> { + projectingOptionalValuesAsNullable(): ComposableCustomizableExecutableInsert> } @@ -659,7 +656,7 @@ export interface ComposableCustomizableExecutableInsertProjectableAsNullable, COLUMNS, RESULT> extends InsertExpressionBase
, IExecutableInsertQuery { +export interface ExecutableInsertReturningOptional, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends InsertExpressionBase, IExecutableInsertQuery, RESULT> { executeInsertNoneOrOne(): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] }) | null> executeInsertMany(min?: number, max?: number): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[]> @@ -667,12 +664,12 @@ export interface ExecutableInsertReturningOptional
, COLUMNS, RESULT> extends ExecutableInsertReturningOptional { - customizeQuery(customization: InsertCustomization): ExecutableInsertReturningOptional +export interface ComposableCustomizableExecutableInsertOptional, /*in|out*/ USING extends HasSource, COLUMNS, RESULT> extends ExecutableInsertReturningOptional { + customizeQuery(customization: InsertCustomization): ExecutableInsertReturningOptional } -export interface ComposableCustomizableExecutableInsertOptionalProjectableAsNullable
, COLUMNS> extends ComposableCustomizableExecutableInsertOptional> { - projectingOptionalValuesAsNullable(): ComposableCustomizableExecutableInsertOptional> +export interface ComposableCustomizableExecutableInsertOptionalProjectableAsNullable, /*in|out*/ USING extends HasSource, COLUMNS> extends ComposableCustomizableExecutableInsertOptional> { + projectingOptionalValuesAsNullable(): ComposableCustomizableExecutableInsertOptional> } @@ -681,280 +678,280 @@ export interface ComposableCustomizableExecutableInsertOptionalProjectableAsNull -type ReturningFnType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB | Oracle) - ? >(columns: COLUMNS) => ComposableCustomizableExecutableInsertProjectableAsNullable +type ReturningFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB' | 'oracle'> + ? >(columns: COLUMNS) => ComposableCustomizableExecutableInsertProjectableAsNullable : never -type ReturningOneColumnFnType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB | Oracle) - ? >>(column: COLUMN) => ComposableCustomizableExecutableInsert> +type ReturningOneColumnFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB' | 'oracle'> + ? >(column: COLUMN) => ComposableCustomizableExecutableInsert> : never -type ReturningFromSelectFnType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB) - ? >(columns: COLUMNS) => ComposableCustomizableExecutableInsertProjectableAsNullable +type ReturningFromSelectFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB'> + ? >(columns: COLUMNS) => ComposableCustomizableExecutableInsertProjectableAsNullable : never -type ReturningOneColumnFromSelectFnType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB) - ? >>(column: COLUMN) => ComposableCustomizableExecutableInsert> +type ReturningOneColumnFromSelectFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB'> + ? >(column: COLUMN) => ComposableCustomizableExecutableInsert> : never -type ReturningMultipleLastInsertedIdType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Oracle | Sqlite | MariaDB) - ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId[]> +type ReturningMultipleLastInsertedIdType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB' | 'oracle'> + ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId[]> : never -type ReturningLastInsertedIdType
> = - [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId> +type ReturningLastInsertedIdType
, USING extends HasSource> = + [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId> -type OnConflictReturningLastInsertedIdType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql /*| SqlServer | Oracle not suported yet*/ | Sqlite | MariaDB) - ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId> +type OnConflictReturningLastInsertedIdType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' /*| 'sqlServer' | 'oracle' not suported yet*/ | 'sqlite' | 'mariaDB'> + ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId> : never -type ReturningLastInsertedIdFromSelectType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB) - ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId[]> +type ReturningLastInsertedIdFromSelectType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB'> + ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId[]> : never -type ReturningOptionalFnType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB | Oracle) - ? >(columns: COLUMNS) => ComposableCustomizableExecutableInsertOptionalProjectableAsNullable +type ReturningOptionalFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB' | 'oracle'> + ? >(columns: COLUMNS) => ComposableCustomizableExecutableInsertOptionalProjectableAsNullable : never -type ReturningOneColumnOptionalFnType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB | Oracle) - ? >>(column: COLUMN) => ComposableCustomizableExecutableInsertOptional> +type ReturningOneColumnOptionalFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB' | 'oracle'> + ? >(column: COLUMN) => ComposableCustomizableExecutableInsertOptional> : never -type ReturningFromSelectOptionalFnType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB) - ? >(columns: COLUMNS) => ComposableCustomizableExecutableInsertOptionalProjectableAsNullable +type ReturningFromSelectOptionalFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB'> + ? >(columns: COLUMNS) => ComposableCustomizableExecutableInsertOptionalProjectableAsNullable : never -type ReturningOneColumnFromSelectOptionalFnType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB) - ? >>(column: COLUMN) => ComposableCustomizableExecutableInsertOptional> +type ReturningOneColumnFromSelectOptionalFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB'> + ? >(column: COLUMN) => ComposableCustomizableExecutableInsertOptional> : never -type ReturningMultipleLastInsertedIdOptionalType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Oracle | Sqlite | MariaDB) - ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId[]> +type ReturningMultipleLastInsertedIdOptionalType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB' | 'oracle'> + ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId[]> : never -type OnConflictReturningLastInsertedIdOptionalType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql /*| SqlServer | Oracle not suported yet*/ | Sqlite | MariaDB) - ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId | null> +type OnConflictReturningLastInsertedIdOptionalType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' /*| 'sqlServer' | 'oracle' not suported yet*/ | 'sqlite' | 'mariaDB'> + ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId | null> : never -type ReturningLastInsertedIdFromSelectOptionalType
> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB) - ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId[]> +type ReturningLastInsertedIdFromSelectOptionalType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB'> + ? [AutogeneratedPrimaryKeyColumnsTypesOf
] extends [never] ? never : () => CustomizableExecutableInsertReturningLastInsertedId[]> : never -export interface InsertOnConflictSetsExpression
, NEXT, NEXT_WHERE> { - set(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfSet(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfSetIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfNotSet(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfNotSetIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - ignoreIfSet(...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - keepOnly(...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - - setIfHasValue(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfHasValueIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfHasNoValue(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfHasNoValueIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - ignoreIfHasValue(...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - ignoreIfHasNoValue(...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - ignoreAnySetWithNoValue(): InsertOnConflictSetsExpression & NEXT - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfNoValue(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - - setWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfValueWhen(when: boolean, olumns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfSetWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfSetIfValueWhen(when: boolean, columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfNotSetWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfNotSetIfValueWhen(when: boolean, columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - ignoreIfSetWhen(when: boolean, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - keepOnlyWhen(when: boolean, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - - setIfHasValueWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfHasValueIfValueWhen(when: boolean, columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfHasNoValueWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT - setIfHasNoValueIfValueWhen(when: boolean, columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT - ignoreIfHasValueWhen(when: boolean, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - ignoreIfHasNoValueWhen(when: boolean, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - ignoreAnySetWithNoValueWhen(when: boolean): InsertOnConflictSetsExpression & NEXT - - disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT - - dynamicWhere: OnConflictDoUpdateDynamicWhereFnType - where: OnConflictDoUpdateWhereFnType +export interface InsertOnConflictSetsExpression, /*in|out*/ USING extends HasSource, /*in|out*/ NEXT, /*in|out*/ NEXT_WHERE> { + set(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfSet(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfSetIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfNotSet(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfNotSetIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + ignoreIfSet(...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + keepOnly(...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + + setIfHasValue(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfHasValueIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfHasNoValue(columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfHasNoValueIfValue(columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + ignoreIfHasValue(...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + ignoreIfHasNoValue(...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + ignoreAnySetWithNoValue(): InsertOnConflictSetsExpression & NEXT + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfSet(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfValue(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfNoValue(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + + setWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfValueWhen(when: boolean, olumns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfSetWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfSetIfValueWhen(when: boolean, columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfNotSetWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfNotSetIfValueWhen(when: boolean, columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + ignoreIfSetWhen(when: boolean, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + keepOnlyWhen(when: boolean, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + + setIfHasValueWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfHasValueIfValueWhen(when: boolean, columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfHasNoValueWhen(when: boolean, columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT + setIfHasNoValueIfValueWhen(when: boolean, columns: OnConflictOptionalUpdateSets): InsertOnConflictSetsExpression & NEXT + ignoreIfHasValueWhen(when: boolean, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + ignoreIfHasNoValueWhen(when: boolean, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + ignoreAnySetWithNoValueWhen(when: boolean): InsertOnConflictSetsExpression & NEXT + + disallowIfSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfNotSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfNotSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfNoValueWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowIfNoValueWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowAnyOtherSetWhen(when: boolean, errorMessage: string, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): InsertOnConflictSetsExpression & NEXT + + dynamicWhere: OnConflictDoUpdateDynamicWhereFnType + where: OnConflictDoUpdateWhereFnType } -export interface ShapedInsertOnConflictSetsExpression
, SHAPE, NEXT, NEXT_WHERE> { - extendShape>(shape: EXTEND_SHAPE): ShapedInsertOnConflictSetsExpression, NEXT, NEXT_WHERE> - set(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfSet(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfSetIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfNotSet(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfNotSetIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - ignoreIfSet(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - keepOnly(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - - setIfHasValue(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfHasValueIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfHasNoValue(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfHasNoValueIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - ignoreIfHasValue(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - ignoreIfHasNoValue(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - ignoreAnySetWithNoValue(): ShapedInsertOnConflictSetsExpression & NEXT - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfNoValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - - set(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfSet(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfSetIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfNotSet(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfNotSetIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - ignoreIfSet(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - keepOnly(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - - setIfHasValue(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfHasValueIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfHasNoValue(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - setIfHasNoValueIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT - ignoreIfHasValue(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - ignoreIfHasNoValue(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - ignoreAnySetWithNoValue(): ShapedInsertOnConflictSetsExpression & NEXT - - disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowIfNoValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT - - dynamicWhere: OnConflictDoUpdateDynamicWhereFnType - where: OnConflictDoUpdateWhereFnType +export interface ShapedInsertOnConflictSetsExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE, NEXT, /*in|out*/ NEXT_WHERE> { + extendShape>(shape: EXTEND_SHAPE): ShapedInsertOnConflictSetsExpression, NEXT, NEXT_WHERE> + set(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfSet(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfSetIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfNotSet(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfNotSetIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + ignoreIfSet(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + keepOnly(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + + setIfHasValue(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfHasValueIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfHasNoValue(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfHasNoValueIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + ignoreIfHasValue(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + ignoreIfHasNoValue(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + ignoreAnySetWithNoValue(): ShapedInsertOnConflictSetsExpression & NEXT + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfNoValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + + set(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfSet(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfSetIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfNotSet(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfNotSetIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + ignoreIfSet(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + keepOnly(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + + setIfHasValue(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfHasValueIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfHasNoValue(columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + setIfHasNoValueIfValue(columns: OnConflictOptionalUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT + ignoreIfHasValue(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + ignoreIfHasNoValue(...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + ignoreAnySetWithNoValue(): ShapedInsertOnConflictSetsExpression & NEXT + + disallowIfSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfNotSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfNotSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfNoValue(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowIfNoValue(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowAnyOtherSet(errorMessage: string, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + disallowAnyOtherSet(error: Error, ...columns: ColumnsForSetOfWithShape[]): ShapedInsertOnConflictSetsExpression & NEXT + + dynamicWhere: OnConflictDoUpdateDynamicWhereFnType + where: OnConflictDoUpdateWhereFnType } -export interface DynamicOnConflictWhereExpression
, NEXT> { - and(condition: IIfValueSource, any>): DynamicOnConflictWhereExpression & NEXT - and(condition: IBooleanValueSource, any>): DynamicOnConflictWhereExpression & NEXT - or(condition: IIfValueSource, any>): DynamicOnConflictWhereExpression & NEXT - or(condition: IBooleanValueSource, any>): DynamicOnConflictWhereExpression & NEXT +export interface DynamicOnConflictWhereExpression, /*in|out*/ USING extends HasSource, NEXT> { + and(condition: IIfValueSource): DynamicOnConflictWhereExpression & NEXT + and(condition: IBooleanValueSource): DynamicOnConflictWhereExpression & NEXT + or(condition: IIfValueSource): DynamicOnConflictWhereExpression & NEXT + or(condition: IBooleanValueSource): DynamicOnConflictWhereExpression & NEXT } -export interface OnConflictOnColumnWhere
, NEXT> { - dynamicWhere() : DynamicOnConflictWhereExpression & NEXT - where(condition: IIfValueSource, any>): DynamicOnConflictWhereExpression & NEXT - where(condition: IBooleanValueSource, any>): DynamicOnConflictWhereExpression & NEXT +export interface OnConflictOnColumnWhere, /*in|out*/ USING extends HasSource, NEXT> { + dynamicWhere() : DynamicOnConflictWhereExpression & NEXT + where(condition: IIfValueSource): DynamicOnConflictWhereExpression & NEXT + where(condition: IBooleanValueSource): DynamicOnConflictWhereExpression & NEXT } -type OnConflictDoNothingFnType
, NEXT> = - TABLE[typeof database] extends (NoopDB | PostgreSql | Sqlite | MariaDB | MySql) +type OnConflictDoNothingFnType
, _USING extends HasSource, NEXT> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlite' | 'mariaDB' | 'mySql'> ? () => NEXT : never -type OnConflictDoUpdateDynamicSetFn
, NEXT, NEXT_WHERE> = { - (): InsertOnConflictSetsExpression & NEXT - (columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT +type OnConflictDoUpdateDynamicSetFn, /*in|out*/ USING extends HasSource, /*in|out*/ NEXT, /*in|out*/ NEXT_WHERE> = { + (): InsertOnConflictSetsExpression & NEXT + (columns: OnConflictUpdateSets): InsertOnConflictSetsExpression & NEXT } -type ShapedOnConflictDoUpdateDynamicSetFn
, SHAPE, NEXT, NEXT_WHERE> = { - (): ShapedInsertOnConflictSetsExpression & NEXT - (columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT +type ShapedOnConflictDoUpdateDynamicSetFn, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE, /*in|out*/ NEXT, /*in|out*/ NEXT_WHERE> = { + (): ShapedInsertOnConflictSetsExpression & NEXT + (columns: OnConflictUpdateSets): ShapedInsertOnConflictSetsExpression & NEXT } -type OnConflictDoUpdateDynamicSetFnType
, SHAPE, NEXT, NEXT_WHERE> = - TABLE[typeof database] extends (NoopDB | PostgreSql | Sqlite | MariaDB | MySql) - ? ( - SHAPE extends ResolvedShape
- ? ShapedOnConflictDoUpdateDynamicSetFn - : OnConflictDoUpdateDynamicSetFn - ) - : never - -type OnConflictDoUpdateSetFnType
, SHAPE, NEXT, NEXT_WHERE> = - TABLE[typeof database] extends (NoopDB | PostgreSql | Sqlite | MariaDB | MySql) - ? (columns: OnConflictUpdateSets) => InsertOnConflictSetsExpression & NEXT - : never - -type OnConflictDoUpdateDynamicWhereFnType
, NEXT> = - TABLE[typeof database] extends (NoopDB | PostgreSql | Sqlite) - ? () => DynamicOnConflictWhereExpression & NEXT - : never - -type OnConflictDoUpdateWhereFnType
, NEXT> = - TABLE[typeof database] extends (NoopDB | PostgreSql | Sqlite) - ? OnConflictDoUpdateWhereFnTypeInterface - : never - -interface OnConflictDoUpdateWhereFnTypeInterface
, NEXT> { - (condition: IIfValueSource, any>): DynamicOnConflictWhereExpression & NEXT - (condition: IBooleanValueSource, any>): DynamicOnConflictWhereExpression & NEXT +type OnConflictDoUpdateDynamicSetFnType
, USING extends HasSource, SHAPE, NEXT, NEXT_WHERE> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlite' | 'mariaDB' | 'mySql'> + ? ( + SHAPE extends ResolvedShape + ? ShapedOnConflictDoUpdateDynamicSetFn + : OnConflictDoUpdateDynamicSetFn + ) + : never + +type OnConflictDoUpdateSetFnType
, USING extends HasSource, SHAPE, NEXT, NEXT_WHERE> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlite' | 'mariaDB' | 'mySql'> + ? (columns: OnConflictUpdateSets) => InsertOnConflictSetsExpression & NEXT + : never + +type OnConflictDoUpdateDynamicWhereFnType
, USING extends HasSource, NEXT> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlite'> + ? () => DynamicOnConflictWhereExpression & NEXT + : never + +type OnConflictDoUpdateWhereFnType
, USING extends HasSource, NEXT> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlite'> + ? OnConflictDoUpdateWhereFnTypeInterface + : never + +interface OnConflictDoUpdateWhereFnTypeInterface, /*in|out*/ USING extends HasSource, /*in|out*/ NEXT> { + (condition: IIfValueSource): DynamicOnConflictWhereExpression & NEXT + (condition: IBooleanValueSource): DynamicOnConflictWhereExpression & NEXT } -type OnConflictOnColumnFnType
, NEXT> = - TABLE[typeof database] extends (NoopDB | PostgreSql | Sqlite) - ? (column: ValueSourceOf>, ...columns: ValueSourceOf>[]) => NEXT & OnConflictOnColumnWhere - : never +type OnConflictOnColumnFnType
, USING extends HasSource, NEXT> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlite'> + ? (column: ValueSourceOf, ...columns: ValueSourceOf[]) => NEXT & OnConflictOnColumnWhere + : never -type OnConflictOnConstraintFnType
, NEXT> = - TABLE[typeof database] extends (NoopDB | PostgreSql) - ? OnConflictOnConstraintFnTypeInterface - : never +type OnConflictOnConstraintFnType
, USING extends HasSource, NEXT> = + TABLE extends OfDB<'noopDB' | 'postgreSql'> + ? OnConflictOnConstraintFnTypeInterface + : never -interface OnConflictOnConstraintFnTypeInterface
, NEXT> { +interface OnConflictOnConstraintFnTypeInterface, /*in|out*/ _USING extends HasSource, NEXT> { (constraint: string): NEXT - (constraint: IStringValueSource, 'required'>): NEXT - (constraint: RawFragment): NEXT + (constraint: IStringValueSource, 'required'>): NEXT + (constraint: RawFragment>): NEXT } @@ -963,8 +960,8 @@ interface OnConflictOnConstraintFnTypeInterface
, -export type InsertColumns
> = { - [P: string]: ValueSourceOf> | InsertColumns
+export type InsertColumns = { + [P: string]: ValueSourceOf | InsertColumns [P: number | symbol]: never } @@ -974,100 +971,106 @@ export type InsertColumns
> = { -type DefaultValueType
> = - unknown extends TABLE ? () => CustomizableExecutableSimpleInsertOnConflict
: // this is the case when TABLE is any - [RequiredColumnsForSetOf
] extends [never] ? () => CustomizableExecutableSimpleInsertOnConflict
: never +type DefaultValueType
, USING extends HasSource> = + unknown extends TABLE ? () => CustomizableExecutableSimpleInsertOnConflict : // this is the case when TABLE is any + [RequiredColumnsForSetOf
] extends [never] ? () => CustomizableExecutableSimpleInsertOnConflict : never -type MaybeExecutableInsertExpression
, MISSING_KEYS> = - [MISSING_KEYS] extends [never] ? ExecutableInsertExpression
: MissingKeysInsertExpression +type MaybeExecutableInsertExpression
, USING extends HasSource, MISSING_KEYS> = + [MISSING_KEYS] extends [never] ? ExecutableInsertExpression : MissingKeysInsertExpression -type MaybeShapedExecutableInsertExpression
, SHAPE, MISSING_KEYS, MISSING_KEYS_IN_SHAPE> = +type MaybeShapedExecutableInsertExpression
, USING extends HasSource, SHAPE, MISSING_KEYS, MISSING_KEYS_IN_SHAPE> = [MISSING_KEYS] extends [never] ? ( [MISSING_KEYS_IN_SHAPE] extends [never] - ? ShapedExecutableInsertExpression - : ShapedMissingKeysInsertExpression - ) : ShapedMissingKeysInsertExpression + ? ShapedExecutableInsertExpression + : ShapedMissingKeysInsertExpression + ) : ShapedMissingKeysInsertExpression -type MaybeExecutableMultipleInsertExpression
, MISSING_KEYS> = - [MISSING_KEYS] extends [never] ? ExecutableMultipleInsertExpression
: MissingKeysMultipleInsertExpression +type MaybeExecutableMultipleInsertExpression
, USING extends HasSource, MISSING_KEYS> = + [MISSING_KEYS] extends [never] ? ExecutableMultipleInsertExpression : MissingKeysMultipleInsertExpression -type MaybeShapedExecutableMultipleInsertExpression
, SHAPE, MISSING_KEYS, MISSING_KEYS_IN_SHAPE> = +type MaybeShapedExecutableMultipleInsertExpression
, USING extends HasSource, SHAPE, MISSING_KEYS, MISSING_KEYS_IN_SHAPE> = [MISSING_KEYS] extends [never] ? ( [MISSING_KEYS_IN_SHAPE] extends [never] - ? ShapedExecutableMultipleInsertExpression - : ShapedMissingKeysMultipleInsertExpression - ) : ShapedMissingKeysMultipleInsertExpression + ? ShapedExecutableMultipleInsertExpression + : ShapedMissingKeysMultipleInsertExpression + ) : ShapedMissingKeysMultipleInsertExpression -type SelectForInsertResultType
> = { +type SelectForInsertResultType
, _USING extends HasSource> = { [P in RequiredColumnsForSetOf
]: ValueSourceValueType } & { [P in OptionalColumnsForSetOf
]?: ValueSourceValueType } -type SelectForInsertColumns
> = { +type SelectForInsertColumns
, _USING extends HasSource> = { [P in RequiredColumnsForSetOf
]: RemapIValueSourceType } & { [P in OptionalColumnsForSetOf
]?: RemapIValueSourceTypeWithOptionalType } -export type InsertShape
> = { +export type InsertShape, /*in|out*/ _USING extends HasSource> = { + [key: string]: ColumnsForSetOf
+} +export type InsertShapeContent> = { [key: string]: ColumnsForSetOf
} type NonOptionalKeys = MandatoryPropertiesOf -export type InsertSets
, SHAPE> = - SHAPE extends ResolvedShape
+export type InsertSets
, _USING extends HasSource, SHAPE> = InsertSetsContent, SHAPE> +type InsertSetsContent
, ALLOWING extends NSource, SHAPE> = + SHAPE extends ResolvedShape ? ( { - [P in RequiredColumnsForSetOf]?: InputTypeOfColumn + [P in RequiredColumnsForSetOf]?: InputTypeOfColumn } & { - [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn + [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn } ) : ( { - [P in RequiredColumnsForSetOf
]?: InputTypeOfColumn + [P in RequiredColumnsForSetOf
]?: InputTypeOfColumn } & { - [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumn + [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumn } ) -export type OptionalInsertSets
, SHAPE> = - SHAPE extends ResolvedShape
+export type OptionalInsertSets
, _USING extends HasSource, SHAPE> = OptionalInsertSetsContent, SHAPE> +type OptionalInsertSetsContent
, ALLOWING extends NSource, SHAPE> = + SHAPE extends ResolvedShape ? ( { - [P in RequiredColumnsForSetOf]?: InputTypeOfColumn | null | undefined + [P in RequiredColumnsForSetOf]?: InputTypeOfColumn | null | undefined } & { - [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn | null | undefined + [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn | null | undefined } ) : ( { - [P in RequiredColumnsForSetOf
]?: InputTypeOfColumn | null | undefined + [P in RequiredColumnsForSetOf
]?: InputTypeOfColumn | null | undefined } & { - [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumn | null | undefined + [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumn | null | undefined } ) -export type MandatoryInsertSets
, SHAPE> = - SHAPE extends ResolvedShape
+export type MandatoryInsertSets
, _USING extends HasSource, SHAPE> = MandatoryInsertSetsContent, SHAPE> +export type MandatoryInsertSetsContent = + SHAPE extends ResolvedShape ? ( { - [P in RequiredColumnsForSetOf]: InputTypeOfColumn + [P in RequiredColumnsForSetOf]: InputTypeOfColumn } & { - [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn + [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn } ) : ( { - [P in RequiredColumnsForSetOf
]: InputTypeOfColumn + [P in RequiredColumnsForSetOf]: InputTypeOfColumn } & { - [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumn + [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn } ) -export type MandatoryInsertValues
, SHAPE> = - SHAPE extends ResolvedShape
+export type MandatoryInsertValues = + SHAPE extends ResolvedShape ? ( { [P in RequiredColumnsForSetOf]: ValueSourceValueType @@ -1076,64 +1079,66 @@ export type MandatoryInsertValues
, SHAPE> = } ) : ( { - [P in RequiredColumnsForSetOf
]: ValueSourceValueType + [P in RequiredColumnsForSetOf]: ValueSourceValueType } & { - [P in OptionalColumnsForSetOf
]?: ValueSourceValueType + [P in OptionalColumnsForSetOf]?: ValueSourceValueType } ) -type MandatoryOptionalInsertSets
, SHAPE> = - SHAPE extends ResolvedShape
+type MandatoryOptionalInsertSets
, _USING extends HasSource, SHAPE> = MandatoryOptionalInsertSetsContent, SHAPE> +type MandatoryOptionalInsertSetsContent
, ALLOWING extends NSource, SHAPE> = + SHAPE extends ResolvedShape ? ( { - [P in RequiredColumnsForSetOf]: InputTypeOfColumn + [P in RequiredColumnsForSetOf]: InputTypeOfColumn } & { - [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn | null | undefined + [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumn | null | undefined } ) : ( { - [P in RequiredColumnsForSetOf
]: InputTypeOfColumn + [P in RequiredColumnsForSetOf
]: InputTypeOfColumn } & { - [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumn | null | undefined + [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumn | null | undefined } ) -type InputTypeOfColumn
, K extends ColumnsOf
> = - TABLE[K] extends ValueSourceOf ? - (TABLE[K] extends ColumnWithDefaultValue ? ( - ValueSourceValueType | RemapIValueSourceType, TABLE[K]> | Default +type InputTypeOfColumn, ALLOWING extends NSource> = + CONTAINER[K] extends AnyValueSource ? + (CONTAINER[K] extends ColumnWithDefaultValue ? ( + ValueSourceValueType | RemapIValueSourceType | Default ) : ( - ValueSourceValueType | RemapIValueSourceType, TABLE[K]> + ValueSourceValueType | RemapIValueSourceType )) : never -type InputTypeOfOptionalColumn
, K extends ColumnsOf
> = - TABLE[K] extends ValueSourceOf ? - (TABLE[K] extends ColumnWithDefaultValue ? ( - ValueSourceValueType | RemapIValueSourceTypeWithOptionalType, TABLE[K], any> | Default +type InputTypeOfOptionalColumn, ALLOWING extends NSource> = + CONTAINER[K] extends AnyValueSource ? + (CONTAINER[K] extends ColumnWithDefaultValue ? ( + ValueSourceValueType | RemapIValueSourceTypeWithOptionalType | Default ) : ( - ValueSourceValueType | RemapIValueSourceTypeWithOptionalType, TABLE[K], any> + ValueSourceValueType | RemapIValueSourceTypeWithOptionalType )) : never -export type OnConflictUpdateSets
, SHAPE> = - SHAPE extends ResolvedShape
+export type OnConflictUpdateSets
, USING extends HasSource, SHAPE> = OnConflictUpdateSetsContent, SHAPE> +export type OnConflictUpdateSetsContent = + SHAPE extends ResolvedShape ? ( { - [P in RequiredColumnsForSetOf]?: OnConflictInputTypeOfColumn + [P in RequiredColumnsForSetOf]?: OnConflictInputTypeOfColumn } & { - [P in OptionalColumnsForSetOf]?: OnConflictInputTypeOfOptionalColumn + [P in OptionalColumnsForSetOf]?: OnConflictInputTypeOfOptionalColumn } ) : ( { - [P in RequiredColumnsForSetOf
]?: OnConflictInputTypeOfColumn + [P in RequiredColumnsForSetOf]?: OnConflictInputTypeOfColumn } & { - [P in OptionalColumnsForSetOf
]?: OnConflictInputTypeOfOptionalColumn + [P in OptionalColumnsForSetOf]?: OnConflictInputTypeOfOptionalColumn } ) -export type OnConflictUpdateValues
, SHAPE> = - SHAPE extends ResolvedShape
+export type OnConflictUpdateValues = + SHAPE extends ResolvedShape ? ( { [P in RequiredColumnsForSetOf]?: ValueSourceValueType @@ -1142,42 +1147,43 @@ export type OnConflictUpdateValues
, SHAPE> = } ) : ( { - [P in RequiredColumnsForSetOf
]?: ValueSourceValueType + [P in RequiredColumnsForSetOf]?: ValueSourceValueType } & { - [P in OptionalColumnsForSetOf
]?: ValueSourceValueType + [P in OptionalColumnsForSetOf]?: ValueSourceValueType } ) -type OnConflictOptionalUpdateSets
, SHAPE> = - SHAPE extends ResolvedShape
+type OnConflictOptionalUpdateSets
, USING extends HasSource, SHAPE> = OnConflictOptionalUpdateSetsContent, SHAPE> +type OnConflictOptionalUpdateSetsContent
, ALLOWING extends NSource, SHAPE> = + SHAPE extends ResolvedShape ? ( { - [P in RequiredColumnsForSetOf]?: OnConflictInputTypeOfColumn | null | undefined + [P in RequiredColumnsForSetOf]?: OnConflictInputTypeOfColumn | null | undefined } & { - [P in OptionalColumnsForSetOf]?: OnConflictInputTypeOfOptionalColumn | null | undefined + [P in OptionalColumnsForSetOf]?: OnConflictInputTypeOfOptionalColumn | null | undefined } ) : ( { - [P in RequiredColumnsForSetOf
]?: OnConflictInputTypeOfColumn | null | undefined + [P in RequiredColumnsForSetOf
]?: OnConflictInputTypeOfColumn | null | undefined } & { - [P in OptionalColumnsForSetOf
]?: OnConflictInputTypeOfOptionalColumn | null | undefined + [P in OptionalColumnsForSetOf
]?: OnConflictInputTypeOfOptionalColumn | null | undefined } ) -type OnConflictInputTypeOfColumn
, K extends ColumnsOf
> = - TABLE[K] extends ValueSourceOf ? - (TABLE[K] extends ColumnWithDefaultValue ? ( - ValueSourceValueType | RemapIValueSourceType | VALUES_FOR_INSERT, TABLE[K]> | Default +type OnConflictInputTypeOfColumn, ALLOWING extends NSource> = + CONTAINER[K] extends AnyValueSource ? + (CONTAINER[K] extends ColumnWithDefaultValue ? ( + ValueSourceValueType | RemapIValueSourceType | Default ) : ( - ValueSourceValueType | RemapIValueSourceType | VALUES_FOR_INSERT, TABLE[K]> + ValueSourceValueType | RemapIValueSourceType )) : never -type OnConflictInputTypeOfOptionalColumn
, K extends ColumnsOf
> = - TABLE[K] extends ValueSourceOf ? - (TABLE[K] extends ColumnWithDefaultValue ? ( - ValueSourceValueType | RemapIValueSourceTypeWithOptionalType | VALUES_FOR_INSERT, TABLE[K], any> | Default +type OnConflictInputTypeOfOptionalColumn, ALLOWING extends NSource> = + CONTAINER[K] extends AnyValueSource ? + (CONTAINER[K] extends ColumnWithDefaultValue ? ( + ValueSourceValueType | RemapIValueSourceTypeWithOptionalType | Default ) : ( - ValueSourceValueType | RemapIValueSourceTypeWithOptionalType | VALUES_FOR_INSERT, TABLE[K], any> + ValueSourceValueType | RemapIValueSourceTypeWithOptionalType )) : never diff --git a/src/expressions/select.ts b/src/expressions/select.ts index 7f7a27dd..619da4ac 100644 --- a/src/expressions/select.ts +++ b/src/expressions/select.ts @@ -1,50 +1,60 @@ -import type { IBooleanValueSource, INumberValueSource, IIfValueSource, IExecutableSelectQuery, AnyValueSource, ValueSourceOf, ValueSourceValueTypeForResult, RemapValueSourceType, RemapValueSourceTypeWithOptionalType, AggregatedArrayValueSource, IValueSource } from "./values" -import type { ITableOrViewOf, NoTableOrViewRequired, NoTableOrViewRequiredView, OuterJoinSource } from "../utils/ITableOrView" -import type { OuterJoinTableOrView, WithView, WITH_VIEW } from "../utils/tableOrViewUtils" -import type { AnyDB, NoopDB, MariaDB, PostgreSql, Sqlite, Oracle, SqlServer } from "../databases" -import type { columnsType, database, requiredTableOrView, tableOrViewRef, resultType, compoundableColumns, valueType } from "../utils/symbols" -import type { RawFragment } from "../utils/RawFragment" +import type { IBooleanValueSource, INumberValueSource, IIfValueSource, IExecutableSelectQuery, AnyValueSource, ValueSourceOf, ValueSourceValueTypeForResult, RemapValueSourceType, RemapValueSourceTypeWithOptionalType, AggregatedArrayValueSource, IValueSource, RemapIValueSourceType } from "./values" +import type { ForUseInLeftJoin, HasSource, IRawFragment, ITableOrView, NoTableOrViewRequiredOfSameDB, OfDB, OfSameDB } from "../utils/ITableOrView" +import type { WithView } from "../utils/tableOrViewUtils" +import type { resultType, compoundableColumns, valueType, from, using, source, selectColumnsType } from "../utils/symbols" import type { ResultObjectValues, RequiredColumnNames, ColumnsForCompound, ResultObjectValuesProjectedAsNullable } from "../utils/resultUtils" -import { Column } from "../utils/Column" +import type { NAnyNoTableOrViewRequired, NCompoundableFrom, NDbType, NNoTableOrViewRequiredFrom, NRecursiveFrom, NSource, NWithFrom } from "../utils/sourceName" export type OrderByMode = 'asc' | 'desc' | 'asc nulls first' | 'asc nulls last' | 'desc nulls first' | 'desc nulls last' | 'insensitive' | 'asc insensitive' | 'desc insensitive' | 'asc nulls first insensitive' | 'asc nulls last insensitive' | 'desc nulls first insensitive' | 'desc nulls last insensitive' -export interface SelectCustomization { - afterSelectKeyword?: RawFragment - beforeColumns?: RawFragment - customWindow?: RawFragment - beforeOrderByItems?: RawFragment - afterOrderByItems?: RawFragment - beforeQuery?: RawFragment - afterQuery?: RawFragment - beforeWithQuery?: RawFragment - afterWithQuery?: RawFragment +export interface SelectCustomization, /*in|out*/ _REQUIRED extends HasSource> { + afterSelectKeyword?: IRawFragment + beforeColumns?: IRawFragment + customWindow?: IRawFragment + beforeOrderByItems?: IRawFragment + afterOrderByItems?: IRawFragment + beforeQuery?: IRawFragment + afterQuery?: IRawFragment + beforeWithQuery?: IRawFragment + afterWithQuery?: IRawFragment queryExecutionName?: string queryExecutionMetadata?: any } -export interface CompoundSelectCustomization { - beforeQuery?: RawFragment - afterQuery?: RawFragment - beforeWithQuery?: RawFragment - afterWithQuery?: RawFragment +export interface CompoundSelectCustomization, /*in|out*/ _REQUIRED extends HasSource> { + beforeQuery?: IRawFragment + afterQuery?: IRawFragment + beforeWithQuery?: IRawFragment + afterWithQuery?: IRawFragment queryExecutionName?: string queryExecutionMetadata?: any } -export interface SelectExpressionBase> { - [database]: DB - [requiredTableOrView]: REQUIRED_TABLE_OR_VIEW +export interface NotSubselectUsing { + [using]: HasSource } -export interface ICompoundableSelect> extends IExecutableSelectQuery { - [compoundableColumns]: (input: ColumnsForCompound) => ColumnsForCompound +export interface SelectExpressionBase, /*in|out*/ REQUIRED extends HasSource> { + [from]: FROM + [using]: REQUIRED } -export interface ExecutableSelect> extends SelectExpressionBase { - [columnsType]: COLUMNS +export interface ICompoundableSelect, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends IExecutableSelectQuery, RESULT> { + [compoundableColumns]: (input: ColumnsForCompound, COLUMNS>) => ColumnsForCompound, COLUMNS> + [using]: REQUIRED +} + +type ExecutableSelectColumns = + COLUMNS extends AnyValueSource + ? RemapIValueSourceType + : { + [P in keyof COLUMNS]: RemapIValueSourceType + } + +export interface ExecutableSelect, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends SelectExpressionBase { + [selectColumnsType]: COLUMNS [resultType]: RESULT /* * Results of execute methods returns an anonymous type with a exact copy of the result @@ -53,450 +63,451 @@ export interface ExecutableSelect>): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] }) | null> - executeSelectOne(this: SelectExpressionBase>): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })> - executeSelectMany(this: SelectExpressionBase>): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[]> + executeSelectNoneOrOne(this: NotSubselectUsing): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] }) | null> + executeSelectOne(this: NotSubselectUsing): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })> + executeSelectMany(this: NotSubselectUsing): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[]> - executeSelectPage(this: SelectExpressionBase>): Promise<{ data: ( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[], count: number }> - executeSelectPage(this: SelectExpressionBase>, extras: EXTRAS & { data?: ( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[], count?: number }): Promise<{ [Q in keyof SelectPageWithExtras]: SelectPageWithExtras[Q] }> + executeSelectPage(this: NotSubselectUsing): Promise<{ data: ( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[], count: number }> + executeSelectPage(this: NotSubselectUsing, extras: EXTRAS & { data?: ( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[], count?: number }): Promise<{ [Q in keyof SelectPageWithExtras]: SelectPageWithExtras[Q] }> query(): string params(): any[] } -export interface WithableExecutableSelect, FEATURES> extends ExecutableSelect, IExecutableSelectQuery, ICompoundableSelect { - forUseInQueryAs: ForUseInQueryAs - forUseAsInlineQueryValue: ForUseAsInlineQueryValue - forUseAsInlineAggregatedArrayValue: ForUseAsInlineAggregatedArrayValue +export interface WithableExecutableSelect, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends ExecutableSelect, ICompoundableSelect { + forUseInQueryAs: ForUseInQueryAs + forUseAsInlineQueryValue: ForUseAsInlineQueryValue + forUseAsInlineAggregatedArrayValue: ForUseAsInlineAggregatedArrayValue } -export interface WithableExecutableSelectWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends ExecutableSelect, IExecutableSelectQuery, ICompoundableSelect { - forUseInQueryAs: ForUseInQueryAs - forUseAsInlineQueryValue: ForUseAsInlineQueryValue - forUseAsInlineAggregatedArrayValue: ForUseAsInlineAggregatedArrayValue +export interface WithableExecutableSelectWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends ExecutableSelect, ICompoundableSelect { + forUseInQueryAs: ForUseInQueryAs + forUseAsInlineQueryValue: ForUseAsInlineQueryValue + forUseAsInlineAggregatedArrayValue: ForUseAsInlineAggregatedArrayValue } -export interface CompoundedCustomizableExecutableSelect, FEATURES> extends WithableExecutableSelect { - customizeQuery(customization: CompoundSelectCustomization): WithableExecutableSelect +export interface CompoundedCustomizableExecutableSelect, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends WithableExecutableSelect { + customizeQuery(customization: CompoundSelectCustomization): WithableExecutableSelect } -export interface CompoundedOffsetExecutableSelectExpression, FEATURES> extends CompoundedCustomizableExecutableSelect { - offset(offset: number): CompoundedCustomizableExecutableSelect - offsetIfValue(offset: number | null | undefined): CompoundedCustomizableExecutableSelect +export interface CompoundedOffsetExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundedCustomizableExecutableSelect { + offset(offset: number): CompoundedCustomizableExecutableSelect + offsetIfValue(offset: number | null | undefined): CompoundedCustomizableExecutableSelect } -export interface CompoundedLimitExecutableSelectExpression, FEATURES> extends CompoundedCustomizableExecutableSelect { - limit(limit: number): CompoundedOffsetExecutableSelectExpression - limitIfValue(limit: number | null | undefined): CompoundedOffsetExecutableSelectExpression +export interface CompoundedLimitExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundedCustomizableExecutableSelect { + limit(limit: number): CompoundedOffsetExecutableSelectExpression + limitIfValue(limit: number | null | undefined): CompoundedOffsetExecutableSelectExpression } -export interface CompoundedOrderByExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundedLimitExecutableSelectExpression { - orderBy(column: RequiredColumnNames, mode?: OrderByMode): CompoundedOrderedExecutableSelectExpression - orderBy(column: ValueSourceOf>, mode?: OrderByMode): CompoundedOrderedExecutableSelectExpression - orderBy(column: RawFragment, mode?: OrderByMode): CompoundedOrderedExecutableSelectExpression - orderByFromString(orderBy: string): CompoundedOrderedExecutableSelectExpression - orderByFromStringIfValue(orderBy: string | null | undefined): CompoundedOrderedExecutableSelectExpression +export interface CompoundedOrderByExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundedLimitExecutableSelectExpression { + orderBy(column: RequiredColumnNames, mode?: OrderByMode): CompoundedOrderedExecutableSelectExpression + orderBy(column: ValueSourceOf>, mode?: OrderByMode): CompoundedOrderedExecutableSelectExpression + orderBy(column: IRawFragment, mode?: OrderByMode): CompoundedOrderedExecutableSelectExpression + orderByFromString(orderBy: string): CompoundedOrderedExecutableSelectExpression + orderByFromStringIfValue(orderBy: string | null | undefined): CompoundedOrderedExecutableSelectExpression } -export interface CompoundedOrderedExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundedOrderByExecutableSelectExpression { - orderingSiblingsOnly: OrderingSiblingsOnlyFnType> +export interface CompoundedOrderedExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundedOrderByExecutableSelectExpression { + orderingSiblingsOnly: OrderingSiblingsOnlyFnType> } -export interface CompoundableExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends WithableExecutableSelect { - union, any>>(select: SELECT): CompoundedExecutableSelectExpression - intersect: CompoundFunction - intersectAll: CompoundFunction - except: CompoundFunction - exceptAll: CompoundFunction - minus: CompoundFunction - minusAll: CompoundFunction +export interface CompoundableExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends WithableExecutableSelect { + union>(select: SELECT): CompoundedExecutableSelectExpression + intersect: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + intersectAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + except: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + exceptAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + minus: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + minusAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> - recursiveUnion, any>>(fn: (view: WithView, COLUMNS>) => SELECT): OrderByExecutableSelectExpression - recursiveUnionOn(fn: (view: WithView, COLUMNS>) => IBooleanValueSource | TABLE_OR_VIEW[typeof tableOrViewRef], any>): OrderByExecutableSelectExpression - recursiveUnionAllOn(fn: (view: WithView, COLUMNS>) => IBooleanValueSource | TABLE_OR_VIEW[typeof tableOrViewRef], any>): OrderByExecutableSelectExpression + recursiveUnion>(fn: (view: WithView, COLUMNS>) => SELECT): OrderByExecutableSelectExpression + recursiveUnionOn(fn: (view: WithView, COLUMNS>) => IBooleanValueSource | FROM[typeof source], any>): OrderByExecutableSelectExpression + recursiveUnionAllOn(fn: (view: WithView, COLUMNS>) => IBooleanValueSource | FROM[typeof source], any>): OrderByExecutableSelectExpression } -export interface CompoundableExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends WithableExecutableSelectWithoutWhere { - union, any>>(select: SELECT): CompoundedExecutableSelectExpression - intersect: CompoundFunction - intersectAll: CompoundFunction - except: CompoundFunction - exceptAll: CompoundFunction - minus: CompoundFunction - minusAll: CompoundFunction +export interface CompoundableExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends WithableExecutableSelectWithoutWhere { + union>(select: SELECT): CompoundedExecutableSelectExpression + intersect: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + intersectAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + except: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + exceptAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + minus: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + minusAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> - recursiveUnion, any>>(fn: (view: WithView, COLUMNS>) => SELECT): OrderByExecutableSelectExpression - recursiveUnionOn(fn: (view: WithView, COLUMNS>) => IBooleanValueSource | TABLE_OR_VIEW[typeof tableOrViewRef], any>): OrderByExecutableSelectExpression - recursiveUnionAllOn(fn: (view: WithView, COLUMNS>) => IBooleanValueSource | TABLE_OR_VIEW[typeof tableOrViewRef], any>): OrderByExecutableSelectExpression + recursiveUnion>(fn: (view: WithView, COLUMNS>) => SELECT): OrderByExecutableSelectExpression + recursiveUnionOn(fn: (view: WithView, COLUMNS>) => IBooleanValueSource | FROM[typeof source], any>): OrderByExecutableSelectExpression + recursiveUnionAllOn(fn: (view: WithView, COLUMNS>) => IBooleanValueSource | FROM[typeof source], any>): OrderByExecutableSelectExpression } -export interface WhereableCompoundableExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableExecutableSelectExpressionWithoutWhere { - dynamicWhere(): DynamicWhereCompoundableCustomizableExecutableSelectExpression - where(condition: IIfValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - where(condition: IBooleanValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression +export interface WhereableCompoundableExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableExecutableSelectExpressionWithoutWhere { + dynamicWhere(): DynamicWhereLastCompoundableCustomizableExecutableSelectExpression + where(condition: IIfValueSource): DynamicWhereLastCompoundableCustomizableExecutableSelectExpression + where(condition: IBooleanValueSource): DynamicWhereLastCompoundableCustomizableExecutableSelectExpression } -export interface DynamicWhereCompoundableCustomizableExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends WithableExecutableSelect { - and(condition: IIfValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - and(condition: IBooleanValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - or(condition: IIfValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - or(condition: IBooleanValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression +export interface DynamicWhereLastCompoundableCustomizableExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends WithableExecutableSelect { + and(condition: IIfValueSource): DynamicWhereLastCompoundableCustomizableExecutableSelectExpression + and(condition: IBooleanValueSource): DynamicWhereLastCompoundableCustomizableExecutableSelectExpression + or(condition: IIfValueSource): DynamicWhereLastCompoundableCustomizableExecutableSelectExpression + or(condition: IBooleanValueSource): DynamicWhereLastCompoundableCustomizableExecutableSelectExpression } -export interface CompoundableCustomizableExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableExecutableSelectExpression { - customizeQuery(customization: SelectCustomization): CompoundableExecutableSelectExpression +export interface CompoundableCustomizableExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableExecutableSelectExpression { + customizeQuery(customization: SelectCustomization): CompoundableExecutableSelectExpression } -export interface CompoundableCustomizableExecutableSelectExpressionWitoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableExecutableSelectExpressionWithoutWhere { - customizeQuery(customization: SelectCustomization): WhereableCompoundableExecutableSelectExpressionWithoutWhere +export interface CompoundableCustomizableExecutableSelectExpressionWitoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableExecutableSelectExpressionWithoutWhere { + customizeQuery(customization: SelectCustomization): WhereableCompoundableExecutableSelectExpressionWithoutWhere } -export interface OffsetExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableCustomizableExecutableSelectExpression { - offset(offset: number): CompoundableCustomizableExecutableSelectExpression - offsetIfValue(offset: number | null | undefined): CompoundableCustomizableExecutableSelectExpression +export interface OffsetExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableCustomizableExecutableSelectExpression { + offset(offset: number): CompoundableCustomizableExecutableSelectExpression + offsetIfValue(offset: number | null | undefined): CompoundableCustomizableExecutableSelectExpression } -export interface LimitExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableCustomizableExecutableSelectExpression { - limit(limit: number): OffsetExecutableSelectExpression - limitIfValue(limit: number | null | undefined): OffsetExecutableSelectExpression +export interface LimitExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableCustomizableExecutableSelectExpression { + limit(limit: number): OffsetExecutableSelectExpression + limitIfValue(limit: number | null | undefined): OffsetExecutableSelectExpression } -export interface OrderByExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends LimitExecutableSelectExpression { - orderBy(column: RequiredColumnNames, mode?: OrderByMode): OrderedExecutableSelectExpression - orderBy(column: ValueSourceOf>, mode?: OrderByMode): OrderedExecutableSelectExpression - orderBy(column: RawFragment, mode?: OrderByMode): OrderedExecutableSelectExpression - orderByFromString(orderBy: string): OrderedExecutableSelectExpression - orderByFromStringIfValue(orderBy: string | null | undefined): OrderedExecutableSelectExpression +export interface OrderByExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends LimitExecutableSelectExpression { + orderBy(column: RequiredColumnNames, mode?: OrderByMode): OrderedExecutableSelectExpression + orderBy(column: ValueSourceOf, mode?: OrderByMode): OrderedExecutableSelectExpression + orderBy(column: IRawFragment, mode?: OrderByMode): OrderedExecutableSelectExpression + orderByFromString(orderBy: string): OrderedExecutableSelectExpression + orderByFromStringIfValue(orderBy: string | null | undefined): OrderedExecutableSelectExpression } -export interface OrderByExecutableSelectExpressionProjectableAsNullable, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderByExecutableSelectExpression { - projectingOptionalValuesAsNullable(): OrderByExecutableSelectExpression, REQUIRED_TABLE_OR_VIEW, FEATURES> +export interface OrderByExecutableSelectExpressionProjectableAsNullable, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderByExecutableSelectExpression { + projectingOptionalValuesAsNullable(): OrderByExecutableSelectExpression, FEATURES> } -export interface OrderedExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderByExecutableSelectExpression { - orderingSiblingsOnly: OrderingSiblingsOnlyFnType> +export interface OrderedExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderByExecutableSelectExpression { + orderingSiblingsOnly: OrderingSiblingsOnlyFnType> } -export interface CompoundedExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundedOrderByExecutableSelectExpression { - union, any>>(select: SELECT): CompoundedExecutableSelectExpression - intersect: CompoundFunction - intersectAll: CompoundFunction - except: CompoundFunction - exceptAll: CompoundFunction - minus: CompoundFunction - minusAll: CompoundFunction +export interface CompoundedExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundedOrderByExecutableSelectExpression { + union>(select: SELECT): CompoundedExecutableSelectExpression + intersect: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + intersectAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + except: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + exceptAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + minus: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql' | 'sqlite' | 'sqlServer' | 'oracle', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> + minusAll: CompoundFunction<'noopDB' | 'mariaDB' | 'postgreSql', FROM, REQUIRED, COLUMNS, RESULT, FEATURES | 'compound'> } -export interface OrderableExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableCustomizableExecutableSelectExpressionWitoutWhere { - orderBy(column: RequiredColumnNames, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere - orderBy(column: ValueSourceOf>, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere - orderBy(column: RawFragment, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere - orderByFromString(orderBy: string): OrderedExecutableSelectExpressionWithoutWhere - orderByFromStringIfValue(orderBy: string | null | undefined): OrderedExecutableSelectExpressionWithoutWhere +export interface OrderableExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableCustomizableExecutableSelectExpressionWitoutWhere { + orderBy(column: RequiredColumnNames, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere + orderBy(column: ValueSourceOf, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere + orderBy(column: IRawFragment, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere + orderByFromString(orderBy: string): OrderedExecutableSelectExpressionWithoutWhere + orderByFromStringIfValue(orderBy: string | null | undefined): OrderedExecutableSelectExpressionWithoutWhere - limit(limit: number): OffsetExecutableSelectExpressionWithoutWhere - limitIfValue(limit: number | null | undefined): OffsetExecutableSelectExpressionWithoutWhere + limit(limit: number): OffsetExecutableSelectExpressionWithoutWhere + limitIfValue(limit: number | null | undefined): OffsetExecutableSelectExpressionWithoutWhere } -export interface LimitExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableCustomizableExecutableSelectExpressionWitoutWhere { - dynamicWhere(): DynamicWhereLimitExecutableSelectExpression - where(condition: IIfValueSource, any>): DynamicWhereLimitExecutableSelectExpression - where(condition: IBooleanValueSource, any>): DynamicWhereLimitExecutableSelectExpression +export interface LimitExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableCustomizableExecutableSelectExpressionWitoutWhere { + dynamicWhere(): DynamicWhereLimitExecutableSelectExpression + where(condition: IIfValueSource): DynamicWhereLimitExecutableSelectExpression + where(condition: IBooleanValueSource): DynamicWhereLimitExecutableSelectExpression - limit(limit: number): OffsetExecutableSelectExpressionWithoutWhere - limitIfValue(limit: number | null | undefined): OffsetExecutableSelectExpressionWithoutWhere + limit(limit: number): OffsetExecutableSelectExpressionWithoutWhere + limitIfValue(limit: number | null | undefined): OffsetExecutableSelectExpressionWithoutWhere } -export interface OrderByExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends LimitExecutableSelectExpressionWithoutWhere { - orderBy(column: RequiredColumnNames, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere - orderBy(column: ValueSourceOf>, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere - orderBy(column: RawFragment, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere - orderByFromString(orderBy: string): OrderedExecutableSelectExpressionWithoutWhere - orderByFromStringIfValue(orderBy: string | null | undefined): OrderedExecutableSelectExpressionWithoutWhere +export interface OrderByExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends LimitExecutableSelectExpressionWithoutWhere { + orderBy(column: RequiredColumnNames, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere + orderBy(column: ValueSourceOf, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere + orderBy(column: IRawFragment, mode?: OrderByMode): OrderedExecutableSelectExpressionWithoutWhere + orderByFromString(orderBy: string): OrderedExecutableSelectExpressionWithoutWhere + orderByFromStringIfValue(orderBy: string | null | undefined): OrderedExecutableSelectExpressionWithoutWhere } -export interface OrderedExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderByExecutableSelectExpressionWithoutWhere { - orderingSiblingsOnly: OrderingSiblingsOnlyFnType> +export interface OrderedExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderByExecutableSelectExpressionWithoutWhere { + orderingSiblingsOnly: OrderingSiblingsOnlyFnType> } -export interface OffsetExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableCustomizableExecutableSelectExpressionWitoutWhere { - offset(offset: number): CompoundableCustomizableExpressionWithoutWhere - offsetIfValue(offset: number | null | undefined): CompoundableCustomizableExpressionWithoutWhere +export interface OffsetExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableCustomizableExecutableSelectExpressionWitoutWhere { + offset(offset: number): CompoundableCustomizableExpressionWithoutWhere + offsetIfValue(offset: number | null | undefined): CompoundableCustomizableExpressionWithoutWhere - dynamicWhere(): DynamicWhereCompoundableCustomizableExecutableSelectExpression - where(condition: IIfValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - where(condition: IBooleanValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression + dynamicWhere(): DynamicWhereCompoundableCustomizableExecutableSelectExpression + where(condition: IIfValueSource): DynamicWhereCompoundableCustomizableExecutableSelectExpression + where(condition: IBooleanValueSource): DynamicWhereCompoundableCustomizableExecutableSelectExpression } -export interface CompoundableCustomizableExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableCustomizableExecutableSelectExpressionWitoutWhere { - dynamicWhere(): DynamicWhereCompoundableCustomizableExecutableSelectExpression - where(condition: IIfValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - where(condition: IBooleanValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression +export interface CompoundableCustomizableExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableCustomizableExecutableSelectExpressionWitoutWhere { + dynamicWhere(): DynamicWhereCompoundableCustomizableExecutableSelectExpression + where(condition: IIfValueSource): DynamicWhereCompoundableCustomizableExecutableSelectExpression + where(condition: IBooleanValueSource): DynamicWhereCompoundableCustomizableExecutableSelectExpression } -export interface DynamicWhereLimitExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableCustomizableExecutableSelectExpression { - and(condition: IIfValueSource, any>): DynamicWhereLimitExecutableSelectExpression - and(condition: IBooleanValueSource, any>): DynamicWhereLimitExecutableSelectExpression - or(condition: IIfValueSource, any>): DynamicWhereLimitExecutableSelectExpression - or(condition: IBooleanValueSource, any>): DynamicWhereLimitExecutableSelectExpression +export interface DynamicWhereLimitExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableCustomizableExecutableSelectExpression { + and(condition: IIfValueSource): DynamicWhereLimitExecutableSelectExpression + and(condition: IBooleanValueSource): DynamicWhereLimitExecutableSelectExpression + or(condition: IIfValueSource): DynamicWhereLimitExecutableSelectExpression + or(condition: IBooleanValueSource): DynamicWhereLimitExecutableSelectExpression - limit(limit: number): OffsetExecutableSelectExpression - limitIfValue(limit: number | null | undefined): OffsetExecutableSelectExpression + limit(limit: number): OffsetExecutableSelectExpression + limitIfValue(limit: number | null | undefined): OffsetExecutableSelectExpression } -export interface DynamicWhereCompoundableCustomizableExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends CompoundableCustomizableExecutableSelectExpression { - and(condition: IIfValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - and(condition: IBooleanValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - or(condition: IIfValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression - or(condition: IBooleanValueSource, any>): DynamicWhereCompoundableCustomizableExecutableSelectExpression +export interface DynamicWhereCompoundableCustomizableExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends CompoundableCustomizableExecutableSelectExpression { + and(condition: IIfValueSource): DynamicWhereCompoundableCustomizableExecutableSelectExpression + and(condition: IBooleanValueSource): DynamicWhereCompoundableCustomizableExecutableSelectExpression + or(condition: IIfValueSource): DynamicWhereCompoundableCustomizableExecutableSelectExpression + or(condition: IBooleanValueSource): DynamicWhereCompoundableCustomizableExecutableSelectExpression } -export interface RecursivelyConnectedExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderByExecutableSelectExpression { - groupBy(...columns: RequiredColumnNames[]): GroupByOrderByHavingExecutableSelectExpression - groupBy(...columns: ValueSourceOf[]): GroupByOrderByHavingExecutableSelectExpression +export interface RecursivelyConnectedExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderByExecutableSelectExpression { + groupBy(...columns: RequiredColumnNames[]): GroupByOrderByHavingExecutableSelectExpression + groupBy(...columns: ValueSourceOf[]): GroupByOrderByHavingExecutableSelectExpression } -export interface GroupByOrderByExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends RecursivelyConnectedExecutableSelectExpression { - startWith: StartWithFnType> - connectBy: ConnectByFnType> - connectByNoCycle: ConnectByFnType> +export interface GroupByOrderByExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends RecursivelyConnectedExecutableSelectExpression { + startWith: StartWithFnType> + connectBy: ConnectByFnType> + connectByNoCycle: ConnectByFnType> } -export interface GroupByOrderByExecutableSelectExpressionProjectableAsNullable, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends GroupByOrderByExecutableSelectExpression { - projectingOptionalValuesAsNullable(): GroupByOrderByExecutableSelectExpression, REQUIRED_TABLE_OR_VIEW, FEATURES> +export interface GroupByOrderByExecutableSelectExpressionProjectableAsNullable, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends GroupByOrderByExecutableSelectExpression { + projectingOptionalValuesAsNullable(): GroupByOrderByExecutableSelectExpression, FEATURES> } -export interface GroupByOrderByHavingExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderByExecutableSelectExpression { - groupBy(...columns: RequiredColumnNames[]): GroupByOrderByHavingExecutableSelectExpression - groupBy(...columns: ValueSourceOf[]): GroupByOrderByHavingExecutableSelectExpression +export interface GroupByOrderByHavingExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderByExecutableSelectExpression { + groupBy(...columns: RequiredColumnNames[]): GroupByOrderByHavingExecutableSelectExpression + groupBy(...columns: ValueSourceOf[]): GroupByOrderByHavingExecutableSelectExpression - dynamicHaving(): DynamicHavingExecutableSelectExpression - having(condition: IIfValueSource, any>): DynamicHavingExecutableSelectExpression - having(condition: IBooleanValueSource, any>): DynamicHavingExecutableSelectExpression + dynamicHaving(): DynamicHavingExecutableSelectExpression + having(condition: IIfValueSource): DynamicHavingExecutableSelectExpression + having(condition: IBooleanValueSource): DynamicHavingExecutableSelectExpression } -export interface DynamicHavingExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderByExecutableSelectExpression { - and(condition: IIfValueSource, any>): DynamicHavingExecutableSelectExpression - and(condition: IBooleanValueSource, any>): DynamicHavingExecutableSelectExpression - or(condition: IIfValueSource, any>): DynamicHavingExecutableSelectExpression - or(condition: IBooleanValueSource, any>): DynamicHavingExecutableSelectExpression +export interface DynamicHavingExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderByExecutableSelectExpression { + and(condition: IIfValueSource): DynamicHavingExecutableSelectExpression + and(condition: IBooleanValueSource): DynamicHavingExecutableSelectExpression + or(condition: IIfValueSource): DynamicHavingExecutableSelectExpression + or(condition: IBooleanValueSource): DynamicHavingExecutableSelectExpression } -export interface GroupByOrderHavingByExpressionWithoutSelect, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectExpressionBase { - groupBy(...columns: ValueSourceOf[]): GroupByOrderHavingByExpressionWithoutSelect +export interface GroupByOrderHavingByExpressionWithoutSelect, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectExpressionBase { + groupBy(...columns: ValueSourceOf[]): GroupByOrderHavingByExpressionWithoutSelect - dynamicHaving(): DynamicHavingExpressionWithoutSelect - having(condition: IIfValueSource, any>): DynamicHavingExpressionWithoutSelect - having(condition: IBooleanValueSource, any>): DynamicHavingExpressionWithoutSelect + dynamicHaving(): DynamicHavingExpressionWithoutSelect + having(condition: IIfValueSource): DynamicHavingExpressionWithoutSelect + having(condition: IBooleanValueSource): DynamicHavingExpressionWithoutSelect - dynamicWhere(): DynamicWhereSelectExpressionWithoutSelect - where(condition: IIfValueSource, any>): DynamicWhereSelectExpressionWithoutSelect - where(condition: IBooleanValueSource, any>): DynamicWhereSelectExpressionWithoutSelect + dynamicWhere(): DynamicWhereSelectExpressionWithoutSelect + where(condition: IIfValueSource): DynamicWhereSelectExpressionWithoutSelect + where(condition: IBooleanValueSource): DynamicWhereSelectExpressionWithoutSelect - select>(columns: COLUMNS): WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectOneColumn>>(column: COLUMN): WhereableExecutableSelectExpressionWithGroupBy, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectCountAll(): WhereableExecutableSelectExpressionWithGroupBy, 'required'>, number, REQUIRED_TABLE_OR_VIEW, FEATURES| 'requiredResult'> + select>(columns: COLUMNS): WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable, FEATURES> + selectOneColumn>(column: COLUMN): WhereableExecutableSelectExpressionWithGroupBy, FEATURES> + selectCountAll(): WhereableExecutableSelectExpressionWithGroupBy, 'required'>, number, FEATURES | 'requiredResult'> } -export interface DynamicHavingExpressionWithoutSelect, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectExpressionBase { - and(condition: IIfValueSource, any>): DynamicHavingExpressionWithoutSelect - and(condition: IBooleanValueSource, any>): DynamicHavingExpressionWithoutSelect - or(condition: IIfValueSource, any>): DynamicHavingExpressionWithoutSelect - or(condition: IBooleanValueSource, any>): DynamicHavingExpressionWithoutSelect +export interface DynamicHavingExpressionWithoutSelect, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectExpressionBase { + and(condition: IIfValueSource): DynamicHavingExpressionWithoutSelect + and(condition: IBooleanValueSource): DynamicHavingExpressionWithoutSelect + or(condition: IIfValueSource): DynamicHavingExpressionWithoutSelect + or(condition: IBooleanValueSource): DynamicHavingExpressionWithoutSelect - dynamicWhere(): DynamicWhereSelectExpressionWithoutSelect - where(condition: IIfValueSource, any>): DynamicWhereSelectExpressionWithoutSelect - where(condition: IBooleanValueSource, any>): DynamicWhereSelectExpressionWithoutSelect + dynamicWhere(): DynamicWhereSelectExpressionWithoutSelect + where(condition: IIfValueSource): DynamicWhereSelectExpressionWithoutSelect + where(condition: IBooleanValueSource): DynamicWhereSelectExpressionWithoutSelect - select>(columns: COLUMNS): WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectOneColumn>>(column: COLUMN): WhereableExecutableSelectExpressionWithGroupBy, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectCountAll(): WhereableExecutableSelectExpressionWithGroupBy, 'required'>, number, REQUIRED_TABLE_OR_VIEW, FEATURES| 'requiredResult'> + select>(columns: COLUMNS): WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable, FEATURES> + selectOneColumn>(column: COLUMN): WhereableExecutableSelectExpressionWithGroupBy, FEATURES> + selectCountAll(): WhereableExecutableSelectExpressionWithGroupBy, 'required'>, number, FEATURES | 'requiredResult'> } -export interface DynamicWhereSelectExpressionWithoutSelect, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectExpressionBase { - and(condition: IIfValueSource, any>): DynamicWhereSelectExpressionWithoutSelect - and(condition: IBooleanValueSource, any>): DynamicWhereSelectExpressionWithoutSelect - or(condition: IIfValueSource, any>): DynamicWhereSelectExpressionWithoutSelect - or(condition: IBooleanValueSource, any>): DynamicWhereSelectExpressionWithoutSelect +export interface DynamicWhereSelectExpressionWithoutSelect, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectExpressionBase { + and(condition: IIfValueSource): DynamicWhereSelectExpressionWithoutSelect + and(condition: IBooleanValueSource): DynamicWhereSelectExpressionWithoutSelect + or(condition: IIfValueSource): DynamicWhereSelectExpressionWithoutSelect + or(condition: IBooleanValueSource): DynamicWhereSelectExpressionWithoutSelect - select>(columns: COLUMNS): OrderByExecutableSelectExpressionProjectableAsNullable, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectOneColumn>>(column: COLUMN): OrderByExecutableSelectExpression, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectCountAll(): OrderByExecutableSelectExpression, 'required'>, number, REQUIRED_TABLE_OR_VIEW, FEATURES| 'requiredResult'> + select>(columns: COLUMNS): OrderByExecutableSelectExpressionProjectableAsNullable, FEATURES> + selectOneColumn>(column: COLUMN): OrderByExecutableSelectExpression, FEATURES> + selectCountAll(): OrderByExecutableSelectExpression, 'required'>, number, FEATURES| 'requiredResult'> } -export interface RecursivelyConnectedExpressionWithoutSelect, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectExpressionBase { - groupBy(...columns: ValueSourceOf[]): GroupByOrderHavingByExpressionWithoutSelect +export interface RecursivelyConnectedExpressionWithoutSelect, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectExpressionBase { + groupBy(...columns: ValueSourceOf[]): GroupByOrderHavingByExpressionWithoutSelect - select>(columns: COLUMNS): GroupByOrderByExecutableSelectExpressionProjectableAsNullable, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectOneColumn>>(column: COLUMN): GroupByOrderByExecutableSelectExpression, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectCountAll(): GroupByOrderByExecutableSelectExpression, 'required'>, number, REQUIRED_TABLE_OR_VIEW, FEATURES| 'requiredResult'> + select>(columns: COLUMNS): GroupByOrderByExecutableSelectExpressionProjectableAsNullable, FEATURES> + selectOneColumn>(column: COLUMN): GroupByOrderByExecutableSelectExpression, FEATURES> + selectCountAll(): GroupByOrderByExecutableSelectExpression, 'required'>, number, FEATURES | 'requiredResult'> } -export interface DynamicWhereExpressionWithoutSelect, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends RecursivelyConnectedExpressionWithoutSelect { - and(condition: IIfValueSource, any>): DynamicWhereExpressionWithoutSelect - and(condition: IBooleanValueSource, any>): DynamicWhereExpressionWithoutSelect - or(condition: IIfValueSource, any>): DynamicWhereExpressionWithoutSelect - or(condition: IBooleanValueSource, any>): DynamicWhereExpressionWithoutSelect +export interface DynamicWhereExpressionWithoutSelect, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends RecursivelyConnectedExpressionWithoutSelect { + and(condition: IIfValueSource): DynamicWhereExpressionWithoutSelect + and(condition: IBooleanValueSource): DynamicWhereExpressionWithoutSelect + or(condition: IIfValueSource): DynamicWhereExpressionWithoutSelect + or(condition: IBooleanValueSource): DynamicWhereExpressionWithoutSelect - startWith: StartWithFnType> - connectBy: ConnectByFnType> - connectByNoCycle: ConnectByFnType> + startWith: StartWithFnType> + connectBy: ConnectByFnType> + connectByNoCycle: ConnectByFnType> } -export interface DynamicWhereExecutableSelectExpression, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends GroupByOrderByExecutableSelectExpression { - and(condition: IIfValueSource, any>): DynamicWhereExecutableSelectExpression - and(condition: IBooleanValueSource, any>): DynamicWhereExecutableSelectExpression - or(condition: IIfValueSource, any>): DynamicWhereExecutableSelectExpression - or(condition: IBooleanValueSource, any>): DynamicWhereExecutableSelectExpression +export interface DynamicWhereExecutableSelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends GroupByOrderByExecutableSelectExpression { + and(condition: IIfValueSource): DynamicWhereExecutableSelectExpression + and(condition: IBooleanValueSource): DynamicWhereExecutableSelectExpression + or(condition: IIfValueSource): DynamicWhereExecutableSelectExpression + or(condition: IBooleanValueSource): DynamicWhereExecutableSelectExpression } -export interface WhereableExecutableSelectExpressionWithGroupBy, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderableExecutableSelectExpressionWithoutWhere { - dynamicWhere(): DynamicWhereExecutableSelectExpressionWithGroupBy - where(condition: IIfValueSource, any>): DynamicWhereExecutableSelectExpressionWithGroupBy - where(condition: IBooleanValueSource, any>): DynamicWhereExecutableSelectExpressionWithGroupBy +export interface WhereableExecutableSelectExpressionWithGroupBy, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderableExecutableSelectExpressionWithoutWhere { + dynamicWhere(): DynamicWhereExecutableSelectExpressionWithGroupBy + where(condition: IIfValueSource): DynamicWhereExecutableSelectExpressionWithGroupBy + where(condition: IBooleanValueSource): DynamicWhereExecutableSelectExpressionWithGroupBy } -export interface WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends WhereableExecutableSelectExpressionWithGroupBy { - projectingOptionalValuesAsNullable(): WhereableExecutableSelectExpressionWithGroupBy, REQUIRED_TABLE_OR_VIEW, FEATURES> +export interface WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends WhereableExecutableSelectExpressionWithGroupBy { + projectingOptionalValuesAsNullable(): WhereableExecutableSelectExpressionWithGroupBy, FEATURES> } -export interface DynamicWhereExecutableSelectExpressionWithGroupBy, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderByExecutableSelectExpression { - and(condition: IIfValueSource, any>): DynamicWhereExecutableSelectExpressionWithGroupBy - and(condition: IBooleanValueSource, any>): DynamicWhereExecutableSelectExpressionWithGroupBy - or(condition: IIfValueSource, any>): DynamicWhereExecutableSelectExpressionWithGroupBy - or(condition: IBooleanValueSource, any>): DynamicWhereExecutableSelectExpressionWithGroupBy +export interface DynamicWhereExecutableSelectExpressionWithGroupBy, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderByExecutableSelectExpression { + and(condition: IIfValueSource): DynamicWhereExecutableSelectExpressionWithGroupBy + and(condition: IBooleanValueSource): DynamicWhereExecutableSelectExpressionWithGroupBy + or(condition: IIfValueSource): DynamicWhereExecutableSelectExpressionWithGroupBy + or(condition: IBooleanValueSource): DynamicWhereExecutableSelectExpressionWithGroupBy } -export interface GroupByOrderByHavingExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends WhereableExecutableSelectExpressionWithGroupBy { - groupBy(...columns: RequiredColumnNames[]): GroupByOrderByHavingExecutableSelectExpressionWithoutWhere - groupBy(...columns: ValueSourceOf[]): GroupByOrderByHavingExecutableSelectExpressionWithoutWhere +export interface GroupByOrderByHavingExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends WhereableExecutableSelectExpressionWithGroupBy { + groupBy(...columns: RequiredColumnNames[]): GroupByOrderByHavingExecutableSelectExpressionWithoutWhere + groupBy(...columns: ValueSourceOf[]): GroupByOrderByHavingExecutableSelectExpressionWithoutWhere - dynamicHaving(): DynamicHavingExecutableSelectExpressionWithoutWhere - having(condition: IIfValueSource, any>): DynamicHavingExecutableSelectExpressionWithoutWhere - having(condition: IBooleanValueSource, any>): DynamicHavingExecutableSelectExpressionWithoutWhere + dynamicHaving(): DynamicHavingExecutableSelectExpressionWithoutWhere + having(condition: IIfValueSource): DynamicHavingExecutableSelectExpressionWithoutWhere + having(condition: IBooleanValueSource): DynamicHavingExecutableSelectExpressionWithoutWhere } -export interface DynamicHavingExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends WhereableExecutableSelectExpressionWithGroupBy { - and(condition: IIfValueSource, any>): DynamicHavingExecutableSelectExpressionWithoutWhere - and(condition: IBooleanValueSource, any>): DynamicHavingExecutableSelectExpressionWithoutWhere - or(condition: IIfValueSource, any>): DynamicHavingExecutableSelectExpressionWithoutWhere - or(condition: IBooleanValueSource, any>): DynamicHavingExecutableSelectExpressionWithoutWhere +export interface DynamicHavingExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends WhereableExecutableSelectExpressionWithGroupBy { + and(condition: IIfValueSource): DynamicHavingExecutableSelectExpressionWithoutWhere + and(condition: IBooleanValueSource): DynamicHavingExecutableSelectExpressionWithoutWhere + or(condition: IIfValueSource): DynamicHavingExecutableSelectExpressionWithoutWhere + or(condition: IBooleanValueSource): DynamicHavingExecutableSelectExpressionWithoutWhere } -export interface RecursivelyConnectedExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends OrderableExecutableSelectExpressionWithoutWhere { - groupBy(...columns: RequiredColumnNames[]): GroupByOrderByHavingExecutableSelectExpressionWithoutWhere - groupBy(...columns: ValueSourceOf[]): GroupByOrderByHavingExecutableSelectExpressionWithoutWhere +export interface RecursivelyConnectedExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends OrderableExecutableSelectExpressionWithoutWhere { + groupBy(...columns: RequiredColumnNames[]): GroupByOrderByHavingExecutableSelectExpressionWithoutWhere + groupBy(...columns: ValueSourceOf[]): GroupByOrderByHavingExecutableSelectExpressionWithoutWhere - dynamicWhere(): DynamicWhereExecutableSelectExpression - where(condition: IIfValueSource, any>): DynamicWhereExecutableSelectExpression - where(condition: IBooleanValueSource, any>): DynamicWhereExecutableSelectExpression + dynamicWhere(): DynamicWhereExecutableSelectExpression + where(condition: IIfValueSource): DynamicWhereExecutableSelectExpression + where(condition: IBooleanValueSource): DynamicWhereExecutableSelectExpression } -export interface ExecutableSelectExpressionWithoutWhere, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends RecursivelyConnectedExecutableSelectExpressionWithoutWhere { - startWith: StartWithFnType> - connectBy: ConnectByFnType> - connectByNoCycle: ConnectByFnType> +export interface ExecutableSelectExpressionWithoutWhere, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends RecursivelyConnectedExecutableSelectExpressionWithoutWhere { + startWith: StartWithFnType> + connectBy: ConnectByFnType> + connectByNoCycle: ConnectByFnType> } -export interface ExecutableSelectExpressionWithoutWhereProjectableAsNullable, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends ExecutableSelectExpressionWithoutWhere { - projectingOptionalValuesAsNullable(): ExecutableSelectExpressionWithoutWhere, REQUIRED_TABLE_OR_VIEW, FEATURES> +export interface ExecutableSelectExpressionWithoutWhereProjectableAsNullable, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT, /*in|out*/ FEATURES> extends ExecutableSelectExpressionWithoutWhere { + projectingOptionalValuesAsNullable(): ExecutableSelectExpressionWithoutWhere, FEATURES> } -export interface RecursivelyConnectedSelectWhereExpression, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectExpressionBase { - select>(columns: COLUMNS): ExecutableSelectExpressionWithoutWhereProjectableAsNullable, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectOneColumn>>(column: COLUMN): ExecutableSelectExpressionWithoutWhere, REQUIRED_TABLE_OR_VIEW, FEATURES> - selectCountAll(): ExecutableSelectExpressionWithoutWhere, 'required'>, number, REQUIRED_TABLE_OR_VIEW, FEATURES| 'requiredResult'> - dynamicWhere(): DynamicWhereExpressionWithoutSelect - where(condition: IIfValueSource, any>): DynamicWhereExpressionWithoutSelect - where(condition: IBooleanValueSource, any>): DynamicWhereExpressionWithoutSelect - groupBy(...columns: ValueSourceOf[]): GroupByOrderHavingByExpressionWithoutSelect +export interface RecursivelyConnectedSelectWhereExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectExpressionBase { + select>(columns: COLUMNS): ExecutableSelectExpressionWithoutWhereProjectableAsNullable, FEATURES> + selectOneColumn>(column: COLUMN): ExecutableSelectExpressionWithoutWhere, FEATURES> + selectCountAll(): ExecutableSelectExpressionWithoutWhere, 'required'>, number, FEATURES| 'requiredResult'> + dynamicWhere(): DynamicWhereExpressionWithoutSelect + where(condition: IIfValueSource): DynamicWhereExpressionWithoutSelect + where(condition: IBooleanValueSource): DynamicWhereExpressionWithoutSelect + groupBy(...columns: ValueSourceOf[]): GroupByOrderHavingByExpressionWithoutSelect } -export interface SelectWhereExpression, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends RecursivelyConnectedSelectWhereExpression { - startWith: StartWithFnType> - connectBy: ConnectByFnType> - connectByNoCycle: ConnectByFnType> +export interface SelectWhereExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends RecursivelyConnectedSelectWhereExpression { + startWith: StartWithFnType> + connectBy: ConnectByFnType> + connectByNoCycle: ConnectByFnType> } -export interface SelectWhereJoinExpression, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectWhereExpression { - join>(table: TABLE_OR_VIEW2): OnExpression - innerJoin>(table: TABLE_OR_VIEW2): OnExpression - leftJoin, ALIAS>(source: OuterJoinSource): OnExpression, REQUIRED_TABLE_OR_VIEW, FEATURES> - leftOuterJoin, ALIAS>(source: OuterJoinSource): OnExpression, REQUIRED_TABLE_OR_VIEW, FEATURES> - optionalJoin>(table: TABLE_OR_VIEW2): OnExpression - optionalInnerJoin>(table: TABLE_OR_VIEW2): OnExpression - optionalLeftJoin, ALIAS>(source: OuterJoinSource): OnExpression, REQUIRED_TABLE_OR_VIEW, FEATURES> - optionalLeftOuterJoin, ALIAS>(source: OuterJoinSource): OnExpression, REQUIRED_TABLE_OR_VIEW, FEATURES> +export interface SelectWhereJoinExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectWhereExpression { + join>(table: T2 & OfSameDB): OnExpression + innerJoin>(table: T2 & OfSameDB): OnExpression + leftJoin>(source: T2 & OfSameDB): OnExpression + leftOuterJoin>(source: T2 & OfSameDB): OnExpression + optionalJoin>(table: T2 & OfSameDB): OnExpression + optionalInnerJoin>(table: T2 & OfSameDB): OnExpression + optionalLeftJoin>(source: T2 & OfSameDB): OnExpression + optionalLeftOuterJoin>(source: T2 & OfSameDB): OnExpression } -export interface DynamicOnExpression, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectWhereJoinExpression { - and(condition: IIfValueSource, any>): DynamicOnExpression - and(condition: IBooleanValueSource, any>): DynamicOnExpression - or(condition: IIfValueSource, any>): DynamicOnExpression - or(condition: IBooleanValueSource, any>): DynamicOnExpression +export interface DynamicOnExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectWhereJoinExpression { + and(condition: IIfValueSource): DynamicOnExpression + and(condition: IBooleanValueSource): DynamicOnExpression + or(condition: IIfValueSource): DynamicOnExpression + or(condition: IBooleanValueSource): DynamicOnExpression } -export interface OnExpression, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectWhereJoinExpression { - dynamicOn(): DynamicOnExpression - on(condition: IIfValueSource, any>): DynamicOnExpression - on(condition: IBooleanValueSource, any>): DynamicOnExpression +export interface OnExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectWhereJoinExpression { + dynamicOn(): DynamicOnExpression + on(condition: IIfValueSource): DynamicOnExpression + on(condition: IBooleanValueSource): DynamicOnExpression } -export interface SelectExpressionWithoutJoin, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectWhereExpression { - from>(table: TABLE_OR_VIEW2): SelectExpressionWithoutJoin +export interface SelectExpressionWithoutJoin, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectWhereExpression { + from>(table: T2 & OfSameDB): SelectExpressionWithoutJoin } -export interface SelectExpression, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> extends SelectWhereJoinExpression { - from>(table: TABLE_OR_VIEW2): SelectExpressionWithoutJoin +export interface SelectExpression, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectWhereJoinExpression { + from>(table: T2 & OfSameDB): SelectExpressionWithoutJoin } -export interface SelectExpressionSubquery, FEATURES> extends SelectExpressionBase { - from>(table: TABLE_OR_VIEW): SelectExpression +export interface SelectExpressionSubquery, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectExpressionBase { + from>(table: T & OfSameDB): SelectExpression } -export interface SelectExpressionFromNoTable extends SelectWhereExpression, NoTableOrViewRequiredView, FEATURES> { +export interface SelectExpressionFromNoTable, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ FEATURES> extends SelectWhereExpression { } -export type SelectColumns> = { - [P: string]: ValueSourceOf> | SelectColumns +export type SelectColumns = { + [P: string]: ValueSourceOf | SelectColumns [P: number | symbol]: never } type SelectPageWithExtras = { data: ( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[], count: number } & Omit -type ForUseInQueryAs> = - COLUMNS extends undefined +type ForUseInQueryAs<_FROM extends HasSource, REQUIRED extends HasSource, COLUMNS> = + unknown extends REQUIRED ? (as: ALIAS) => WithView, COLUMNS> // this is the case when te arguments are of type any + : [COLUMNS] extends [undefined] ? never - : COLUMNS extends AnyValueSource + : [COLUMNS] extends [AnyValueSource] ? never - : DB extends SqlServer | Oracle | MariaDB + : [REQUIRED] extends [OfDB<'sqlServer' | 'oracle' | 'mariaDB'>] ? ( - REQUIRED_TABLE_OR_VIEW extends NoTableOrViewRequiredView - ? (as: ALIAS) => WithView, COLUMNS> + [REQUIRED] extends [NoTableOrViewRequiredOfSameDB] + ? (as: ALIAS) => WithView, COLUMNS> : never // Not supported by SqlServer (No inner with), Oracle (No outer references in inner with) and MariaDB (No outer references in inner with) - ) : (as: ALIAS) => WithView, COLUMNS> + ) : (as: ALIAS) => WithView, COLUMNS> -type ForUseAsInlineQueryValue, FEATURES> = +type ForUseAsInlineQueryValue<_FROM extends HasSource, REQUIRED extends HasSource, COLUMNS, FEATURES> = COLUMNS extends AnyValueSource ? ( 'requiredResult' extends FEATURES - ? () => RemapValueSourceType - : () => RemapValueSourceTypeWithOptionalType + ? () => RemapValueSourceType + : () => RemapValueSourceTypeWithOptionalType ) : never -type ForUseAsInlineAggregatedArrayValue, FEATURES> = - DB extends SqlServer | Oracle | MariaDB +type ForUseAsInlineAggregatedArrayValue, REQUIRED extends HasSource, COLUMNS, FEATURES> = + [REQUIRED] extends [OfDB<'sqlServer' | 'oracle' | 'mariaDB'>] ? ( - REQUIRED_TABLE_OR_VIEW extends NoTableOrViewRequiredView - ? ForUseAsInlineAggregatedArrayValueFn + [REQUIRED] extends [NoTableOrViewRequiredOfSameDB] + ? ForUseAsInlineAggregatedArrayValueFn : 'recursive' extends FEATURES ? never // Not supported by SqlServer (No inner with), Oracle (No outer references in inner with) and MariaDB (No outer references in inner with) - : DB extends SqlServer | Oracle - ? ForUseAsInlineAggregatedArrayValueFn + : REQUIRED extends OfDB<'sqlServer' | 'oracle'> + ? ForUseAsInlineAggregatedArrayValueFn // Only in MariaDB : 'compound' extends FEATURES ? never // Not supported by MariaDB (No outer references in inner from) @@ -504,37 +515,37 @@ type ForUseAsInlineAggregatedArrayValue - ) : ForUseAsInlineAggregatedArrayValueFn + : ForUseAsInlineAggregatedArrayValueFn + ) : ForUseAsInlineAggregatedArrayValueFn -type ForUseAsInlineAggregatedArrayValueFn> = +type ForUseAsInlineAggregatedArrayValueFn<_FROM extends HasSource, REQUIRED extends HasSource, COLUMNS> = COLUMNS extends IValueSource - ? () => AggregatedArrayValueSource, 'required'> - : () => AggregatedArrayValueSource]: ResultObjectValues[P] }>, 'required'> + ? () => AggregatedArrayValueSource, 'required'> + : () => AggregatedArrayValueSource]: ResultObjectValues[P] }>, 'required'> -type CompoundFunction, COLUMNS, RESULT, REQUIRED_TABLE_OR_VIEW extends ITableOrViewOf, FEATURES> = - DB extends SUPPORTED_DB - ? >(select: SELECT) => CompoundedExecutableSelectExpression : never -type StartWithFnType, NEXT> = - DB extends (NoopDB | Oracle) - ? StartWithFn +type StartWithFnType, REQUIRED extends HasSource, NEXT> = + [REQUIRED] extends [OfDB<'noopDB' | 'oracle'>] + ? StartWithFn : never -export interface StartWithFn, NEXT> { - (condition: IIfValueSource, any>): ConnectByExpression - (condition: IBooleanValueSource, any>): ConnectByExpression +export interface StartWithFn, /*in|out*/ REQUIRED extends HasSource, /*in|out*/ NEXT> { + (condition: IIfValueSource): ConnectByExpression + (condition: IBooleanValueSource): ConnectByExpression } -export interface ConnectByExpression, NEXT> { - connectBy(condition: (prior: >(column: COLUMN & Column) => COLUMN) => IBooleanValueSource, any>): NEXT - connectByNoCycle(condition: (prior: >(column: COLUMN & Column) => COLUMN) => IBooleanValueSource, any>): NEXT +export interface ConnectByExpression, /*in|out*/ _REQUIRED extends HasSource, NEXT> { + connectBy(condition: (prior: >(column: COLUMN) => COLUMN) => IBooleanValueSource): NEXT + connectByNoCycle(condition: (prior: >(column: COLUMN) => COLUMN) => IBooleanValueSource): NEXT } -type ConnectByFnType, NEXT> = - DB extends (NoopDB | Oracle) - ? (condition: (prior: >(column: COLUMN & Column) => COLUMN) => IBooleanValueSource, any>) => NEXT +type ConnectByFnType, REQUIRED extends HasSource, NEXT> = + [REQUIRED] extends [OfDB<'noopDB' | 'oracle'>] + ? (condition: (prior: >(column: COLUMN) => COLUMN) => IBooleanValueSource) => NEXT : never type OrderingSiblingsOnlyFnType = diff --git a/src/expressions/update.ts b/src/expressions/update.ts index 92a28e24..fea7ec39 100644 --- a/src/expressions/update.ts +++ b/src/expressions/update.ts @@ -1,40 +1,36 @@ import type { AnyValueSource, IBooleanValueSource, IExecutableUpdateQuery, IIfValueSource, RemapIValueSourceType, RemapIValueSourceTypeWithOptionalType, ValueSourceOf, ValueSourceValueType, ValueSourceValueTypeForResult } from "./values" -import type { ITable, ITableOrView, ITableOrViewOf, NoTableOrViewRequired, OLD, OuterJoinSource, ResolvedShape } from "../utils/ITableOrView" -import type { AnyDB, MariaDB, MySql, NoopDB, Oracle, PostgreSql, Sqlite, SqlServer } from "../databases" -import type { database, tableOrView, tableOrViewRef } from "../utils/symbols" -import type { RawFragment } from "../utils/RawFragment" -import type { ColumnsForSetOf, ColumnsForSetOfWithShape, ColumnsOf, OptionalColumnsForSetOf, OuterJoinTableOrView, RequiredColumnsForSetOf, ResolveShape } from "../utils/tableOrViewUtils" +import type { ForUseInLeftJoin, HasSource, IRawFragment, ITable, ITableOrView, OfDB, OfSameDB, ResolvedShape } from "../utils/ITableOrView" +import type { from, source, using } from "../utils/symbols" +import type { ColumnsForSetOf, ColumnsForSetOfWithShape, ColumnsKeyOf, OptionalColumnsForSetOf, RequiredColumnsForSetOf, ResolveShape } from "../utils/tableOrViewUtils" import type { Column, ColumnWithDefaultValue } from "../utils/Column" import type { Default } from "./Default" import type { ResultObjectValues, ResultObjectValuesProjectedAsNullable } from "../utils/resultUtils" +import type { NNoTableOrViewRequiredFrom, NOldValuesFrom, NSource } from "../utils/sourceName" -export interface UpdateCustomization { - afterUpdateKeyword?: RawFragment - beforeQuery?: RawFragment - afterQuery?: RawFragment +export interface UpdateCustomization, /*in|out*/ USING extends HasSource> { + afterUpdateKeyword?: IRawFragment + beforeQuery?: IRawFragment + afterQuery?: IRawFragment queryExecutionName?: string queryExecutionMetadata?: any } -export interface UpdateExpressionOf { - [database]: DB +export interface UpdateExpressionBase, /*in|out*/ USING extends HasSource> { + [from]: TABLE + [using]: USING } -export interface UpdateExpressionBase
> extends UpdateExpressionOf { - [tableOrView]: TABLE -} - -export interface ExecutableUpdate
> extends UpdateExpressionBase
, IExecutableUpdateQuery { +export interface ExecutableUpdate, /*in|out*/ USING extends HasSource> extends UpdateExpressionBase, IExecutableUpdateQuery, number> { executeUpdate(min?: number, max?: number): Promise query(): string params(): any[] } -export interface CustomizableExecutableUpdate
> extends ExecutableUpdate
{ - customizeQuery(customization: UpdateCustomization): ExecutableUpdate
+export interface CustomizableExecutableUpdate, /*in|out*/ USING extends HasSource> extends ExecutableUpdate { + customizeQuery(customization: UpdateCustomization): ExecutableUpdate } -export interface ExecutableUpdateExpression
, USING extends ITableOrView> extends ReturnableExecutableUpdate { +export interface ExecutableUpdateExpression, /*in|out*/ USING extends HasSource> extends ReturnableExecutableUpdate { set(columns: UpdateSets): ExecutableUpdateExpression setIfValue(columns: OptionalUpdateSets): ExecutableUpdateExpression setIfSet(columns: UpdateSets): ExecutableUpdateExpression @@ -92,11 +88,11 @@ export interface ExecutableUpdateExpression
, USI disallowAnyOtherSetWhen(when: boolean, error: Error, ...columns: ColumnsForSetOf
[]): ExecutableUpdateExpression dynamicWhere() : DynamicExecutableUpdateExpression - where(condition: IIfValueSource, any>): DynamicExecutableUpdateExpression - where(condition: IBooleanValueSource, any>): DynamicExecutableUpdateExpression + where(condition: IIfValueSource): DynamicExecutableUpdateExpression + where(condition: IBooleanValueSource): DynamicExecutableUpdateExpression } -export interface ShapedExecutableUpdateExpression
, USING extends ITableOrView, SHAPE> extends ReturnableExecutableUpdate { +export interface ShapedExecutableUpdateExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends ReturnableExecutableUpdate { extendShape>(shape: EXTEND_SHAPE): ShapedExecutableUpdateExpression> set(columns: UpdateSets): ShapedExecutableUpdateExpression setIfValue(columns: OptionalUpdateSets): ShapedExecutableUpdateExpression @@ -116,11 +112,11 @@ export interface ShapedExecutableUpdateExpression
dynamicWhere() : DynamicExecutableUpdateExpression - where(condition: IIfValueSource, any>): DynamicExecutableUpdateExpression - where(condition: IBooleanValueSource, any>): DynamicExecutableUpdateExpression + where(condition: IIfValueSource): DynamicExecutableUpdateExpression + where(condition: IBooleanValueSource): DynamicExecutableUpdateExpression } -export interface NotExecutableUpdateExpression
, USING extends ITableOrView> extends UpdateExpressionBase
{ +export interface NotExecutableUpdateExpression, /*in|out*/ USING extends HasSource> extends UpdateExpressionBase { set(columns: UpdateSets): NotExecutableUpdateExpression setIfValue(columns: OptionalUpdateSets): NotExecutableUpdateExpression setIfSet(columns: UpdateSets): NotExecutableUpdateExpression @@ -139,11 +135,11 @@ export interface NotExecutableUpdateExpression
, ignoreAnySetWithNoValue(): NotExecutableUpdateExpression dynamicWhere() : DynamicExecutableUpdateExpression - where(condition: IIfValueSource, any>): DynamicExecutableUpdateExpression - where(condition: IBooleanValueSource, any>): DynamicExecutableUpdateExpression + where(condition: IIfValueSource): DynamicExecutableUpdateExpression + where(condition: IBooleanValueSource): DynamicExecutableUpdateExpression } -export interface ShapedNotExecutableUpdateExpression
, USING extends ITableOrView, SHAPE> extends UpdateExpressionBase
{ +export interface ShapedNotExecutableUpdateExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends UpdateExpressionBase { extendShape>(shape: EXTEND_SHAPE): ShapedNotExecutableUpdateExpression> set(columns: UpdateSets): ShapedNotExecutableUpdateExpression setIfValue(columns: OptionalUpdateSets): ShapedNotExecutableUpdateExpression @@ -163,18 +159,18 @@ export interface ShapedNotExecutableUpdateExpression
dynamicWhere() : DynamicExecutableUpdateExpression - where(condition: IIfValueSource, any>): DynamicExecutableUpdateExpression - where(condition: IBooleanValueSource, any>): DynamicExecutableUpdateExpression + where(condition: IIfValueSource): DynamicExecutableUpdateExpression + where(condition: IBooleanValueSource): DynamicExecutableUpdateExpression } -export interface DynamicExecutableUpdateExpression
, USING extends ITableOrView> extends ReturnableExecutableUpdate { - and(condition: IIfValueSource, any>): DynamicExecutableUpdateExpression - and(condition: IBooleanValueSource, any>): DynamicExecutableUpdateExpression - or(condition: IIfValueSource, any>): DynamicExecutableUpdateExpression - or(condition: IBooleanValueSource, any>): DynamicExecutableUpdateExpression +export interface DynamicExecutableUpdateExpression, /*in|out*/ USING extends HasSource> extends ReturnableExecutableUpdate { + and(condition: IIfValueSource): DynamicExecutableUpdateExpression + and(condition: IBooleanValueSource): DynamicExecutableUpdateExpression + or(condition: IIfValueSource): DynamicExecutableUpdateExpression + or(condition: IBooleanValueSource): DynamicExecutableUpdateExpression } -export interface UpdateSetExpression
, USING extends ITableOrView> extends UpdateExpressionBase
{ +export interface UpdateSetExpression, /*in|out*/ USING extends HasSource> extends UpdateExpressionBase { shapedAs>(shape: SHAPE): ShapedUpdateSetExpression> dynamicSet(): NotExecutableUpdateExpression dynamicSet(columns: UpdateSets): NotExecutableUpdateExpression @@ -182,7 +178,7 @@ export interface UpdateSetExpression
, USING exte setIfValue(columns: OptionalUpdateSets): NotExecutableUpdateExpression } -export interface ShapedUpdateSetExpression
, USING extends ITableOrView, SHAPE> extends UpdateExpressionBase
{ +export interface ShapedUpdateSetExpression, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends UpdateExpressionBase { extendShape>(shape: EXTEND_SHAPE): ShapedNotExecutableUpdateExpression> dynamicSet(): ShapedNotExecutableUpdateExpression dynamicSet(columns: UpdateSets): ShapedNotExecutableUpdateExpression @@ -190,15 +186,15 @@ export interface ShapedUpdateSetExpression
, USIN setIfValue(columns: OptionalUpdateSets): ShapedNotExecutableUpdateExpression } -export interface UpdateExpression
, USING extends ITableOrView> extends UpdateSetExpression { +export interface UpdateExpression, /*in|out*/ USING extends HasSource> extends UpdateSetExpression { from: FromFnType join: OnExpressionFnType innerJoin: OnExpressionFnType - leftJoin: OuterJoinOnExpressionFnType - leftOuterJoin: OuterJoinOnExpressionFnType + leftJoin: LeftJoinOnExpressionFnType + leftOuterJoin: LeftJoinOnExpressionFnType } -export interface UpdateSetExpressionAllowingNoWhere
, USING extends ITableOrView> extends UpdateExpressionBase
{ +export interface UpdateSetExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends UpdateExpressionBase { shapedAs>(shape: SHAPE): ShapedUpdateSetExpressionAllowingNoWhere> dynamicSet(): ExecutableUpdateExpression dynamicSet(columns: UpdateSets): ExecutableUpdateExpression @@ -206,7 +202,7 @@ export interface UpdateSetExpressionAllowingNoWhere
): ExecutableUpdateExpression } -export interface ShapedUpdateSetExpressionAllowingNoWhere
, USING extends ITableOrView, SHAPE> extends UpdateExpressionBase
{ +export interface ShapedUpdateSetExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource, /*in|out*/ SHAPE> extends UpdateExpressionBase { extendShape>(shape: EXTEND_SHAPE): ShapedUpdateSetExpressionAllowingNoWhere> dynamicSet(): ShapedExecutableUpdateExpression dynamicSet(columns: UpdateSets): ShapedExecutableUpdateExpression @@ -214,32 +210,33 @@ export interface ShapedUpdateSetExpressionAllowingNoWhere
): ShapedExecutableUpdateExpression } -export interface UpdateExpressionAllowingNoWhere
, USING extends ITableOrView> extends UpdateSetExpressionAllowingNoWhere { +export interface UpdateExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends UpdateSetExpressionAllowingNoWhere { from: FromFnTypeAllowingNoWhere join: OnExpressionFnTypeAllowingNoWhere innerJoin: OnExpressionFnTypeAllowingNoWhere - leftJoin: OuterJoinOnExpressionFnTypeAllowingNoWhere - leftOuterJoin: OuterJoinOnExpressionFnTypeAllowingNoWhere + leftJoin: LeftJoinOnExpressionFnTypeAllowingNoWhere + leftOuterJoin: LeftJoinOnExpressionFnTypeAllowingNoWhere } -export type UpdateSets
, USING extends ITableOrView, SHAPE> = - SHAPE extends ResolvedShape
+export type UpdateSets
, USING extends HasSource, SHAPE> = UpdateSetsContent +export type UpdateSetsContent = + SHAPE extends ResolvedShape ? ( { - [P in RequiredColumnsForSetOf]?: InputTypeOfColumnAllowing + [P in RequiredColumnsForSetOf]?: InputTypeOfColumnAllowing } & { - [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumnAllowing + [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumnAllowing } ): ( { - [P in RequiredColumnsForSetOf
]?: InputTypeOfColumnAllowing + [P in RequiredColumnsForSetOf]?: InputTypeOfColumnAllowing } & { - [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumnAllowing + [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumnAllowing } ) -export type UpdateValues
, SHAPE> = - SHAPE extends ResolvedShape
+export type UpdateValues = + SHAPE extends ResolvedShape ? ( { [P in RequiredColumnsForSetOf]?: ValueSourceValueType @@ -248,157 +245,158 @@ export type UpdateValues
, SHAPE> = } ): ( { - [P in RequiredColumnsForSetOf
]?: ValueSourceValueType + [P in RequiredColumnsForSetOf]?: ValueSourceValueType } & { - [P in OptionalColumnsForSetOf
]?: ValueSourceValueType + [P in OptionalColumnsForSetOf]?: ValueSourceValueType } ) -export type UpdateShape
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) +export type UpdateShape
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> ? { - [key: string]: ValueSourceOf[typeof tableOrViewRef]> & Column | ColumnsForSetOf
+ [key: string]: ValueSourceOf[typeof source]> & Column | ColumnsForSetOf
} : { - [key: string]: ValueSourceOf & Column | ColumnsForSetOf
+ [key: string]: ValueSourceOf & Column | ColumnsForSetOf
} -type FilterTables> = USING extends ITable ? USING : never +type FilterTables> = USING extends ITable ? USING : never -export type OptionalUpdateSets
, USING extends ITableOrView, SHAPE> = - SHAPE extends ResolvedShape
+export type OptionalUpdateSets
, USING extends HasSource, SHAPE> = OptionalUpdateSetsContent +type OptionalUpdateSetsContent
, ALLOWING extends NSource, SHAPE> = + SHAPE extends ResolvedShape ? ( { - [P in RequiredColumnsForSetOf]?: InputTypeOfColumnAllowing | null | undefined + [P in RequiredColumnsForSetOf]?: InputTypeOfColumnAllowing | null | undefined } & { - [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumnAllowing | null | undefined + [P in OptionalColumnsForSetOf]?: InputTypeOfOptionalColumnAllowing | null | undefined } ) : ( { - [P in RequiredColumnsForSetOf
]?: InputTypeOfColumnAllowing | null | undefined + [P in RequiredColumnsForSetOf
]?: InputTypeOfColumnAllowing | null | undefined } & { - [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumnAllowing | null | undefined + [P in OptionalColumnsForSetOf
]?: InputTypeOfOptionalColumnAllowing | null | undefined } ) -type InputTypeOfColumnAllowing
, K extends ColumnsOf
, ALLOWING extends ITableOrView> = - TABLE[K] extends ValueSourceOf ? - (TABLE[K] extends ColumnWithDefaultValue ? ( - ValueSourceValueType | RemapIValueSourceType, TABLE[K]> | Default +type InputTypeOfColumnAllowing, ALLOWING extends NSource> = + CONTAINER[K] extends AnyValueSource ? + (CONTAINER[K] extends ColumnWithDefaultValue ? ( + ValueSourceValueType | RemapIValueSourceType | Default ) : ( - ValueSourceValueType | RemapIValueSourceType, TABLE[K]> + ValueSourceValueType | RemapIValueSourceType )) : never -type InputTypeOfOptionalColumnAllowing
, K extends ColumnsOf
, ALLOWING extends ITableOrView> = - TABLE[K] extends ValueSourceOf ? - (TABLE[K] extends ColumnWithDefaultValue ? ( - ValueSourceValueType | RemapIValueSourceTypeWithOptionalType, TABLE[K], any> | Default +type InputTypeOfOptionalColumnAllowing, ALLOWING extends NSource> = + CONTAINER[K] extends AnyValueSource ? + (CONTAINER[K] extends ColumnWithDefaultValue ? ( + ValueSourceValueType | RemapIValueSourceTypeWithOptionalType | Default ) : ( - ValueSourceValueType | RemapIValueSourceTypeWithOptionalType, TABLE[K], any> + ValueSourceValueType | RemapIValueSourceTypeWithOptionalType )) : never -export interface UpdateSetJoinExpression
, USING extends ITableOrView> extends UpdateSetExpression { - join>(table: TABLE_OR_VIEW2): OnExpression - innerJoin>(table: TABLE_OR_VIEW2): OnExpression - leftJoin, ALIAS>(source: OuterJoinSource): OnExpression> - leftOuterJoin, ALIAS>(source: OuterJoinSource): OnExpression> +export interface UpdateSetJoinExpression, /*in|out*/ USING extends HasSource> extends UpdateSetExpression { + join>(table: T2 & OfSameDB
): OnExpression + innerJoin>(table: T2 & OfSameDB
): OnExpression + leftJoin>(source: T2 & OfSameDB
): OnExpression + leftOuterJoin>(source: T2 & OfSameDB
): OnExpression } -export interface DynamicOnExpression
, USING extends ITableOrView> extends UpdateSetJoinExpression { - and(condition: IIfValueSource, any>): DynamicOnExpression - and(condition: IBooleanValueSource, any>): DynamicOnExpression - or(condition: IIfValueSource, any>): DynamicOnExpression - or(condition: IBooleanValueSource, any>): DynamicOnExpression +export interface DynamicOnExpression, /*in|out*/ USING extends HasSource> extends UpdateSetJoinExpression { + and(condition: IIfValueSource): DynamicOnExpression + and(condition: IBooleanValueSource): DynamicOnExpression + or(condition: IIfValueSource): DynamicOnExpression + or(condition: IBooleanValueSource): DynamicOnExpression } -export interface OnExpression
, USING extends ITableOrView> extends UpdateSetJoinExpression { +export interface OnExpression, /*in|out*/ USING extends HasSource> extends UpdateSetJoinExpression { dynamicOn(): DynamicOnExpression - on(condition: IIfValueSource, any>): DynamicOnExpression - on(condition: IBooleanValueSource, any>): DynamicOnExpression + on(condition: IIfValueSource): DynamicOnExpression + on(condition: IBooleanValueSource): DynamicOnExpression } -export interface UpdateExpressionWithoutJoin
, USING extends ITableOrView> extends UpdateSetExpression { - from>(table: TABLE_OR_VIEW2): UpdateExpressionWithoutJoin +export interface UpdateExpressionWithoutJoin, /*in|out*/ USING extends HasSource> extends UpdateSetExpression { + from>(table: T2 & OfSameDB
): UpdateExpressionWithoutJoin } -export interface UpdateFromExpression
, USING extends ITableOrView> extends UpdateSetJoinExpression { - from>(table: TABLE_OR_VIEW2): UpdateExpressionWithoutJoin +export interface UpdateFromExpression, /*in|out*/ USING extends HasSource> extends UpdateSetJoinExpression { + from>(table: T2 & OfSameDB
): UpdateExpressionWithoutJoin } -type FromFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB | MySql) - ? >(table: TABLE_OR_VIEW2) => UpdateFromExpression +type FromFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB' | 'mySql'> + ? >(table: T2 & OfSameDB
) => UpdateFromExpression : never -type OnExpressionFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) - ? >(table: TABLE_OR_VIEW2) => OnExpression +type OnExpressionFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> + ? >(table: T2 & OfSameDB
) => OnExpression : never -type OuterJoinOnExpressionFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) - ? , ALIAS>(source: OuterJoinSource) => OnExpression> +type LeftJoinOnExpressionFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> + ? >(source: T2 & OfSameDB
) => OnExpression : never -export interface UpdateSetJoinExpressionAllowingNoWhere
, USING extends ITableOrView> extends UpdateSetExpressionAllowingNoWhere { - join>(table: TABLE_OR_VIEW2): OnExpressionAllowingNoWhere - innerJoin>(table: TABLE_OR_VIEW2): OnExpressionAllowingNoWhere - leftJoin, ALIAS>(source: OuterJoinSource): OnExpressionAllowingNoWhere> - leftOuterJoin, ALIAS>(source: OuterJoinSource): OnExpressionAllowingNoWhere> +export interface UpdateSetJoinExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends UpdateSetExpressionAllowingNoWhere { + join>(table: T2 & OfSameDB
): OnExpressionAllowingNoWhere + innerJoin>(table: T2 & OfSameDB
): OnExpressionAllowingNoWhere + leftJoin>(source: T2 & OfSameDB
): OnExpressionAllowingNoWhere + leftOuterJoin>(source: T2 & OfSameDB
): OnExpressionAllowingNoWhere } -export interface DynamicOnExpressionAllowingNoWhere
, USING extends ITableOrView> extends UpdateSetJoinExpressionAllowingNoWhere { - and(condition: IIfValueSource, any>): DynamicOnExpressionAllowingNoWhere - and(condition: IBooleanValueSource, any>): DynamicOnExpressionAllowingNoWhere - or(condition: IIfValueSource, any>): DynamicOnExpressionAllowingNoWhere - or(condition: IBooleanValueSource, any>): DynamicOnExpressionAllowingNoWhere +export interface DynamicOnExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends UpdateSetJoinExpressionAllowingNoWhere { + and(condition: IIfValueSource): DynamicOnExpressionAllowingNoWhere + and(condition: IBooleanValueSource): DynamicOnExpressionAllowingNoWhere + or(condition: IIfValueSource): DynamicOnExpressionAllowingNoWhere + or(condition: IBooleanValueSource): DynamicOnExpressionAllowingNoWhere } -export interface OnExpressionAllowingNoWhere
, USING extends ITableOrView> extends UpdateSetJoinExpressionAllowingNoWhere { +export interface OnExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends UpdateSetJoinExpressionAllowingNoWhere { dynamicOn(): DynamicOnExpressionAllowingNoWhere - on(condition: IIfValueSource, any>): DynamicOnExpressionAllowingNoWhere - on(condition: IBooleanValueSource, any>): DynamicOnExpressionAllowingNoWhere + on(condition: IIfValueSource): DynamicOnExpressionAllowingNoWhere + on(condition: IBooleanValueSource): DynamicOnExpressionAllowingNoWhere } -export interface UpdateExpressionWithoutJoinAllowingNoWhere
, USING extends ITableOrView> extends UpdateSetExpressionAllowingNoWhere { - from>(table: TABLE_OR_VIEW2): UpdateExpressionWithoutJoinAllowingNoWhere +export interface UpdateExpressionWithoutJoinAllowingNoWhere, /*in|out*/ USING extends HasSource> extends UpdateSetExpressionAllowingNoWhere { + from>(table: T2 & OfSameDB
): UpdateExpressionWithoutJoinAllowingNoWhere } -export interface UpdateFromExpressionAllowingNoWhere
, USING extends ITableOrView> extends UpdateSetJoinExpressionAllowingNoWhere { - from>(table: TABLE_OR_VIEW2): UpdateExpressionWithoutJoinAllowingNoWhere +export interface UpdateFromExpressionAllowingNoWhere, /*in|out*/ USING extends HasSource> extends UpdateSetJoinExpressionAllowingNoWhere { + from>(table: T2 & OfSameDB
): UpdateExpressionWithoutJoinAllowingNoWhere } -type FromFnTypeAllowingNoWhere
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Sqlite | MariaDB | MySql) - ? >(table: TABLE_OR_VIEW2) => UpdateFromExpressionAllowingNoWhere +type FromFnTypeAllowingNoWhere
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'sqlite' | 'mariaDB' | 'mySql'> + ? >(table: T2 & OfSameDB
) => UpdateFromExpressionAllowingNoWhere : never -type OnExpressionFnTypeAllowingNoWhere
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) - ? >(table: TABLE_OR_VIEW2) => OnExpressionAllowingNoWhere +type OnExpressionFnTypeAllowingNoWhere
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> + ? >(table: T2 & OfSameDB
) => OnExpressionAllowingNoWhere : never -type OuterJoinOnExpressionFnTypeAllowingNoWhere
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | MariaDB | MySql) - ? , ALIAS>(source: OuterJoinSource) => OnExpressionAllowingNoWhere> +type LeftJoinOnExpressionFnTypeAllowingNoWhere
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'mariaDB' | 'mySql'> + ? >(source: T2 & OfSameDB
) => OnExpressionAllowingNoWhere : never -export interface ReturnableExecutableUpdate
, USING extends ITableOrView> extends CustomizableExecutableUpdate
{ +export interface ReturnableExecutableUpdate, /*in|out*/ USING extends HasSource> extends CustomizableExecutableUpdate { returning: ReturningFnType returningOneColumn: ReturningOneColumnFnType } -export interface ExecutableUpdateReturning
, COLUMNS, RESULT> extends UpdateExpressionBase
, IExecutableUpdateQuery { +export interface ExecutableUpdateReturning, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends UpdateExpressionBase, IExecutableUpdateQuery, RESULT> { executeUpdateNoneOrOne(): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] }) | null> executeUpdateOne(): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })> executeUpdateMany(min?: number, max?: number): Promise<( COLUMNS extends AnyValueSource ? RESULT : { [P in keyof RESULT]: RESULT[P] })[]> @@ -407,29 +405,29 @@ export interface ExecutableUpdateReturning
, COLU params(): any[] } -export interface ComposableCustomizableExecutableUpdate
, COLUMNS, RESULT> extends ExecutableUpdateReturning { - customizeQuery(customization: UpdateCustomization): ExecutableUpdateReturning +export interface CustomizableExecutableUpdateReturning, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS, /*in|out*/ RESULT> extends ExecutableUpdateReturning { + customizeQuery(customization: UpdateCustomization): ExecutableUpdateReturning } -export interface ComposableCustomizableExecutableUpdateProjectableAsNullable
, COLUMNS> extends ComposableCustomizableExecutableUpdate> { - projectingOptionalValuesAsNullable(): ComposableCustomizableExecutableUpdate> +export interface CustomizableExecutableUpdateProjectableAsNullable, /*in|out*/ USING extends HasSource, /*in|out*/ COLUMNS> extends CustomizableExecutableUpdateReturning> { + projectingOptionalValuesAsNullable(): CustomizableExecutableUpdateReturning> } -type ReturningFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Oracle) - ? >(columns: COLUMNS) => ComposableCustomizableExecutableUpdateProjectableAsNullable - : (TABLE[typeof database] extends Sqlite - ? >(columns: COLUMNS) => ComposableCustomizableExecutableUpdateProjectableAsNullable - : never) - -type ReturningOneColumnFnType
, USING extends ITableOrView> = - TABLE[typeof database] extends (NoopDB | PostgreSql | SqlServer | Oracle) - ? | OLD>>(column: COLUMN) => ComposableCustomizableExecutableUpdate> - : (TABLE[typeof database] extends Sqlite - ? | OLD>>(column: COLUMN) => ComposableCustomizableExecutableUpdate> - : never) - -export type UpdateColumns
, USING extends ITableOrView> = { - [P: string]: ValueSourceOf | OLD> | UpdateColumns +type ReturningFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'oracle'> + ? >>(columns: COLUMNS) => CustomizableExecutableUpdateProjectableAsNullable + : TABLE extends OfDB<'sqlite'> + ? >>(columns: COLUMNS) => CustomizableExecutableUpdateProjectableAsNullable + : never + +type ReturningOneColumnFnType
, USING extends HasSource> = + TABLE extends OfDB<'noopDB' | 'postgreSql' | 'sqlServer' | 'oracle'> + ? >>(column: COLUMN) => CustomizableExecutableUpdateReturning> + : TABLE extends OfDB<'sqlite'> + ? > | NOldValuesFrom>(column: COLUMN) => CustomizableExecutableUpdateReturning> + : never + +export type UpdateColumns = { + [P: string]: ValueSourceOf | UpdateColumns [P: number | symbol]: never } diff --git a/src/expressions/values.ts b/src/expressions/values.ts index ac012a26..175d9a3c 100644 --- a/src/expressions/values.ts +++ b/src/expressions/values.ts @@ -1,8 +1,8 @@ -import type { ITableOrView, ITableOrViewOf, ITableOrViewRef, HasAddWiths } from "../utils/ITableOrView" -import type { AnyDB } from "../databases" +import type { HasAddWiths, HasSource, AnyTableOrView } from "../utils/ITableOrView" import type { TypeAdapter } from "../TypeAdapter" -import type { aggregatedArrayValueSourceType, anyBooleanValueSourceType, bigintValueSourceType, booleanValueSourceType, columnsType, comparableValueSourceType, customDoubleValueSourceType, customIntValueSourceType, customLocalDateTimeValueSourceType, customLocalDateValueSourceType, customLocalTimeValueSourceType, customUuidValueSourceType, database, localDateTimeValueSourceType, localDateValueSourceType, equalableValueSourceType, ifValueSourceType, nullableValueSourceType, numberValueSourceType, optionalType, requiredTableOrView, resultType, stringValueSourceType, tableOrView, tableOrViewRef, localTimeValueSourceType, type, uuidValueSourceType, valueSourceType } from "../utils/symbols" -import { valueType, valueSourceTypeName, isValueSourceObject } from "../utils/symbols" +import type { aggregatedArrayValueSource, anyBooleanValueSource, bigintValueSource, booleanValueSource, columnsType, comparableValueSource, customDoubleValueSource, customIntValueSource, customLocalDateTimeValueSource, customLocalDateValueSource, customLocalTimeValueSource, customUuidValueSource, localDateTimeValueSource, localDateValueSource, equalableValueSource, ifValueSource, nullableValueSource, numberValueSource, optionalType, resultType, stringValueSource, localTimeValueSource, type, uuidValueSource, source } from "../utils/symbols" +import { valueType, typeName, typeName as typeName_, isValueSourceObject } from "../utils/symbols" +import type { NSource } from "../utils/sourceName" export type OptionalType = 'required' | 'requiredInOptionalObject' | 'originallyRequired' | 'optional' // sorted from the more strict to less strict @@ -72,24 +72,19 @@ export type ValueSourceValueTypeForOptionalObjectResultSameOuterJoin = T exte export type ValueSourceValueTypeForOptionalNullableObjectResultSameOuterJoin = T extends IValueSource ? TYPE | (OPTIONAL_TYPE extends 'required' | 'requiredInOptionalObject' | 'originallyRequired' ? never : null) : never export interface AnyValueSource { - [valueSourceType]: 'ValueSource' -} - -export interface ValueSourceOfDB extends AnyValueSource { - [database]: DB + [isValueSourceObject]: true } -export interface ValueSourceOf> extends ValueSourceOfDB { - [tableOrView]: TABLE_OR_VIEW +export interface ValueSourceOf extends AnyValueSource, HasSource { } -export interface IValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends ValueSourceOf { +export interface IValueSource extends ValueSourceOf { [valueType]: TYPE [optionalType]: OPTIONAL_TYPE - [valueSourceTypeName]: TYPE_NAME + [typeName]: TYPE_NAME } -export interface ValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IValueSource { +export interface ValueSource extends IValueSource { isConstValue(): boolean getConstValue(): TYPE allowWhen(when: boolean, errorMessage: string): this @@ -176,7 +171,7 @@ export function isValueSource(value: any): value is AnyValueSource { return false } -export function __getValueSourceOfObject(obj: ITableOrView, prop: string): ValueSource, unknown, unknown, any> | undefined { +export function __getValueSourceOfObject(obj: AnyTableOrView, prop: string): ValueSource | undefined { const result = (obj as any)[prop] if (!result) { return undefined @@ -195,909 +190,899 @@ export function __getValueSourcePrivate(valueSource: AnyValueSource | IIfValueSo return valueSource as any } -export interface INullableValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IValueSource { - [nullableValueSourceType]: 'NullableValueSource' +export interface INullableValueSource extends IValueSource { + [nullableValueSource]: 'NullableValueSource' } -export interface NullableValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends ValueSource, INullableValueSource { - isNull(): BooleanValueSource - isNotNull(): BooleanValueSource +export interface NullableValueSource extends ValueSource, INullableValueSource { + isNull(): BooleanValueSource + isNotNull(): BooleanValueSource // The next methods must be reimplemented in the subinterface with the proper return type - valueWhenNull(value: TYPE): NullableValueSource - valueWhenNull, TYPE, this[typeof valueSourceTypeName], any>>(value: VALUE): NullableValueSource - nullIfValue(value: TYPE): NullableValueSource - nullIfValue, TYPE, this[typeof valueSourceTypeName], any>>(value: VALUE): NullableValueSource - asOptional(): NullableValueSource - asRequiredInOptionalObject(): NullableValueSource - onlyWhenOrNull(when: boolean): NullableValueSource - ignoreWhenAsNull(when: boolean): NullableValueSource + valueWhenNull(value: TYPE): NullableValueSource + valueWhenNull>(value: VALUE): NullableValueSource + nullIfValue(value: TYPE): NullableValueSource + nullIfValue>(value: VALUE): NullableValueSource + asOptional(): NullableValueSource + asRequiredInOptionalObject(): NullableValueSource + onlyWhenOrNull(when: boolean): NullableValueSource + ignoreWhenAsNull(when: boolean): NullableValueSource } -export interface IExecutableSelectQuery> { +export interface IExecutableSelectQuery extends HasSource { [type]: 'ExecutableSelectQuery' - [database]: DB - [requiredTableOrView]: REQUIRED_TABLE_OR_VIEW [resultType]: RESULT [columnsType]: COLUMNS } -export interface IExecutableInsertQuery
, RESULT> { +export interface IExecutableInsertQuery extends HasSource { [type]: 'ExecutableInsertQuery' - [database]: TABLE[typeof database] - [tableOrView]: TABLE [resultType]: RESULT } -export interface IExecutableUpdateQuery
, RESULT> { +export interface IExecutableUpdateQuery extends HasSource { [type]: 'ExecutableUpdateQuery' - [database]: TABLE[typeof database] - [tableOrView]: TABLE [resultType]: RESULT } -export interface IExecutableDeleteQuery
, RESULT> { +export interface IExecutableDeleteQuery extends HasSource { [type]: 'ExecutableDeleteQuery' - [database]: TABLE[typeof database] - [tableOrView]: TABLE [resultType]: RESULT } -export interface IEqualableValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends INullableValueSource { - [equalableValueSourceType]: 'EqualableValueSource' -} - -export interface EqualableValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends NullableValueSource, IEqualableValueSource { - equalsIfValue(value: TYPE | null | undefined): IfValueSource - equals(value: TYPE): BooleanValueSource - equals, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource> - notEqualsIfValue(value: TYPE | null | undefined): IfValueSource - notEquals(value: TYPE): BooleanValueSource - notEquals, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource> - isIfValue(value: TYPE | null | undefined): IfValueSource - is(value: TYPE | null | undefined): BooleanValueSource - is, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource - isNotIfValue(value: TYPE | null | undefined): IfValueSource - isNot(value: TYPE | null | undefined): BooleanValueSource - isNot, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource - - inIfValue(values: TYPE[] | null | undefined): IfValueSource - in(values: TYPE[]): BooleanValueSource - in, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource> - in>(select: IExecutableSelectQuery, TABLE_OR_VIEW2>): BooleanValueSource - notInIfValue(values: TYPE[] | null | undefined): IfValueSource - notIn(values: TYPE[]): BooleanValueSource - notIn, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource> - notIn>(select: IExecutableSelectQuery, TABLE_OR_VIEW2>): BooleanValueSource - inN(...value: TYPE[]): BooleanValueSource - inN, TYPE, TYPE_NAME, any>>(...value: Array): BooleanValueSource> - notInN(...value: TYPE[]): BooleanValueSource - notInN, TYPE, TYPE_NAME, any>>(...value: Array): BooleanValueSource> +export interface IEqualableValueSource extends INullableValueSource { + [equalableValueSource]: 'EqualableValueSource' +} + +export interface EqualableValueSource extends NullableValueSource, IEqualableValueSource { + equalsIfValue(value: TYPE | null | undefined): IfValueSource + equals(value: TYPE): BooleanValueSource + equals>(value: VALUE): BooleanValueSource> + notEqualsIfValue(value: TYPE | null | undefined): IfValueSource + notEquals(value: TYPE): BooleanValueSource + notEquals>(value: VALUE): BooleanValueSource> + isIfValue(value: TYPE | null | undefined): IfValueSource + is(value: TYPE | null | undefined): BooleanValueSource + is>(value: VALUE): BooleanValueSource + isNotIfValue(value: TYPE | null | undefined): IfValueSource + isNot(value: TYPE | null | undefined): BooleanValueSource + isNot>(value: VALUE): BooleanValueSource + + inIfValue(values: TYPE[] | null | undefined): IfValueSource + in(values: TYPE[]): BooleanValueSource + in>(value: VALUE): BooleanValueSource> + in(select: IExecutableSelectQuery, TYPE | null | undefined>): BooleanValueSource + notInIfValue(values: TYPE[] | null | undefined): IfValueSource + notIn(values: TYPE[]): BooleanValueSource + notIn>(value: VALUE): BooleanValueSource> + notIn(select: IExecutableSelectQuery, TYPE | null | undefined>): BooleanValueSource + inN(...value: TYPE[]): BooleanValueSource + inN>(...value: Array): BooleanValueSource> + notInN(...value: TYPE[]): BooleanValueSource + notInN>(...value: Array): BooleanValueSource> // Redefined methods - valueWhenNull(value: TYPE): EqualableValueSource - valueWhenNull, TYPE, this[typeof valueSourceTypeName], any>>(value: VALUE): EqualableValueSource - nullIfValue(value: TYPE): EqualableValueSource - nullIfValue, TYPE, this[typeof valueSourceTypeName], any>>(value: VALUE): EqualableValueSource - asOptional(): EqualableValueSource - asRequiredInOptionalObject(): EqualableValueSource - onlyWhenOrNull(when: boolean): EqualableValueSource - ignoreWhenAsNull(when: boolean): EqualableValueSource -} - -export interface IComparableValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IEqualableValueSource { - [comparableValueSourceType]: 'ComparableValueSource' -} - -export interface ComparableValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends EqualableValueSource, IComparableValueSource { - lessThanIfValue(value: TYPE | null | undefined): IfValueSource - lessThan(value: TYPE): BooleanValueSource - lessThan, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource> - greaterThanIfValue(value: TYPE | null | undefined): IfValueSource - greaterThan(value: TYPE): BooleanValueSource - greaterThan, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource> - lessOrEqualsIfValue(value: TYPE | null | undefined): IfValueSource - lessOrEquals(value: TYPE): BooleanValueSource - lessOrEquals, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource> - greaterOrEqualsIfValue(value: TYPE | null | undefined): IfValueSource - greaterOrEquals(value: TYPE): BooleanValueSource - greaterOrEquals, TYPE, TYPE_NAME, any>>(value: VALUE): BooleanValueSource> - between(value: TYPE, value2: TYPE): BooleanValueSource - between, TYPE, TYPE_NAME, any>>(value: TYPE, value2: VALUE2): BooleanValueSource> - between, TYPE, TYPE_NAME, any>>(value: VALUE, value2: TYPE): BooleanValueSource> - between, TYPE, TYPE_NAME, any>, VALUE2 extends IEqualableValueSource, TYPE, TYPE_NAME, any>>(value: VALUE, value2: VALUE2): BooleanValueSource, VALUE2[typeof optionalType]>> - notBetween(value: TYPE, value2: TYPE): BooleanValueSource - notBetween, TYPE, TYPE_NAME, any>>(value: TYPE, value2: VALUE2): BooleanValueSource> - notBetween, TYPE, TYPE_NAME, any>>(value: VALUE, value2: TYPE): BooleanValueSource> - notBetween, TYPE, TYPE_NAME, any>, VALUE2 extends IEqualableValueSource, TYPE, TYPE_NAME, any>>(value: VALUE, value2: VALUE2): BooleanValueSource, VALUE2[typeof optionalType]>> + valueWhenNull(value: TYPE): EqualableValueSource + valueWhenNull>(value: VALUE): EqualableValueSource + nullIfValue(value: TYPE): EqualableValueSource + nullIfValue>(value: VALUE): EqualableValueSource + asOptional(): EqualableValueSource + asRequiredInOptionalObject(): EqualableValueSource + onlyWhenOrNull(when: boolean): EqualableValueSource + ignoreWhenAsNull(when: boolean): EqualableValueSource +} + +export interface IComparableValueSource extends IEqualableValueSource { + [comparableValueSource]: 'ComparableValueSource' +} + +export interface ComparableValueSource extends EqualableValueSource, IComparableValueSource { + lessThanIfValue(value: TYPE | null | undefined): IfValueSource + lessThan(value: TYPE): BooleanValueSource + lessThan>(value: VALUE): BooleanValueSource> + greaterThanIfValue(value: TYPE | null | undefined): IfValueSource + greaterThan(value: TYPE): BooleanValueSource + greaterThan>(value: VALUE): BooleanValueSource> + lessOrEqualsIfValue(value: TYPE | null | undefined): IfValueSource + lessOrEquals(value: TYPE): BooleanValueSource + lessOrEquals>(value: VALUE): BooleanValueSource> + greaterOrEqualsIfValue(value: TYPE | null | undefined): IfValueSource + greaterOrEquals(value: TYPE): BooleanValueSource + greaterOrEquals>(value: VALUE): BooleanValueSource> + between(value: TYPE, value2: TYPE): BooleanValueSource + between>(value: TYPE, value2: VALUE2): BooleanValueSource> + between>(value: VALUE, value2: TYPE): BooleanValueSource> + between, VALUE2 extends IEqualableValueSource>(value: VALUE, value2: VALUE2): BooleanValueSource, VALUE2[typeof optionalType]>> + notBetween(value: TYPE, value2: TYPE): BooleanValueSource + notBetween>(value: TYPE, value2: VALUE2): BooleanValueSource> + notBetween>(value: VALUE, value2: TYPE): BooleanValueSource> + notBetween, VALUE2 extends IEqualableValueSource>(value: VALUE, value2: VALUE2): BooleanValueSource, VALUE2[typeof optionalType]>> // Redefined methods - valueWhenNull(value: TYPE): ComparableValueSource - valueWhenNull, TYPE, this[typeof valueSourceTypeName], any>>(value: VALUE): ComparableValueSource - nullIfValue(value: TYPE): ComparableValueSource - nullIfValue, TYPE, this[typeof valueSourceTypeName], any>>(value: VALUE): ComparableValueSource - asOptional(): ComparableValueSource - asRequiredInOptionalObject(): ComparableValueSource - onlyWhenOrNull(when: boolean): ComparableValueSource - ignoreWhenAsNull(when: boolean): ComparableValueSource -} - -export interface IBooleanValueSource, OPTIONAL_TYPE extends OptionalType> extends IEqualableValueSource { - [booleanValueSourceType]: 'BooleanValueSource' - [anyBooleanValueSourceType]: 'AnyBooleanValueSource' -} - -export interface BooleanValueSource, OPTIONAL_TYPE extends OptionalType> extends EqualableValueSource, IBooleanValueSource { - negate(): BooleanValueSource - and(value: boolean): BooleanValueSource - and, any>>(value: VALUE): BooleanValueSource> - and, any>>(value: VALUE): BooleanValueSource> - or(value: boolean): BooleanValueSource - or, any>>(value: VALUE): BooleanValueSource> - or, any>>(value: VALUE): BooleanValueSource> - onlyWhen(condition: boolean): IIfValueSource - ignoreWhen(condition: boolean): IIfValueSource + valueWhenNull(value: TYPE): ComparableValueSource + valueWhenNull>(value: VALUE): ComparableValueSource + nullIfValue(value: TYPE): ComparableValueSource + nullIfValue>(value: VALUE): ComparableValueSource + asOptional(): ComparableValueSource + asRequiredInOptionalObject(): ComparableValueSource + onlyWhenOrNull(when: boolean): ComparableValueSource + ignoreWhenAsNull(when: boolean): ComparableValueSource +} + +export interface IBooleanValueSource extends IEqualableValueSource { + [booleanValueSource]: 'BooleanValueSource' + [anyBooleanValueSource]: 'AnyBooleanValueSource' +} + +export interface BooleanValueSource extends EqualableValueSource, IBooleanValueSource { + negate(): BooleanValueSource + and(value: boolean): BooleanValueSource + and>(value: VALUE): BooleanValueSource> + and>(value: VALUE): BooleanValueSource> + or(value: boolean): BooleanValueSource + or>(value: VALUE): BooleanValueSource> + or>(value: VALUE): BooleanValueSource> + onlyWhen(condition: boolean): IIfValueSource + ignoreWhen(condition: boolean): IIfValueSource // Redefined methods - valueWhenNull(value: boolean): BooleanValueSource - valueWhenNull, boolean, this[typeof valueSourceTypeName], any>>(value: VALUE): BooleanValueSource - nullIfValue(value: boolean): BooleanValueSource - nullIfValue, boolean, this[typeof valueSourceTypeName], any>>(value: VALUE): BooleanValueSource - asOptional(): BooleanValueSource - asRequiredInOptionalObject(): BooleanValueSource - onlyWhenOrNull(when: boolean): BooleanValueSource - ignoreWhenAsNull(when: boolean): BooleanValueSource -} - -export interface IIfValueSource, OPTIONAL_TYPE extends OptionalType> { - [database]: TABLE_OR_VIEW[typeof database] - [tableOrView]: TABLE_OR_VIEW + valueWhenNull(value: boolean): BooleanValueSource + valueWhenNull>(value: VALUE): BooleanValueSource + nullIfValue(value: boolean): BooleanValueSource + nullIfValue>(value: VALUE): BooleanValueSource + asOptional(): BooleanValueSource + asRequiredInOptionalObject(): BooleanValueSource + onlyWhenOrNull(when: boolean): BooleanValueSource + ignoreWhenAsNull(when: boolean): BooleanValueSource +} + +export interface IIfValueSource { + [source]: SOURCE [valueType]: boolean [optionalType]: OPTIONAL_TYPE - [ifValueSourceType]: 'IfValueSource' - [anyBooleanValueSourceType]: 'AnyBooleanValueSource' -} - -export interface IfValueSource, OPTIONAL_TYPE extends OptionalType> extends IIfValueSource { - negate(): IIfValueSource - and(value: boolean): BooleanValueSource - and, any>>(value: VALUE): IfValueSource> - and, any>>(value: VALUE): BooleanValueSource> - or(value: boolean): BooleanValueSource - or, any>>(value: VALUE): IfValueSource> - or, any>>(value: VALUE): BooleanValueSource> - onlyWhen(condition: boolean): IIfValueSource - ignoreWhen(condition: boolean): IIfValueSource - trueWhenNoValue(): BooleanValueSource - falseWhenNoValue(): BooleanValueSource - valueWhenNoValue(value: boolean): BooleanValueSource - valueWhenNoValue, any>>(value: VALUE): IIfValueSource> - valueWhenNoValue, any>>(value: VALUE): BooleanValueSource> -} - -export interface IAnyBooleanValueSource, OPTIONAL_TYPE extends OptionalType> { - [database]: TABLE_OR_VIEW[typeof database] - [tableOrView]: TABLE_OR_VIEW + [ifValueSource]: 'IfValueSource' + [anyBooleanValueSource]: 'AnyBooleanValueSource' +} + +export interface IfValueSource extends IIfValueSource { + negate(): IIfValueSource + and(value: boolean): BooleanValueSource + and>(value: VALUE): IfValueSource> + and>(value: VALUE): BooleanValueSource> + or(value: boolean): BooleanValueSource + or>(value: VALUE): IfValueSource> + or>(value: VALUE): BooleanValueSource> + onlyWhen(condition: boolean): IIfValueSource + ignoreWhen(condition: boolean): IIfValueSource + trueWhenNoValue(): BooleanValueSource + falseWhenNoValue(): BooleanValueSource + valueWhenNoValue(value: boolean): BooleanValueSource + valueWhenNoValue>(value: VALUE): IIfValueSource> + valueWhenNoValue>(value: VALUE): BooleanValueSource> +} + +export interface IAnyBooleanValueSource { + [source]: SOURCE [valueType]: boolean [optionalType]: OPTIONAL_TYPE - [anyBooleanValueSourceType]: 'AnyBooleanValueSource' + [anyBooleanValueSource]: 'AnyBooleanValueSource' } -export interface AlwaysIfValueSource, OPTIONAL_TYPE extends OptionalType> extends IIfValueSource { - negate(): AlwaysIfValueSource - and(value: boolean): AlwaysIfValueSource - and, any>>(value: VALUE): AlwaysIfValueSource> - and, any>>(value: VALUE): AlwaysIfValueSource> - or(value: boolean): AlwaysIfValueSource - or, any>>(value: VALUE): AlwaysIfValueSource> - or, any>>(value: VALUE): AlwaysIfValueSource> - onlyWhen(condition: boolean): AlwaysIfValueSource - ignoreWhen(condition: boolean): AlwaysIfValueSource - trueWhenNoValue(): AlwaysIfValueSource - falseWhenNoValue(): AlwaysIfValueSource - valueWhenNoValue(value: boolean): AlwaysIfValueSource - valueWhenNoValue, any>>(value: VALUE): AlwaysIfValueSource> - valueWhenNoValue, any>>(value: VALUE): AlwaysIfValueSource> +export interface AlwaysIfValueSource extends IIfValueSource { + negate(): AlwaysIfValueSource + and(value: boolean): AlwaysIfValueSource + and>(value: VALUE): AlwaysIfValueSource> + and>(value: VALUE): AlwaysIfValueSource> + or(value: boolean): AlwaysIfValueSource + or>(value: VALUE): AlwaysIfValueSource> + or>(value: VALUE): AlwaysIfValueSource> + onlyWhen(condition: boolean): AlwaysIfValueSource + ignoreWhen(condition: boolean): AlwaysIfValueSource + trueWhenNoValue(): AlwaysIfValueSource + falseWhenNoValue(): AlwaysIfValueSource + valueWhenNoValue(value: boolean): AlwaysIfValueSource + valueWhenNoValue>(value: VALUE): AlwaysIfValueSource> + valueWhenNoValue>(value: VALUE): AlwaysIfValueSource> } -export interface INumberValueSource, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [numberValueSourceType]: 'NumberValueSource' +export interface INumberValueSource extends IComparableValueSource { + [numberValueSource]: 'NumberValueSource' } -export interface NumberValueSource, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, INumberValueSource { +export interface NumberValueSource extends ComparableValueSource, INumberValueSource { // SqlFunction0 // Number functions - asInt(): NumberValueSource // Maybe unsafe cast, we round it when it is necesary - asDouble(): NumberValueSource - asBigint(): BigintValueSource // Maybe unsafe cast, we round it when it is necesary - abs(): NumberValueSource - ceil(): NumberValueSource - floor(): NumberValueSource - round(): NumberValueSource - exp(): NumberValueSource - ln(): NumberValueSource - log10(): NumberValueSource - sqrt(): NumberValueSource - cbrt(): NumberValueSource - sign(): NumberValueSource + asInt(): NumberValueSource // Maybe unsafe cast, we round it when it is necesary + asDouble(): NumberValueSource + asBigint(): BigintValueSource // Maybe unsafe cast, we round it when it is necesary + abs(): NumberValueSource + ceil(): NumberValueSource + floor(): NumberValueSource + round(): NumberValueSource + exp(): NumberValueSource + ln(): NumberValueSource + log10(): NumberValueSource + sqrt(): NumberValueSource + cbrt(): NumberValueSource + sign(): NumberValueSource // Trigonometric Functions - acos(): NumberValueSource - asin(): NumberValueSource - atan(): NumberValueSource - cos(): NumberValueSource - cot(): NumberValueSource - sin(): NumberValueSource - tan(): NumberValueSource + acos(): NumberValueSource + asin(): NumberValueSource + atan(): NumberValueSource + cos(): NumberValueSource + cot(): NumberValueSource + sin(): NumberValueSource + tan(): NumberValueSource // SqlFunction1 - power(value: number): NumberValueSource - power, any>>(value: VALUE): NumberValueSource> - logn(value: number): NumberValueSource - logn, any>>(value: VALUE): NumberValueSource> - roundn(value: number): NumberValueSource - roundn, any>>(value: VALUE): NumberValueSource> - minValue(value: number): NumberValueSource - minValue, any>>(value: VALUE): NumberValueSource> - maxValue(value: number): NumberValueSource - maxValue, any>>(value: VALUE): NumberValueSource> + power(value: number): NumberValueSource + power>(value: VALUE): NumberValueSource> + logn(value: number): NumberValueSource + logn>(value: VALUE): NumberValueSource> + roundn(value: number): NumberValueSource + roundn>(value: VALUE): NumberValueSource> + minValue(value: number): NumberValueSource + minValue>(value: VALUE): NumberValueSource> + maxValue(value: number): NumberValueSource + maxValue>(value: VALUE): NumberValueSource> // Number operators - add(value: number): NumberValueSource - add, any>>(value: VALUE): NumberValueSource> - substract(value: number): NumberValueSource - substract, any>>(value: VALUE): NumberValueSource> - multiply(value: number): NumberValueSource - multiply, any>>(value: VALUE): NumberValueSource> - divide(value: number): NumberValueSource - divide, any>>(value: VALUE): NumberValueSource> - modulo(value: number): NumberValueSource - modulo, any>>(value: VALUE): NumberValueSource> + add(value: number): NumberValueSource + add>(value: VALUE): NumberValueSource> + substract(value: number): NumberValueSource + substract>(value: VALUE): NumberValueSource> + multiply(value: number): NumberValueSource + multiply>(value: VALUE): NumberValueSource> + divide(value: number): NumberValueSource + divide>(value: VALUE): NumberValueSource> + modulo(value: number): NumberValueSource + modulo>(value: VALUE): NumberValueSource> // Trigonometric Functions - atan2(value: number): NumberValueSource - atan2, any>>(value: VALUE): NumberValueSource> + atan2(value: number): NumberValueSource + atan2>(value: VALUE): NumberValueSource> // Redefined methods - valueWhenNull(value: number): NumberValueSource - valueWhenNull, number, this[typeof valueSourceTypeName], any>>(value: VALUE): NumberValueSource - nullIfValue(value: number): NumberValueSource - nullIfValue, number, this[typeof valueSourceTypeName], any>>(value: VALUE): NumberValueSource - asOptional(): NumberValueSource - asRequiredInOptionalObject(): NumberValueSource - onlyWhenOrNull(when: boolean): NumberValueSource - ignoreWhenAsNull(when: boolean): NumberValueSource + valueWhenNull(value: number): NumberValueSource + valueWhenNull>(value: VALUE): NumberValueSource + nullIfValue(value: number): NumberValueSource + nullIfValue>(value: VALUE): NumberValueSource + asOptional(): NumberValueSource + asRequiredInOptionalObject(): NumberValueSource + onlyWhenOrNull(when: boolean): NumberValueSource + ignoreWhenAsNull(when: boolean): NumberValueSource } -export interface IBigintValueSource, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [bigintValueSourceType]: 'BigintValueSource' +export interface IBigintValueSource extends IComparableValueSource { + [bigintValueSource]: 'BigintValueSource' } // some methods are commented because there is no bigdouble yet -export interface BigintValueSource, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, IBigintValueSource { +export interface BigintValueSource extends ComparableValueSource, IBigintValueSource { // SqlFunction0 // Number functions - abs(): BigintValueSource - ceil(): BigintValueSource - floor(): BigintValueSource - round(): BigintValueSource - // exp(): DoubleValueSource - // ln(): DoubleValueSource - // log10(): DoubleValueSource - // sqrt(): DoubleValueSource - // cbrt(): DoubleValueSource - sign(): NumberValueSource + abs(): BigintValueSource + ceil(): BigintValueSource + floor(): BigintValueSource + round(): BigintValueSource + // exp(): DoubleValueSource + // ln(): DoubleValueSource + // log10(): DoubleValueSource + // sqrt(): DoubleValueSource + // cbrt(): DoubleValueSource + sign(): NumberValueSource // Trigonometric Functions - // acos(): DoubleValueSource - // asin(): DoubleValueSource - // atan(): DoubleValueSource - // cos(): DoubleValueSource - // cot(): DoubleValueSource - // sin(): DoubleValueSource - // tan(): DoubleValueSource + // acos(): DoubleValueSource + // asin(): DoubleValueSource + // atan(): DoubleValueSource + // cos(): DoubleValueSource + // cot(): DoubleValueSource + // sin(): DoubleValueSource + // tan(): DoubleValueSource // SqlFunction1 - // power(value: bigint): DoubleValueSource - // power, any>>(value: VALUE): DoubleValueSource> - // power(value: double): DoubleValueSource - // power, any>>(value: VALUE): DoubleValueSource> - // logn(value: bigint): DoubleValueSource - // logn, any>>(value: VALUE): DoubleValueSource> - // logn(value: double): DoubleValueSource - // logn, any>>(value: VALUE): DoubleValueSource> - // roundn(value: bigint): DoubleValueSource - // roundn, any>>(value: VALUE): DoubleValueSource> - minValue(value: bigint): BigintValueSource - minValue, any>>(value: VALUE): BigintValueSource> - // minValue(value: double): DoubleValueSource - // minValue, any>>(value: VALUE): DoubleValueSource> - maxValue(value: bigint): BigintValueSource - maxValue, any>>(value: VALUE): BigintValueSource> - // maxValue(value: double): DoubleValueSource - // maxValue, any>>(value: VALUE): DoubleValueSource> + // power(value: bigint): DoubleValueSource + // power, any>>(value: VALUE): DoubleValueSource> + // power(value: double): DoubleValueSource + // power, any>>(value: VALUE): DoubleValueSource> + // logn(value: bigint): DoubleValueSource + // logn, any>>(value: VALUE): DoubleValueSource> + // logn(value: double): DoubleValueSource + // logn, any>>(value: VALUE): DoubleValueSource> + // roundn(value: bigint): DoubleValueSource + // roundn, any>>(value: VALUE): DoubleValueSource> + minValue(value: bigint): BigintValueSource + minValue>(value: VALUE): BigintValueSource> + // minValue(value: double): DoubleValueSource + // minValue, any>>(value: VALUE): DoubleValueSource> + maxValue(value: bigint): BigintValueSource + maxValue>(value: VALUE): BigintValueSource> + // maxValue(value: double): DoubleValueSource + // maxValue, any>>(value: VALUE): DoubleValueSource> // Number operators - add(value: bigint): BigintValueSource - add, any>>(value: VALUE): BigintValueSource> - // add(value: double): DoubleValueSource - // add, any>>(value: VALUE): DoubleValueSource> - substract(value: bigint): BigintValueSource - substract, any>>(value: VALUE): BigintValueSource> - // substract(value: double): DoubleValueSource - // substract, any>>(value: VALUE): DoubleValueSource> - // multiply(value: bigint): IntValueSource - // multiply, any>>(value: VALUE): IntValueSource> - // multiply(value: double): DoubleValueSource - // multiply, any>>(value: VALUE): DoubleValueSource> - // divide(value: bigint): DoubleValueSource - // divide, any>>(value: VALUE): DoubleValueSource> - // divide(value: double): DoubleValueSource - // divide, any>>(value: VALUE): DoubleValueSource> - modulo(value: bigint): BigintValueSource - modulo, any>>(value: VALUE): BigintValueSource> - // modulo(value: double): DoubleValueSource - // modulo, any>>(value: VALUE): DoubleValueSource> + add(value: bigint): BigintValueSource + add>(value: VALUE): BigintValueSource> + // add(value: double): DoubleValueSource + // add, any>>(value: VALUE): DoubleValueSource> + substract(value: bigint): BigintValueSource + substract>(value: VALUE): BigintValueSource> + // substract(value: double): DoubleValueSource + // substract, any>>(value: VALUE): DoubleValueSource> + // multiply(value: bigint): IntValueSource + // multiply, any>>(value: VALUE): IntValueSource> + // multiply(value: double): DoubleValueSource + // multiply, any>>(value: VALUE): DoubleValueSource> + // divide(value: bigint): DoubleValueSource + // divide, any>>(value: VALUE): DoubleValueSource> + // divide(value: double): DoubleValueSource + // divide, any>>(value: VALUE): DoubleValueSource> + modulo(value: bigint): BigintValueSource + modulo>(value: VALUE): BigintValueSource> + // modulo(value: double): DoubleValueSource + // modulo, any>>(value: VALUE): DoubleValueSource> // Trigonometric Functions - // atan2(value: bigint): DoubleValueSource - // atan2, any>>(value: VALUE): DoubleValueSource> - // atan2(value: double): DoubleValueSource - // atan2, any>>(value: VALUE): DoubleValueSource> + // atan2(value: bigint): DoubleValueSource + // atan2, any>>(value: VALUE): DoubleValueSource> + // atan2(value: double): DoubleValueSource + // atan2, any>>(value: VALUE): DoubleValueSource> // Redefined methods - valueWhenNull(value: bigint): BigintValueSource - valueWhenNull, bigint, this[typeof valueSourceTypeName], any>>(value: VALUE): BigintValueSource - nullIfValue(value: bigint): BigintValueSource - nullIfValue, bigint, this[typeof valueSourceTypeName], any>>(value: VALUE): BigintValueSource - asOptional(): BigintValueSource - asRequiredInOptionalObject(): BigintValueSource - onlyWhenOrNull(when: boolean): BigintValueSource - ignoreWhenAsNull(when: boolean): BigintValueSource + valueWhenNull(value: bigint): BigintValueSource + valueWhenNull>(value: VALUE): BigintValueSource + nullIfValue(value: bigint): BigintValueSource + nullIfValue>(value: VALUE): BigintValueSource + asOptional(): BigintValueSource + asRequiredInOptionalObject(): BigintValueSource + onlyWhenOrNull(when: boolean): BigintValueSource + ignoreWhenAsNull(when: boolean): BigintValueSource } -export interface ICustomIntValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [customIntValueSourceType]: 'CustomIntValueSource' +export interface ICustomIntValueSource extends IComparableValueSource { + [customIntValueSource]: 'CustomIntValueSource' } // some methods are commented because there is no double equivalent -export interface CustomIntValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ICustomIntValueSource { +export interface CustomIntValueSource extends ComparableValueSource, ICustomIntValueSource { // SqlFunction0 // Number functions - abs(): CustomIntValueSource - ceil(): CustomIntValueSource - floor(): CustomIntValueSource - round(): CustomIntValueSource - // exp(): DoubleValueSource - // ln(): DoubleValueSource - // log10(): DoubleValueSource - // sqrt(): DoubleValueSource - // cbrt(): DoubleValueSource - sign(): NumberValueSource + abs(): CustomIntValueSource + ceil(): CustomIntValueSource + floor(): CustomIntValueSource + round(): CustomIntValueSource + // exp(): DoubleValueSource + // ln(): DoubleValueSource + // log10(): DoubleValueSource + // sqrt(): DoubleValueSource + // cbrt(): DoubleValueSource + sign(): NumberValueSource // Trigonometric Functions - // acos(): DoubleValueSource - // asin(): DoubleValueSource - // atan(): DoubleValueSource - // cos(): DoubleValueSource - // cot(): DoubleValueSource - // sin(): DoubleValueSource - // tan(): DoubleValueSource + // acos(): DoubleValueSource + // asin(): DoubleValueSource + // atan(): DoubleValueSource + // cos(): DoubleValueSource + // cot(): DoubleValueSource + // sin(): DoubleValueSource + // tan(): DoubleValueSource // SqlFunction1 - // power(value: TYPE): DoubleValueSource - // power, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> - // power(value: double): DoubleValueSource - // power, any>>(value: VALUE): DoubleValueSource> - // logn(value: TYPE): DoubleValueSource - // logn, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> - // logn(value: double): DoubleValueSource - // logn, any>>(value: VALUE): DoubleValueSource> - // roundn(value: TYPE): DoubleValueSource - // roundn, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> - minValue(value: TYPE): CustomIntValueSource - minValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomIntValueSource> - // minValue(value: double): DoubleValueSource - // minValue, any>>(value: VALUE): DoubleValueSource> - maxValue(value: TYPE): CustomIntValueSource - maxValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomIntValueSource> - // maxValue(value: double): DoubleValueSource - // maxValue, any>>(value: VALUE): DoubleValueSource> + // power(value: TYPE): DoubleValueSource + // power, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> + // power(value: double): DoubleValueSource + // power, any>>(value: VALUE): DoubleValueSource> + // logn(value: TYPE): DoubleValueSource + // logn, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> + // logn(value: double): DoubleValueSource + // logn, any>>(value: VALUE): DoubleValueSource> + // roundn(value: TYPE): DoubleValueSource + // roundn, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> + minValue(value: TYPE): CustomIntValueSource + minValue>(value: VALUE): CustomIntValueSource> + // minValue(value: double): DoubleValueSource + // minValue, any>>(value: VALUE): DoubleValueSource> + maxValue(value: TYPE): CustomIntValueSource + maxValue>(value: VALUE): CustomIntValueSource> + // maxValue(value: double): DoubleValueSource + // maxValue, any>>(value: VALUE): DoubleValueSource> // Number operators - add(value: TYPE): CustomIntValueSource - add, TYPE, TYPE_NAME, any>>(value: VALUE): CustomIntValueSource> - // add(value: double): DoubleValueSource - // add, any>>(value: VALUE): DoubleValueSource> - substract(value: TYPE): CustomIntValueSource - substract, TYPE, TYPE_NAME, any>>(value: VALUE): CustomIntValueSource> - // substract(value: double): DoubleValueSource - // substract, any>>(value: VALUE): DoubleValueSource> - multiply(value: TYPE): CustomIntValueSource - multiply, TYPE, TYPE_NAME, any>>(value: VALUE): CustomIntValueSource> - // multiply(value: double): DoubleValueSource - // multiply, any>>(value: VALUE): DoubleValueSource> - // divide(value: TYPE): DoubleValueSource - // divide, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> - // divide(value: double): DoubleValueSource - // divide, any>>(value: VALUE): DoubleValueSource> - modulo(value: TYPE): CustomIntValueSource - modulo, TYPE, TYPE_NAME, any>>(value: VALUE): CustomIntValueSource> - // modulo(value: double): DoubleValueSource - // modulo, any>>(value: VALUE): DoubleValueSource> + add(value: TYPE): CustomIntValueSource + add>(value: VALUE): CustomIntValueSource> + // add(value: double): DoubleValueSource + // add, any>>(value: VALUE): DoubleValueSource> + substract(value: TYPE): CustomIntValueSource + substract>(value: VALUE): CustomIntValueSource> + // substract(value: double): DoubleValueSource + // substract, any>>(value: VALUE): DoubleValueSource> + multiply(value: TYPE): CustomIntValueSource + multiply>(value: VALUE): CustomIntValueSource> + // multiply(value: double): DoubleValueSource + // multiply, any>>(value: VALUE): DoubleValueSource> + // divide(value: TYPE): DoubleValueSource + // divide, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> + // divide(value: double): DoubleValueSource + // divide, any>>(value: VALUE): DoubleValueSource> + modulo(value: TYPE): CustomIntValueSource + modulo>(value: VALUE): CustomIntValueSource> + // modulo(value: double): DoubleValueSource + // modulo, any>>(value: VALUE): DoubleValueSource> // Trigonometric Functions - // atan2(value: TYPE): DoubleValueSource - // atan2, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> - // atan2(value: double): DoubleValueSource - // atan2, any>>(value: VALUE): DoubleValueSource> + // atan2(value: TYPE): DoubleValueSource + // atan2, TYPE, TYPE_NAME, any>>(value: VALUE): DoubleValueSource> + // atan2(value: double): DoubleValueSource + // atan2, any>>(value: VALUE): DoubleValueSource> // Redefined methods - valueWhenNull(value: TYPE): CustomIntValueSource - valueWhenNull, TYPE, TYPE_NAME, any>>(value: VALUE): CustomIntValueSource - nullIfValue(value: TYPE): CustomIntValueSource - nullIfValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomIntValueSource - asOptional(): CustomIntValueSource - asRequiredInOptionalObject(): CustomIntValueSource - onlyWhenOrNull(when: boolean): CustomIntValueSource - ignoreWhenAsNull(when: boolean): CustomIntValueSource + valueWhenNull(value: TYPE): CustomIntValueSource + valueWhenNull>(value: VALUE): CustomIntValueSource + nullIfValue(value: TYPE): CustomIntValueSource + nullIfValue>(value: VALUE): CustomIntValueSource + asOptional(): CustomIntValueSource + asRequiredInOptionalObject(): CustomIntValueSource + onlyWhenOrNull(when: boolean): CustomIntValueSource + ignoreWhenAsNull(when: boolean): CustomIntValueSource } -export interface ICustomDoubleValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [customDoubleValueSourceType]: 'CustomDoubleValueSource' +export interface ICustomDoubleValueSource extends IComparableValueSource { + [customDoubleValueSource]: 'CustomDoubleValueSource' } -export interface CustomDoubleValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ICustomDoubleValueSource { +export interface CustomDoubleValueSource extends ComparableValueSource, ICustomDoubleValueSource { // SqlFunction0 // Number functions - // asInt(): NumberValueSource // Maybe unsafe cast, we round it when it is necesary - // asDouble(): NumberValueSource - // asBigint(): BigintValueSource // Maybe unsafe cast, we round it when it is necesary - abs(): CustomDoubleValueSource - ceil(): CustomDoubleValueSource - floor(): CustomDoubleValueSource - round(): CustomDoubleValueSource - exp(): CustomDoubleValueSource - ln(): CustomDoubleValueSource - log10(): CustomDoubleValueSource - sqrt(): CustomDoubleValueSource - cbrt(): CustomDoubleValueSource - sign(): NumberValueSource + // asInt(): NumberValueSource // Maybe unsafe cast, we round it when it is necesary + // asDouble(): NumberValueSource + // asBigint(): BigintValueSource // Maybe unsafe cast, we round it when it is necesary + abs(): CustomDoubleValueSource + ceil(): CustomDoubleValueSource + floor(): CustomDoubleValueSource + round(): CustomDoubleValueSource + exp(): CustomDoubleValueSource + ln(): CustomDoubleValueSource + log10(): CustomDoubleValueSource + sqrt(): CustomDoubleValueSource + cbrt(): CustomDoubleValueSource + sign(): NumberValueSource // Trigonometric Functions - acos(): CustomDoubleValueSource - asin(): CustomDoubleValueSource - atan(): CustomDoubleValueSource - cos(): CustomDoubleValueSource - cot(): CustomDoubleValueSource - sin(): CustomDoubleValueSource - tan(): CustomDoubleValueSource + acos(): CustomDoubleValueSource + asin(): CustomDoubleValueSource + atan(): CustomDoubleValueSource + cos(): CustomDoubleValueSource + cot(): CustomDoubleValueSource + sin(): CustomDoubleValueSource + tan(): CustomDoubleValueSource // SqlFunction1 - power(value: TYPE): CustomDoubleValueSource - power, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> - logn(value: TYPE): CustomDoubleValueSource - logn, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> - roundn(value: TYPE): CustomDoubleValueSource - roundn(value: number): CustomDoubleValueSource - roundn, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> - roundn, any>>(value: VALUE): CustomDoubleValueSource> - minValue(value: TYPE): CustomDoubleValueSource - minValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> - maxValue(value: TYPE): CustomDoubleValueSource - maxValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> + power(value: TYPE): CustomDoubleValueSource + power>(value: VALUE): CustomDoubleValueSource> + logn(value: TYPE): CustomDoubleValueSource + logn>(value: VALUE): CustomDoubleValueSource> + roundn(value: TYPE): CustomDoubleValueSource + roundn(value: number): CustomDoubleValueSource + roundn>(value: VALUE): CustomDoubleValueSource> + roundn>(value: VALUE): CustomDoubleValueSource> + minValue(value: TYPE): CustomDoubleValueSource + minValue>(value: VALUE): CustomDoubleValueSource> + maxValue(value: TYPE): CustomDoubleValueSource + maxValue>(value: VALUE): CustomDoubleValueSource> // Number operators - add(value: TYPE): CustomDoubleValueSource - add, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> - substract(value: TYPE): CustomDoubleValueSource - substract, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> - multiply(value: TYPE): CustomDoubleValueSource - multiply, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> - divide(value: TYPE): CustomDoubleValueSource - divide, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> - modulo(value: TYPE): CustomDoubleValueSource - modulo, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> + add(value: TYPE): CustomDoubleValueSource + add>(value: VALUE): CustomDoubleValueSource> + substract(value: TYPE): CustomDoubleValueSource + substract>(value: VALUE): CustomDoubleValueSource> + multiply(value: TYPE): CustomDoubleValueSource + multiply>(value: VALUE): CustomDoubleValueSource> + divide(value: TYPE): CustomDoubleValueSource + divide>(value: VALUE): CustomDoubleValueSource> + modulo(value: TYPE): CustomDoubleValueSource + modulo>(value: VALUE): CustomDoubleValueSource> // Trigonometric Functions - atan2(value: TYPE): CustomDoubleValueSource - atan2, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource> + atan2(value: TYPE): CustomDoubleValueSource + atan2>(value: VALUE): CustomDoubleValueSource> // Redefined methods - valueWhenNull(value: TYPE): CustomDoubleValueSource - valueWhenNull, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource - nullIfValue(value: TYPE): CustomDoubleValueSource - nullIfValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomDoubleValueSource - asOptional(): CustomDoubleValueSource - asRequiredInOptionalObject(): CustomDoubleValueSource - onlyWhenOrNull(when: boolean): CustomDoubleValueSource - ignoreWhenAsNull(when: boolean): CustomDoubleValueSource + valueWhenNull(value: TYPE): CustomDoubleValueSource + valueWhenNull>(value: VALUE): CustomDoubleValueSource + nullIfValue(value: TYPE): CustomDoubleValueSource + nullIfValue>(value: VALUE): CustomDoubleValueSource + asOptional(): CustomDoubleValueSource + asRequiredInOptionalObject(): CustomDoubleValueSource + onlyWhenOrNull(when: boolean): CustomDoubleValueSource + ignoreWhenAsNull(when: boolean): CustomDoubleValueSource } -export interface IStringValueSource, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [stringValueSourceType]: 'StringValueSource' +export interface IStringValueSource extends IComparableValueSource { + [stringValueSource]: 'StringValueSource' } -export interface StringValueSource, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, IStringValueSource { +export interface StringValueSource extends ComparableValueSource, IStringValueSource { // SqlComparator 1 - equalsInsensitiveIfValue(value: string | null | undefined): IfValueSource - equalsInsensitive(value: string): BooleanValueSource - equalsInsensitive, any>>(value: VALUE): BooleanValueSource> - notEqualsInsensitiveIfValue(value: string | null | undefined): IfValueSource - notEqualsInsensitive(value: string): BooleanValueSource - notEqualsInsensitive, any>>(value: VALUE): BooleanValueSource> - likeIfValue(value: string | null | undefined): IfValueSource - like(value: string): BooleanValueSource - like, any>>(value: VALUE): BooleanValueSource> - notLikeIfValue(value: string | null | undefined): IfValueSource - notLike(value: string): BooleanValueSource - notLike, any>>(value: VALUE): BooleanValueSource> - likeInsensitiveIfValue(value: string | null | undefined): IfValueSource - likeInsensitive(value: string): BooleanValueSource - likeInsensitive, any>>(value: VALUE): BooleanValueSource> - notLikeInsensitiveIfValue(value: string | null | undefined): IfValueSource - notLikeInsensitive(value: string): BooleanValueSource - notLikeInsensitive, any>>(value: VALUE): BooleanValueSource> - startsWithIfValue(value: string | null | undefined): IfValueSource - startsWith(value: string): BooleanValueSource - startsWith, any>>(value: VALUE): BooleanValueSource> - notStartsWithIfValue(value: string | null | undefined): IfValueSource - notStartsWith(value: string): BooleanValueSource - notStartsWith, any>>(value: VALUE): BooleanValueSource> - endsWithIfValue(value: string | null | undefined): IfValueSource - endsWith(value: string): BooleanValueSource - endsWith, any>>(value: VALUE): BooleanValueSource> - notEndsWithIfValue(value: string | null | undefined): IfValueSource - notEndsWith(value: string): BooleanValueSource - notEndsWith, any>>(value: VALUE): BooleanValueSource> - startsWithInsensitiveIfValue(value: string | null | undefined): IfValueSource - startsWithInsensitive(value: string): BooleanValueSource - startsWithInsensitive, any>>(value: VALUE): BooleanValueSource> - notStartsWithInsensitiveIfValue(value: string | null | undefined): IfValueSource - notStartsWithInsensitive(value: string): BooleanValueSource - notStartsWithInsensitive, any>>(value: VALUE): BooleanValueSource> - endsWithInsensitiveIfValue(value: string | null | undefined): IfValueSource - endsWithInsensitive(value: string): BooleanValueSource - endsWithInsensitive, any>>(value: VALUE): BooleanValueSource> - notEndsWithInsensitiveIfValue(value: string | null | undefined): IfValueSource - notEndsWithInsensitive(value: string): BooleanValueSource - notEndsWithInsensitive, any>>(value: VALUE): BooleanValueSource> - containsIfValue(value: string | null | undefined): IfValueSource - contains(value: string ): BooleanValueSource - contains, any>>(value: VALUE): BooleanValueSource> - notContainsIfValue(value: string | null | undefined): IfValueSource - notContains(value: string): BooleanValueSource - notContains, any>>(value: VALUE): BooleanValueSource> - containsInsensitiveIfValue(value: string | null | undefined): IfValueSource - containsInsensitive(value: string): BooleanValueSource - containsInsensitive, any>>(value: VALUE): BooleanValueSource> - notContainsInsensitiveIfValue(value: string | null | undefined): IfValueSource - notContainsInsensitive(value: string): BooleanValueSource - notContainsInsensitive, any>>(value: VALUE): BooleanValueSource> + equalsInsensitiveIfValue(value: string | null | undefined): IfValueSource + equalsInsensitive(value: string): BooleanValueSource + equalsInsensitive>(value: VALUE): BooleanValueSource> + notEqualsInsensitiveIfValue(value: string | null | undefined): IfValueSource + notEqualsInsensitive(value: string): BooleanValueSource + notEqualsInsensitive>(value: VALUE): BooleanValueSource> + likeIfValue(value: string | null | undefined): IfValueSource + like(value: string): BooleanValueSource + like>(value: VALUE): BooleanValueSource> + notLikeIfValue(value: string | null | undefined): IfValueSource + notLike(value: string): BooleanValueSource + notLike>(value: VALUE): BooleanValueSource> + likeInsensitiveIfValue(value: string | null | undefined): IfValueSource + likeInsensitive(value: string): BooleanValueSource + likeInsensitive>(value: VALUE): BooleanValueSource> + notLikeInsensitiveIfValue(value: string | null | undefined): IfValueSource + notLikeInsensitive(value: string): BooleanValueSource + notLikeInsensitive>(value: VALUE): BooleanValueSource> + startsWithIfValue(value: string | null | undefined): IfValueSource + startsWith(value: string): BooleanValueSource + startsWith>(value: VALUE): BooleanValueSource> + notStartsWithIfValue(value: string | null | undefined): IfValueSource + notStartsWith(value: string): BooleanValueSource + notStartsWith>(value: VALUE): BooleanValueSource> + endsWithIfValue(value: string | null | undefined): IfValueSource + endsWith(value: string): BooleanValueSource + endsWith>(value: VALUE): BooleanValueSource> + notEndsWithIfValue(value: string | null | undefined): IfValueSource + notEndsWith(value: string): BooleanValueSource + notEndsWith>(value: VALUE): BooleanValueSource> + startsWithInsensitiveIfValue(value: string | null | undefined): IfValueSource + startsWithInsensitive(value: string): BooleanValueSource + startsWithInsensitive>(value: VALUE): BooleanValueSource> + notStartsWithInsensitiveIfValue(value: string | null | undefined): IfValueSource + notStartsWithInsensitive(value: string): BooleanValueSource + notStartsWithInsensitive>(value: VALUE): BooleanValueSource> + endsWithInsensitiveIfValue(value: string | null | undefined): IfValueSource + endsWithInsensitive(value: string): BooleanValueSource + endsWithInsensitive>(value: VALUE): BooleanValueSource> + notEndsWithInsensitiveIfValue(value: string | null | undefined): IfValueSource + notEndsWithInsensitive(value: string): BooleanValueSource + notEndsWithInsensitive>(value: VALUE): BooleanValueSource> + containsIfValue(value: string | null | undefined): IfValueSource + contains(value: string ): BooleanValueSource + contains>(value: VALUE): BooleanValueSource> + notContainsIfValue(value: string | null | undefined): IfValueSource + notContains(value: string): BooleanValueSource + notContains>(value: VALUE): BooleanValueSource> + containsInsensitiveIfValue(value: string | null | undefined): IfValueSource + containsInsensitive(value: string): BooleanValueSource + containsInsensitive>(value: VALUE): BooleanValueSource> + notContainsInsensitiveIfValue(value: string | null | undefined): IfValueSource + notContainsInsensitive(value: string): BooleanValueSource + notContainsInsensitive>(value: VALUE): BooleanValueSource> // SqlFunction0 - toLowerCase(): StringValueSource - toUpperCase(): StringValueSource - length(): NumberValueSource - trim(): StringValueSource - trimLeft(): StringValueSource - trimRight(): StringValueSource - reverse(): StringValueSource + toLowerCase(): StringValueSource + toUpperCase(): StringValueSource + length(): NumberValueSource + trim(): StringValueSource + trimLeft(): StringValueSource + trimRight(): StringValueSource + reverse(): StringValueSource // SqlFunction1 - concatIfValue(value: string | null | undefined): StringValueSource - concat(value: string): StringValueSource - concat, any>>(value: VALUE): StringValueSource> - substrToEnd(start: number): StringValueSource - substrToEnd, any>>(start: VALUE): StringValueSource> - substringToEnd(start: number): StringValueSource - substringToEnd, any>>(start: VALUE): StringValueSource> + concatIfValue(value: string | null | undefined): StringValueSource + concat(value: string): StringValueSource + concat>(value: VALUE): StringValueSource> + substrToEnd(start: number): StringValueSource + substrToEnd>(start: VALUE): StringValueSource> + substringToEnd(start: number): StringValueSource + substringToEnd>(start: VALUE): StringValueSource> // SqlFunction2 - substr(start: number, count: number): StringValueSource - substr, any>>(start: number, count: VALUE2): StringValueSource> - substr, any>>(start: VALUE, count: number): StringValueSource> - substr, any>, VALUE2 extends INumberValueSource, any>>(start: VALUE, count: VALUE2): StringValueSource, VALUE2[typeof optionalType]>> - substring(start: number, count: number): StringValueSource - substring, any>>(start: number, end: VALUE2): StringValueSource> - substring, any>>(start: VALUE, end: number): StringValueSource> - substring, any>, VALUE2 extends INumberValueSource, any>>(start: VALUE, end: VALUE2): StringValueSource, VALUE2[typeof optionalType]>> - replaceAllIfValue(findString: string | null | undefined, replaceWith: string | null | undefined): StringValueSource - replaceAllIfValue, any>>(findString: string | null | undefined, replaceWith: VALUE2): StringValueSource> - replaceAllIfValue, any>>(findString: VALUE, replaceWith: string | null | undefined): StringValueSource> - replaceAll(findString: string, replaceWith: string): StringValueSource - replaceAll, any>>(findString: string, replaceWith: VALUE2): StringValueSource> - replaceAll, any>>(findString: VALUE, replaceWith: string): StringValueSource> - replaceAll, any>, VALUE2 extends IStringValueSource, any>>(findString: VALUE, replaceWith: VALUE2): StringValueSource, VALUE2[typeof optionalType]>> + substr(start: number, count: number): StringValueSource + substr>(start: number, count: VALUE2): StringValueSource> + substr>(start: VALUE, count: number): StringValueSource> + substr, VALUE2 extends INumberValueSource>(start: VALUE, count: VALUE2): StringValueSource, VALUE2[typeof optionalType]>> + substring(start: number, count: number): StringValueSource + substring>(start: number, end: VALUE2): StringValueSource> + substring>(start: VALUE, end: number): StringValueSource> + substring, VALUE2 extends INumberValueSource>(start: VALUE, end: VALUE2): StringValueSource, VALUE2[typeof optionalType]>> + replaceAllIfValue(findString: string | null | undefined, replaceWith: string | null | undefined): StringValueSource + replaceAllIfValue>(findString: string | null | undefined, replaceWith: VALUE2): StringValueSource> + replaceAllIfValue>(findString: VALUE, replaceWith: string | null | undefined): StringValueSource> + replaceAll(findString: string, replaceWith: string): StringValueSource + replaceAll>(findString: string, replaceWith: VALUE2): StringValueSource> + replaceAll>(findString: VALUE, replaceWith: string): StringValueSource> + replaceAll, VALUE2 extends IStringValueSource>(findString: VALUE, replaceWith: VALUE2): StringValueSource, VALUE2[typeof optionalType]>> // Redefined methods - valueWhenNull(value: string): StringValueSource - valueWhenNull, string, this[typeof valueSourceTypeName], any>>(value: VALUE): StringValueSource - nullIfValue(value: string): StringValueSource - nullIfValue, string, this[typeof valueSourceTypeName], any>>(value: VALUE): StringValueSource - asOptional(): StringValueSource - asRequiredInOptionalObject(): StringValueSource - onlyWhenOrNull(when: boolean): StringValueSource - ignoreWhenAsNull(when: boolean): StringValueSource + valueWhenNull(value: string): StringValueSource + valueWhenNull>(value: VALUE): StringValueSource + nullIfValue(value: string): StringValueSource + nullIfValue>(value: VALUE): StringValueSource + asOptional(): StringValueSource + asRequiredInOptionalObject(): StringValueSource + onlyWhenOrNull(when: boolean): StringValueSource + ignoreWhenAsNull(when: boolean): StringValueSource } -export interface IUuidValueSource, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [uuidValueSourceType]: 'UuidValueSource' +export interface IUuidValueSource extends IComparableValueSource { + [uuidValueSource]: 'UuidValueSource' } -export interface UuidValueSource, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, IUuidValueSource { - asString(): StringValueSource +export interface UuidValueSource extends ComparableValueSource, IUuidValueSource { + asString(): StringValueSource // Redefined methods - valueWhenNull(value: string): UuidValueSource - valueWhenNull, string, this[typeof valueSourceTypeName], any>>(value: VALUE): UuidValueSource - nullIfValue(value: string): UuidValueSource - nullIfValue, string, this[typeof valueSourceTypeName], any>>(value: VALUE): UuidValueSource - asOptional(): UuidValueSource - asRequiredInOptionalObject(): UuidValueSource - onlyWhenOrNull(when: boolean): UuidValueSource - ignoreWhenAsNull(when: boolean): UuidValueSource + valueWhenNull(value: string): UuidValueSource + valueWhenNull>(value: VALUE): UuidValueSource + nullIfValue(value: string): UuidValueSource + nullIfValue>(value: VALUE): UuidValueSource + asOptional(): UuidValueSource + asRequiredInOptionalObject(): UuidValueSource + onlyWhenOrNull(when: boolean): UuidValueSource + ignoreWhenAsNull(when: boolean): UuidValueSource } -export interface ICustomUuidValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [customUuidValueSourceType]: 'CustomUuidValueSource' +export interface ICustomUuidValueSource extends IComparableValueSource { + [customUuidValueSource]: 'CustomUuidValueSource' } -export interface CustomUuidValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ICustomUuidValueSource { - asString(): StringValueSource +export interface CustomUuidValueSource extends ComparableValueSource, ICustomUuidValueSource { + asString(): StringValueSource // Redefined methods - valueWhenNull(value: TYPE): CustomUuidValueSource - valueWhenNull, TYPE, TYPE_NAME, any>>(value: VALUE): CustomUuidValueSource - nullIfValue(value: TYPE): CustomUuidValueSource - nullIfValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomUuidValueSource - asOptional(): CustomUuidValueSource - asRequiredInOptionalObject(): CustomUuidValueSource - onlyWhenOrNull(when: boolean): CustomUuidValueSource - ignoreWhenAsNull(when: boolean): CustomUuidValueSource + valueWhenNull(value: TYPE): CustomUuidValueSource + valueWhenNull>(value: VALUE): CustomUuidValueSource + nullIfValue(value: TYPE): CustomUuidValueSource + nullIfValue>(value: VALUE): CustomUuidValueSource + asOptional(): CustomUuidValueSource + asRequiredInOptionalObject(): CustomUuidValueSource + onlyWhenOrNull(when: boolean): CustomUuidValueSource + ignoreWhenAsNull(when: boolean): CustomUuidValueSource } -export interface ILocalDateValueSource, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [localDateValueSourceType]: 'LocalDateValueSource' +export interface ILocalDateValueSource extends IComparableValueSource { + [localDateValueSource]: 'LocalDateValueSource' } -export interface LocalDateValueSource, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ILocalDateValueSource { +export interface LocalDateValueSource extends ComparableValueSource, ILocalDateValueSource { /** Gets the year */ - getFullYear(): NumberValueSource + getFullYear(): NumberValueSource /** Gets the month (value between 0 to 11)*/ - getMonth(): NumberValueSource + getMonth(): NumberValueSource /** Gets the day-of-the-month */ - getDate(): NumberValueSource + getDate(): NumberValueSource /** Gets the day of the week (0 represents Sunday) */ - getDay(): NumberValueSource + getDay(): NumberValueSource // Redefined methods - valueWhenNull(value: Date): LocalDateValueSource - valueWhenNull, Date, this[typeof valueSourceTypeName], any>>(value: VALUE): LocalDateValueSource - nullIfValue(value: Date): LocalDateValueSource - nullIfValue, Date, this[typeof valueSourceTypeName], any>>(value: VALUE): LocalDateValueSource - asOptional(): LocalDateValueSource - asRequiredInOptionalObject(): LocalDateValueSource - onlyWhenOrNull(when: boolean): LocalDateValueSource - ignoreWhenAsNull(when: boolean): LocalDateValueSource + valueWhenNull(value: Date): LocalDateValueSource + valueWhenNull>(value: VALUE): LocalDateValueSource + nullIfValue(value: Date): LocalDateValueSource + nullIfValue>(value: VALUE): LocalDateValueSource + asOptional(): LocalDateValueSource + asRequiredInOptionalObject(): LocalDateValueSource + onlyWhenOrNull(when: boolean): LocalDateValueSource + ignoreWhenAsNull(when: boolean): LocalDateValueSource } -export interface ILocalTimeValueSource, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [localTimeValueSourceType]: 'LocalTimeValueSource' +export interface ILocalTimeValueSource extends IComparableValueSource { + [localTimeValueSource]: 'LocalTimeValueSource' } -export interface LocalTimeValueSource, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ILocalTimeValueSource { +export interface LocalTimeValueSource extends ComparableValueSource, ILocalTimeValueSource { /** Gets the hours */ - getHours(): NumberValueSource + getHours(): NumberValueSource /** Gets the minutes */ - getMinutes(): NumberValueSource + getMinutes(): NumberValueSource /** Gets the seconds */ - getSeconds(): NumberValueSource + getSeconds(): NumberValueSource /** Gets the milliseconds */ - getMilliseconds(): NumberValueSource + getMilliseconds(): NumberValueSource // Redefined methods - valueWhenNull(value: Date): LocalTimeValueSource - valueWhenNull, Date, this[typeof valueSourceTypeName], any>>(value: VALUE): LocalTimeValueSource - nullIfValue(value: Date): LocalTimeValueSource - nullIfValue, Date, this[typeof valueSourceTypeName], any>>(value: VALUE): LocalTimeValueSource - asOptional(): LocalTimeValueSource - asRequiredInOptionalObject(): LocalTimeValueSource - onlyWhenOrNull(when: boolean): LocalTimeValueSource - ignoreWhenAsNull(when: boolean): LocalTimeValueSource + valueWhenNull(value: Date): LocalTimeValueSource + valueWhenNull>(value: VALUE): LocalTimeValueSource + nullIfValue(value: Date): LocalTimeValueSource + nullIfValue>(value: VALUE): LocalTimeValueSource + asOptional(): LocalTimeValueSource + asRequiredInOptionalObject(): LocalTimeValueSource + onlyWhenOrNull(when: boolean): LocalTimeValueSource + ignoreWhenAsNull(when: boolean): LocalTimeValueSource } -export interface ILocalDateTimeValueSource, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [localDateTimeValueSourceType]: 'LocalDateTimeValueSource' +export interface ILocalDateTimeValueSource extends IComparableValueSource { + [localDateTimeValueSource]: 'LocalDateTimeValueSource' } -export interface LocalDateTimeValueSource, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ILocalDateTimeValueSource { +export interface LocalDateTimeValueSource extends ComparableValueSource, ILocalDateTimeValueSource { /** Gets the year */ - getFullYear(): NumberValueSource + getFullYear(): NumberValueSource /** Gets the month (value between 0 to 11)*/ - getMonth(): NumberValueSource + getMonth(): NumberValueSource /** Gets the day-of-the-month */ - getDate(): NumberValueSource + getDate(): NumberValueSource /** Gets the day of the week (0 represents Sunday) */ - getDay(): NumberValueSource + getDay(): NumberValueSource /** Gets the hours */ - getHours(): NumberValueSource + getHours(): NumberValueSource /** Gets the minutes */ - getMinutes(): NumberValueSource + getMinutes(): NumberValueSource /** Gets the seconds */ - getSeconds(): NumberValueSource + getSeconds(): NumberValueSource /** Gets the milliseconds */ - getMilliseconds(): NumberValueSource + getMilliseconds(): NumberValueSource /** Gets the time value in milliseconds */ - getTime(): NumberValueSource + getTime(): NumberValueSource // Redefined methods - valueWhenNull(value: Date): LocalDateTimeValueSource - valueWhenNull, Date, this[typeof valueSourceTypeName], any>>(value: VALUE): LocalDateTimeValueSource - nullIfValue(value: Date): LocalDateTimeValueSource - nullIfValue, Date, this[typeof valueSourceTypeName], any>>(value: VALUE): LocalDateTimeValueSource - asOptional(): LocalDateTimeValueSource - asRequiredInOptionalObject(): LocalDateTimeValueSource - onlyWhenOrNull(when: boolean): LocalDateTimeValueSource - ignoreWhenAsNull(when: boolean): LocalDateTimeValueSource + valueWhenNull(value: Date): LocalDateTimeValueSource + valueWhenNull>(value: VALUE): LocalDateTimeValueSource + nullIfValue(value: Date): LocalDateTimeValueSource + nullIfValue>(value: VALUE): LocalDateTimeValueSource + asOptional(): LocalDateTimeValueSource + asRequiredInOptionalObject(): LocalDateTimeValueSource + onlyWhenOrNull(when: boolean): LocalDateTimeValueSource + ignoreWhenAsNull(when: boolean): LocalDateTimeValueSource } -export interface ICustomLocalDateValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [customLocalDateValueSourceType]: 'CustomLocalDateValueSource' +export interface ICustomLocalDateValueSource extends IComparableValueSource { + [customLocalDateValueSource]: 'CustomLocalDateValueSource' } -export interface CustomLocalDateValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ICustomLocalDateValueSource { +export interface CustomLocalDateValueSource extends ComparableValueSource, ICustomLocalDateValueSource { /** Gets the year */ - getFullYear(): NumberValueSource + getFullYear(): NumberValueSource /** Gets the month (value between 0 to 11)*/ - getMonth(): NumberValueSource + getMonth(): NumberValueSource /** Gets the day-of-the-month */ - getDate(): NumberValueSource + getDate(): NumberValueSource /** Gets the day of the week (0 represents Sunday) */ - getDay(): NumberValueSource - valueWhenNull(value: TYPE): CustomLocalDateValueSource - valueWhenNull, TYPE, TYPE_NAME, any>>(value: VALUE): CustomLocalDateValueSource - nullIfValue(value: TYPE): CustomLocalDateValueSource - nullIfValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomLocalDateValueSource - asOptional(): CustomLocalDateValueSource - asRequiredInOptionalObject(): CustomLocalDateValueSource - onlyWhenOrNull(when: boolean): CustomLocalDateValueSource - ignoreWhenAsNull(when: boolean): CustomLocalDateValueSource + getDay(): NumberValueSource + valueWhenNull(value: TYPE): CustomLocalDateValueSource + valueWhenNull>(value: VALUE): CustomLocalDateValueSource + nullIfValue(value: TYPE): CustomLocalDateValueSource + nullIfValue>(value: VALUE): CustomLocalDateValueSource + asOptional(): CustomLocalDateValueSource + asRequiredInOptionalObject(): CustomLocalDateValueSource + onlyWhenOrNull(when: boolean): CustomLocalDateValueSource + ignoreWhenAsNull(when: boolean): CustomLocalDateValueSource } -export interface ICustomLocalTimeValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [customLocalTimeValueSourceType]: 'CustomLocalTimeValueSource' +export interface ICustomLocalTimeValueSource extends IComparableValueSource { + [customLocalTimeValueSource]: 'CustomLocalTimeValueSource' } -export interface CustomLocalTimeValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ICustomLocalTimeValueSource { +export interface CustomLocalTimeValueSource extends ComparableValueSource, ICustomLocalTimeValueSource { /** Gets the hours */ - getHours(): NumberValueSource + getHours(): NumberValueSource /** Gets the minutes */ - getMinutes(): NumberValueSource + getMinutes(): NumberValueSource /** Gets the seconds */ - getSeconds(): NumberValueSource + getSeconds(): NumberValueSource /** Gets the milliseconds */ - getMilliseconds(): NumberValueSource + getMilliseconds(): NumberValueSource // Redefined methods - valueWhenNull(value: TYPE): CustomLocalTimeValueSource - valueWhenNull, TYPE, TYPE_NAME, any>>(value: VALUE): CustomLocalTimeValueSource - nullIfValue(value: TYPE): CustomLocalTimeValueSource - nullIfValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomLocalTimeValueSource - asOptional(): CustomLocalTimeValueSource - asRequiredInOptionalObject(): CustomLocalTimeValueSource - onlyWhenOrNull(when: boolean): CustomLocalTimeValueSource - ignoreWhenAsNull(when: boolean): CustomLocalTimeValueSource + valueWhenNull(value: TYPE): CustomLocalTimeValueSource + valueWhenNull>(value: VALUE): CustomLocalTimeValueSource + nullIfValue(value: TYPE): CustomLocalTimeValueSource + nullIfValue>(value: VALUE): CustomLocalTimeValueSource + asOptional(): CustomLocalTimeValueSource + asRequiredInOptionalObject(): CustomLocalTimeValueSource + onlyWhenOrNull(when: boolean): CustomLocalTimeValueSource + ignoreWhenAsNull(when: boolean): CustomLocalTimeValueSource } -export interface ICustomLocalDateTimeValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends IComparableValueSource { - [customLocalDateTimeValueSourceType]: 'CustomLocalDateTimeValueSource' +export interface ICustomLocalDateTimeValueSource extends IComparableValueSource { + [customLocalDateTimeValueSource]: 'CustomLocalDateTimeValueSource' } -export interface CustomLocalDateTimeValueSource, TYPE, TYPE_NAME, OPTIONAL_TYPE extends OptionalType> extends ComparableValueSource, ICustomLocalDateTimeValueSource { +export interface CustomLocalDateTimeValueSource extends ComparableValueSource, ICustomLocalDateTimeValueSource { /** Gets the year */ - getFullYear(): NumberValueSource + getFullYear(): NumberValueSource /** Gets the month (value between 0 to 11)*/ - getMonth(): NumberValueSource + getMonth(): NumberValueSource /** Gets the day-of-the-month */ - getDate(): NumberValueSource + getDate(): NumberValueSource /** Gets the day of the week (0 represents Sunday) */ - getDay(): NumberValueSource + getDay(): NumberValueSource /** Gets the hours */ - getHours(): NumberValueSource + getHours(): NumberValueSource /** Gets the minutes */ - getMinutes(): NumberValueSource + getMinutes(): NumberValueSource /** Gets the seconds */ - getSeconds(): NumberValueSource + getSeconds(): NumberValueSource /** Gets the milliseconds */ - getMilliseconds(): NumberValueSource + getMilliseconds(): NumberValueSource /** Gets the time value in milliseconds */ - getTime(): NumberValueSource + getTime(): NumberValueSource // Redefined methods - valueWhenNull(value: TYPE): CustomLocalDateTimeValueSource - valueWhenNull, TYPE, TYPE_NAME, any>>(value: VALUE): CustomLocalDateTimeValueSource - nullIfValue(value: TYPE): CustomLocalDateTimeValueSource - nullIfValue, TYPE, TYPE_NAME, any>>(value: VALUE): CustomLocalDateTimeValueSource - asOptional(): CustomLocalDateTimeValueSource - asRequiredInOptionalObject(): CustomLocalDateTimeValueSource - onlyWhenOrNull(when: boolean): CustomLocalDateTimeValueSource - ignoreWhenAsNull(when: boolean): CustomLocalDateTimeValueSource + valueWhenNull(value: TYPE): CustomLocalDateTimeValueSource + valueWhenNull>(value: VALUE): CustomLocalDateTimeValueSource + nullIfValue(value: TYPE): CustomLocalDateTimeValueSource + nullIfValue>(value: VALUE): CustomLocalDateTimeValueSource + asOptional(): CustomLocalDateTimeValueSource + asRequiredInOptionalObject(): CustomLocalDateTimeValueSource + onlyWhenOrNull(when: boolean): CustomLocalDateTimeValueSource + ignoreWhenAsNull(when: boolean): CustomLocalDateTimeValueSource } -export interface IAggregatedArrayValueSource, TYPE, OPTIONAL_TYPE extends OptionalType> extends IValueSource { - [aggregatedArrayValueSourceType]: 'AggregatedArrayValueSource' +export interface IAggregatedArrayValueSource extends IValueSource { + [aggregatedArrayValueSource]: 'AggregatedArrayValueSource' } -export interface AggregatedArrayValueSource, TYPE, OPTIONAL_TYPE extends OptionalType> extends ValueSource, IAggregatedArrayValueSource { - useEmptyArrayForNoValue(): AggregatedArrayValueSource - asOptionalNonEmptyArray(): AggregatedArrayValueSource - asRequiredInOptionalObject(): AggregatedArrayValueSource - onlyWhenOrNull(when: boolean): AggregatedArrayValueSource - ignoreWhenAsNull(when: boolean): AggregatedArrayValueSource +export interface AggregatedArrayValueSource extends ValueSource, IAggregatedArrayValueSource { + useEmptyArrayForNoValue(): AggregatedArrayValueSource + asOptionalNonEmptyArray(): AggregatedArrayValueSource + asRequiredInOptionalObject(): AggregatedArrayValueSource + onlyWhenOrNull(when: boolean): AggregatedArrayValueSource + ignoreWhenAsNull(when: boolean): AggregatedArrayValueSource } -export interface AggregatedArrayValueSourceProjectableAsNullable, TYPE, STRICT_TYPE, OPTIONAL_TYPE extends OptionalType> extends AggregatedArrayValueSource { - projectingOptionalValuesAsNullable(): AggregatedArrayValueSource +export interface AggregatedArrayValueSourceProjectableAsNullable extends AggregatedArrayValueSource { + projectingOptionalValuesAsNullable(): AggregatedArrayValueSource } -export type RemapValueSourceType, TYPE> = +export type RemapValueSourceType = TYPE extends IValueSource ? ( - TYPE extends IBooleanValueSource ? BooleanValueSource : - TYPE extends IBigintValueSource ? BigintValueSource : - TYPE extends INumberValueSource ? NumberValueSource : - TYPE extends IStringValueSource ? StringValueSource : - TYPE extends IUuidValueSource ? UuidValueSource : - TYPE extends ILocalDateTimeValueSource ? LocalDateTimeValueSource : - TYPE extends ILocalDateValueSource ? LocalDateValueSource : - TYPE extends ILocalTimeValueSource ? LocalTimeValueSource : - TYPE extends ICustomIntValueSource ? CustomIntValueSource : - TYPE extends ICustomDoubleValueSource ? CustomDoubleValueSource : - TYPE extends ICustomUuidValueSource ? CustomUuidValueSource : - TYPE extends ICustomLocalDateTimeValueSource ? CustomLocalDateTimeValueSource : - TYPE extends ICustomLocalDateValueSource ? CustomLocalDateValueSource : - TYPE extends ICustomLocalTimeValueSource ? CustomLocalTimeValueSource : - TYPE extends IComparableValueSource ? ComparableValueSource : - TYPE extends IEqualableValueSource ? EqualableValueSource : - TYPE extends INullableValueSource ? NullableValueSource : - TYPE extends IAggregatedArrayValueSource ? AggregatedArrayValueSource : - ValueSource + TYPE extends IBooleanValueSource ? BooleanValueSource : + TYPE extends IBigintValueSource ? BigintValueSource : + TYPE extends INumberValueSource ? NumberValueSource : + TYPE extends IStringValueSource ? StringValueSource : + TYPE extends IUuidValueSource ? UuidValueSource : + TYPE extends ILocalDateTimeValueSource ? LocalDateTimeValueSource : + TYPE extends ILocalDateValueSource ? LocalDateValueSource : + TYPE extends ILocalTimeValueSource ? LocalTimeValueSource : + TYPE extends ICustomIntValueSource ? CustomIntValueSource : + TYPE extends ICustomDoubleValueSource ? CustomDoubleValueSource : + TYPE extends ICustomUuidValueSource ? CustomUuidValueSource : + TYPE extends ICustomLocalDateTimeValueSource ? CustomLocalDateTimeValueSource : + TYPE extends ICustomLocalDateValueSource ? CustomLocalDateValueSource : + TYPE extends ICustomLocalTimeValueSource ? CustomLocalTimeValueSource : + TYPE extends IComparableValueSource ? ComparableValueSource : + TYPE extends IEqualableValueSource ? EqualableValueSource : + TYPE extends INullableValueSource ? NullableValueSource : + TYPE extends IAggregatedArrayValueSource ? AggregatedArrayValueSource : + ValueSource ): never -export type RemapValueSourceTypeWithOptionalType, TYPE, OPTIONAL_TYPE extends OptionalType> = +export type RemapValueSourceTypeWithOptionalType = TYPE extends IValueSource ? ( - TYPE extends IBooleanValueSource ? BooleanValueSource : - TYPE extends IBigintValueSource ? BigintValueSource : - TYPE extends INumberValueSource ? NumberValueSource : - TYPE extends IStringValueSource ? StringValueSource : - TYPE extends IUuidValueSource ? UuidValueSource : - TYPE extends ILocalDateTimeValueSource ? LocalDateTimeValueSource : - TYPE extends ILocalDateValueSource ? LocalDateValueSource : - TYPE extends ILocalTimeValueSource ? LocalTimeValueSource : - TYPE extends ICustomIntValueSource ? CustomIntValueSource : - TYPE extends ICustomDoubleValueSource ? CustomDoubleValueSource : - TYPE extends ICustomUuidValueSource ? CustomUuidValueSource : - TYPE extends ICustomLocalDateTimeValueSource ? CustomLocalDateTimeValueSource : - TYPE extends ICustomLocalDateValueSource ? CustomLocalDateValueSource : - TYPE extends ICustomLocalTimeValueSource ? CustomLocalTimeValueSource : - TYPE extends IComparableValueSource ? ComparableValueSource : - TYPE extends IEqualableValueSource ? EqualableValueSource : - TYPE extends INullableValueSource ? NullableValueSource : - TYPE extends IAggregatedArrayValueSource ? AggregatedArrayValueSource : - ValueSource + TYPE extends IBooleanValueSource ? BooleanValueSource : + TYPE extends IBigintValueSource ? BigintValueSource : + TYPE extends INumberValueSource ? NumberValueSource : + TYPE extends IStringValueSource ? StringValueSource : + TYPE extends IUuidValueSource ? UuidValueSource : + TYPE extends ILocalDateTimeValueSource ? LocalDateTimeValueSource : + TYPE extends ILocalDateValueSource ? LocalDateValueSource : + TYPE extends ILocalTimeValueSource ? LocalTimeValueSource : + TYPE extends ICustomIntValueSource ? CustomIntValueSource : + TYPE extends ICustomDoubleValueSource ? CustomDoubleValueSource : + TYPE extends ICustomUuidValueSource ? CustomUuidValueSource : + TYPE extends ICustomLocalDateTimeValueSource ? CustomLocalDateTimeValueSource : + TYPE extends ICustomLocalDateValueSource ? CustomLocalDateValueSource : + TYPE extends ICustomLocalTimeValueSource ? CustomLocalTimeValueSource : + TYPE extends IComparableValueSource ? ComparableValueSource : + TYPE extends IEqualableValueSource ? EqualableValueSource : + TYPE extends INullableValueSource ? NullableValueSource : + TYPE extends IAggregatedArrayValueSource ? AggregatedArrayValueSource : + ValueSource ): never -export type RemapIValueSourceType, TYPE> = +export type RemapIValueSourceType = TYPE extends IValueSource ? ( - TYPE extends IBooleanValueSource ? IBooleanValueSource : - TYPE extends IBigintValueSource ? IBigintValueSource : - TYPE extends INumberValueSource ? INumberValueSource : - TYPE extends IStringValueSource ? IStringValueSource : - TYPE extends IUuidValueSource ? IUuidValueSource : - TYPE extends ILocalDateTimeValueSource ? ILocalDateTimeValueSource : - TYPE extends ILocalDateValueSource ? ILocalDateValueSource : - TYPE extends ILocalTimeValueSource ? ILocalTimeValueSource : - TYPE extends ICustomIntValueSource ? ICustomIntValueSource : - TYPE extends ICustomDoubleValueSource ? ICustomDoubleValueSource : - TYPE extends ICustomUuidValueSource ? ICustomUuidValueSource : - TYPE extends ICustomLocalDateTimeValueSource ? ICustomLocalDateTimeValueSource : - TYPE extends ICustomLocalDateValueSource ? ICustomLocalDateValueSource : - TYPE extends ICustomLocalTimeValueSource ? ICustomLocalTimeValueSource : - TYPE extends IComparableValueSource ? IComparableValueSource : - TYPE extends IEqualableValueSource ? IEqualableValueSource : - TYPE extends INullableValueSource ? INullableValueSource : - TYPE extends IAggregatedArrayValueSource ? IAggregatedArrayValueSource : - IValueSource + TYPE extends IBooleanValueSource ? IBooleanValueSource : + TYPE extends IBigintValueSource ? IBigintValueSource : + TYPE extends INumberValueSource ? INumberValueSource : + TYPE extends IStringValueSource ? IStringValueSource : + TYPE extends IUuidValueSource ? IUuidValueSource : + TYPE extends ILocalDateTimeValueSource ? ILocalDateTimeValueSource : + TYPE extends ILocalDateValueSource ? ILocalDateValueSource : + TYPE extends ILocalTimeValueSource ? ILocalTimeValueSource : + TYPE extends ICustomIntValueSource ? ICustomIntValueSource : + TYPE extends ICustomDoubleValueSource ? ICustomDoubleValueSource : + TYPE extends ICustomUuidValueSource ? ICustomUuidValueSource : + TYPE extends ICustomLocalDateTimeValueSource ? ICustomLocalDateTimeValueSource : + TYPE extends ICustomLocalDateValueSource ? ICustomLocalDateValueSource : + TYPE extends ICustomLocalTimeValueSource ? ICustomLocalTimeValueSource : + TYPE extends IComparableValueSource ? IComparableValueSource : + TYPE extends IEqualableValueSource ? IEqualableValueSource : + TYPE extends INullableValueSource ? INullableValueSource : + TYPE extends IAggregatedArrayValueSource ? IAggregatedArrayValueSource : + IValueSource ): never -export type RemapIValueSourceTypeWithOptionalType, TYPE, OPTIONAL_TYPE extends OptionalType> = +export type RemapIValueSourceTypeWithOptionalType = TYPE extends IValueSource ? ( - TYPE extends IBooleanValueSource ? IBooleanValueSource : - TYPE extends IBigintValueSource ? IBigintValueSource : - TYPE extends INumberValueSource ? INumberValueSource : - TYPE extends IStringValueSource ? IStringValueSource : - TYPE extends IUuidValueSource ? IUuidValueSource : - TYPE extends ILocalDateTimeValueSource ? ILocalDateTimeValueSource : - TYPE extends ILocalDateValueSource ? ILocalDateValueSource : - TYPE extends ILocalTimeValueSource ? ILocalTimeValueSource : - TYPE extends ICustomIntValueSource ? ICustomIntValueSource : - TYPE extends ICustomDoubleValueSource ? ICustomDoubleValueSource : - TYPE extends ICustomUuidValueSource ? ICustomUuidValueSource : - TYPE extends ICustomLocalDateTimeValueSource ? ICustomLocalDateTimeValueSource : - TYPE extends ICustomLocalDateValueSource ? ICustomLocalDateValueSource : - TYPE extends ICustomLocalTimeValueSource ? ICustomLocalTimeValueSource : - TYPE extends IComparableValueSource ? IComparableValueSource : - TYPE extends IEqualableValueSource ? IEqualableValueSource : - TYPE extends INullableValueSource ? INullableValueSource : - TYPE extends IAggregatedArrayValueSource ? IAggregatedArrayValueSource : - IValueSource + TYPE extends IBooleanValueSource ? IBooleanValueSource : + TYPE extends IBigintValueSource ? IBigintValueSource : + TYPE extends INumberValueSource ? INumberValueSource : + TYPE extends IStringValueSource ? IStringValueSource : + TYPE extends IUuidValueSource ? IUuidValueSource : + TYPE extends ILocalDateTimeValueSource ? ILocalDateTimeValueSource : + TYPE extends ILocalDateValueSource ? ILocalDateValueSource : + TYPE extends ILocalTimeValueSource ? ILocalTimeValueSource : + TYPE extends ICustomIntValueSource ? ICustomIntValueSource : + TYPE extends ICustomDoubleValueSource ? ICustomDoubleValueSource : + TYPE extends ICustomUuidValueSource ? ICustomUuidValueSource : + TYPE extends ICustomLocalDateTimeValueSource ? ICustomLocalDateTimeValueSource : + TYPE extends ICustomLocalDateValueSource ? ICustomLocalDateValueSource : + TYPE extends ICustomLocalTimeValueSource ? ICustomLocalTimeValueSource : + TYPE extends IComparableValueSource ? IComparableValueSource : + TYPE extends IEqualableValueSource ? IEqualableValueSource : + TYPE extends INullableValueSource ? INullableValueSource : + TYPE extends IAggregatedArrayValueSource ? IAggregatedArrayValueSource : + IValueSource ): never @@ -1112,7 +1097,7 @@ export class Argument = ARG extends Argument ? T | OptionalValueType : never -export type MapArgumentToValueSource, ARG> = +export type MapArgumentToValueSource = ARG extends Argument ? ( - TYPE extends 'boolean' ? BooleanValueSource : - TYPE extends 'int' ? NumberValueSource : - TYPE extends 'double' ? NumberValueSource : - TYPE extends 'bigint' ? BigintValueSource : - TYPE extends 'string' ? StringValueSource : - TYPE extends 'uuid' ? UuidValueSource : - TYPE extends 'localDateTime' ? LocalDateTimeValueSource : - TYPE extends 'localDate' ? LocalDateValueSource : - TYPE extends 'localTime' ? LocalTimeValueSource : - TYPE extends 'customInt' ? CustomIntValueSource : - TYPE extends 'customDouble' ? CustomDoubleValueSource : - TYPE extends 'customUuid' ? CustomUuidValueSource : - TYPE extends 'customLocalDateTime' ? CustomLocalDateTimeValueSource : - TYPE extends 'customLocalDate' ? CustomLocalDateValueSource : - TYPE extends 'customLocalTime' ? CustomLocalTimeValueSource : - TYPE extends 'customComparable' ? ComparableValueSource : - TYPE extends 'enum' ? EqualableValueSource : - TYPE extends 'custom' ? EqualableValueSource : + TYPE extends 'boolean' ? BooleanValueSource : + TYPE extends 'int' ? NumberValueSource : + TYPE extends 'double' ? NumberValueSource : + TYPE extends 'bigint' ? BigintValueSource : + TYPE extends 'string' ? StringValueSource : + TYPE extends 'uuid' ? UuidValueSource : + TYPE extends 'localDateTime' ? LocalDateTimeValueSource : + TYPE extends 'localDate' ? LocalDateValueSource : + TYPE extends 'localTime' ? LocalTimeValueSource : + TYPE extends 'customInt' ? CustomIntValueSource : + TYPE extends 'customDouble' ? CustomDoubleValueSource : + TYPE extends 'customUuid' ? CustomUuidValueSource : + TYPE extends 'customLocalDateTime' ? CustomLocalDateTimeValueSource : + TYPE extends 'customLocalDate' ? CustomLocalDateValueSource : + TYPE extends 'customLocalTime' ? CustomLocalTimeValueSource : + TYPE extends 'customComparable' ? ComparableValueSource : + TYPE extends 'enum' ? EqualableValueSource : + TYPE extends 'custom' ? EqualableValueSource : never ): never -export type MapArgumentToIValueSource, ARG> = +export type MapArgumentToIValueSource = ARG extends Argument ? ( - TYPE extends 'boolean' ? IBooleanValueSource : - TYPE extends 'int' ? INumberValueSource : - TYPE extends 'double' ? INumberValueSource : - TYPE extends 'bigint' ? IBigintValueSource : - TYPE extends 'string' ? IStringValueSource : - TYPE extends 'uuid' ? IUuidValueSource : - TYPE extends 'localDateTime' ? ILocalDateTimeValueSource : - TYPE extends 'localDate' ? ILocalDateValueSource : - TYPE extends 'localTime' ? ILocalTimeValueSource : - TYPE extends 'customInt' ? CustomIntValueSource : - TYPE extends 'customDouble' ? ICustomDoubleValueSource : - TYPE extends 'customUuid' ? ICustomUuidValueSource : - TYPE extends 'customLocalDateTime' ? ICustomLocalDateTimeValueSource : - TYPE extends 'customLocalDate' ? ICustomLocalDateValueSource : - TYPE extends 'customLocalTime' ? ICustomLocalTimeValueSource : - TYPE extends 'customComparable' ? IComparableValueSource : - TYPE extends 'enum' ? IEqualableValueSource : - TYPE extends 'custom' ? IEqualableValueSource : + TYPE extends 'boolean' ? IBooleanValueSource : + TYPE extends 'int' ? INumberValueSource : + TYPE extends 'double' ? INumberValueSource : + TYPE extends 'bigint' ? IBigintValueSource : + TYPE extends 'string' ? IStringValueSource : + TYPE extends 'uuid' ? IUuidValueSource : + TYPE extends 'localDateTime' ? ILocalDateTimeValueSource : + TYPE extends 'localDate' ? ILocalDateValueSource : + TYPE extends 'localTime' ? ILocalTimeValueSource : + TYPE extends 'customInt' ? CustomIntValueSource : + TYPE extends 'customDouble' ? ICustomDoubleValueSource : + TYPE extends 'customUuid' ? ICustomUuidValueSource : + TYPE extends 'customLocalDateTime' ? ICustomLocalDateTimeValueSource : + TYPE extends 'customLocalDate' ? ICustomLocalDateValueSource : + TYPE extends 'customLocalTime' ? ICustomLocalTimeValueSource : + TYPE extends 'customComparable' ? IComparableValueSource : + TYPE extends 'enum' ? IEqualableValueSource : + TYPE extends 'custom' ? IEqualableValueSource : never ): never -export type MapArgumentToIValueSourceAsAnyOptionalType, ARG> = +export type MapArgumentToIValueSourceAsAnyOptionalType = ARG extends Argument ? ( - TYPE extends 'boolean' ? IBooleanValueSource : - TYPE extends 'int' ? INumberValueSource : - TYPE extends 'double' ? INumberValueSource : - TYPE extends 'bigint' ? IBigintValueSource : - TYPE extends 'string' ? IStringValueSource : - TYPE extends 'uuid' ? IUuidValueSource : - TYPE extends 'localDateTime' ? ILocalDateTimeValueSource : - TYPE extends 'localDate' ? ILocalDateValueSource : - TYPE extends 'localTime' ? ILocalTimeValueSource : - TYPE extends 'customInt' ? CustomIntValueSource : - TYPE extends 'customDouble' ? ICustomDoubleValueSource : - TYPE extends 'customUuid' ? ICustomUuidValueSource : - TYPE extends 'customLocalDateTime' ? ICustomLocalDateTimeValueSource : - TYPE extends 'customLocalDate' ? ICustomLocalDateValueSource : - TYPE extends 'customLocalTime' ? ICustomLocalTimeValueSource : - TYPE extends 'customComparable' ? IComparableValueSource : - TYPE extends 'enum' ? IEqualableValueSource : - TYPE extends 'custom' ? IEqualableValueSource : + TYPE extends 'boolean' ? IBooleanValueSource : + TYPE extends 'int' ? INumberValueSource : + TYPE extends 'double' ? INumberValueSource : + TYPE extends 'bigint' ? IBigintValueSource : + TYPE extends 'string' ? IStringValueSource : + TYPE extends 'uuid' ? IUuidValueSource : + TYPE extends 'localDateTime' ? ILocalDateTimeValueSource : + TYPE extends 'localDate' ? ILocalDateValueSource : + TYPE extends 'localTime' ? ILocalTimeValueSource : + TYPE extends 'customInt' ? CustomIntValueSource : + TYPE extends 'customDouble' ? ICustomDoubleValueSource : + TYPE extends 'customUuid' ? ICustomUuidValueSource : + TYPE extends 'customLocalDateTime' ? ICustomLocalDateTimeValueSource : + TYPE extends 'customLocalDate' ? ICustomLocalDateValueSource : + TYPE extends 'customLocalTime' ? ICustomLocalTimeValueSource : + TYPE extends 'customComparable' ? IComparableValueSource : + TYPE extends 'enum' ? IEqualableValueSource : + TYPE extends 'custom' ? IEqualableValueSource : never ): never -export type ArgForFn, ARG> = +export type ArgForFn = ARG extends Argument ? ( MODE extends 'value' ? never : ( 'required' extends OPTIONAL_TYPE - ? MapArgumentToIValueSource - : MapArgumentToIValueSourceAsAnyOptionalType + ? MapArgumentToIValueSource + : MapArgumentToIValueSourceAsAnyOptionalType ) ): never @@ -1217,15 +1202,15 @@ export type RequiredArgumentWhenValueMode = MODE extends 'value' ? Argument : ARG ): never -export type ArgForBuilderIfValue, ARG> = - MapArgumentToValueSource> +export type ArgForBuilderIfValue = + MapArgumentToValueSource> -export type RemapValueSourceTypeIfValue, TYPE> = +export type RemapValueSourceTypeIfValue = TYPE extends IIfValueSource ? ( - IfValueSource - ) : RemapValueSourceType + IfValueSource + ) : RemapValueSourceType -export function asAlwaysIfValueSource>(valueSource: VS): AlwaysIfValueSource { +export function asAlwaysIfValueSource>(valueSource: VS): AlwaysIfValueSource { return valueSource as any } diff --git a/src/extras/types.ts b/src/extras/types.ts index 2cd385ca..97b79154 100644 --- a/src/extras/types.ts +++ b/src/extras/types.ts @@ -1,11 +1,12 @@ -import type { InsertShape, MandatoryInsertSets, MandatoryInsertValues, OnConflictUpdateSets, OnConflictUpdateValues } from "../expressions/insert" -import type { UpdateSets, UpdateValues, UpdateShape } from "../expressions/update" -import type { ITable, ITableOrView, OuterJoinSource, TABLE_OR_VIEW_ALIAS } from "../utils/ITableOrView" +import type { InsertShapeContent, MandatoryInsertSetsContent, MandatoryInsertValues, OnConflictUpdateSetsContent, OnConflictUpdateValues } from "../expressions/insert" +import type { UpdateValues, UpdateShape, UpdateSetsContent } from "../expressions/update" +import type { ForUseInLeftJoin, HasSource, ITable, ITableOrView } from "../utils/ITableOrView" import type { ResultObjectValues, ResultObjectValuesProjectedAsNullable } from "../utils/resultUtils" import type { Column, ComputedColumn, PrimaryKeyAutogeneratedColumn, PrimaryKeyColumn } from "../utils/Column" import type { AnyValueSource } from "../expressions/values" -import type { OuterJoinSourceOf, ResolveShape, TableOrViewWithRef } from "../utils/tableOrViewUtils" -import type { outerJoinAlias, tableOrViewRef } from "../utils/symbols" +import type { FromRef, ResolveShape } from "../utils/tableOrViewUtils" +import type { source } from "../utils/symbols" +import type { NAlias, NAsLeftJoin, NMaybyAliased, NNoTableOrViewRequiredFrom, NSource } from "../utils/sourceName" type Selectable = { [key in string]?: AnyValueSource | Selectable @@ -38,38 +39,32 @@ export type SelectedValuesProjectedAsNullable
= }> export type InsertableRow
= TABLE extends ITable - ? MakeTypeVisible> - : MakeTypeVisible, undefined>> -export type InsertableValues
= TABLE extends ITable - ? MakeTypeVisible> - : MakeTypeVisible, undefined>> + ? MakeTypeVisible, undefined>> + : MakeTypeVisible>, undefined>> +export type InsertableValues
= MakeTypeVisible> export type UpdatableOnInsertConflictRow
= TABLE extends ITable - ? MakeTypeVisible> - : MakeTypeVisible, undefined>> -export type UpdatableOnInsertConflictValues
= TABLE extends ITable - ? MakeTypeVisible> - : MakeTypeVisible, undefined>> - -export type InsertableRowShapedAs
, SHAPE extends InsertShape
> = - MakeTypeVisible, ResolveShape>> -export type InsertableValuesShapedAs
, SHAPE extends InsertShape
> = - MakeTypeVisible>> - -export type UpdatableOnInsertConflictRowShapedAs
, SHAPE extends InsertShape
> = - MakeTypeVisible, ResolveShape>> -export type UpdatableOnInsertConflictValuesShapedAs
, SHAPE extends InsertShape
> = + ? MakeTypeVisible, undefined>> + : MakeTypeVisible>, undefined>> +export type UpdatableOnInsertConflictValues
= MakeTypeVisible> + +export type InsertableRowShapedAs
, SHAPE extends InsertShapeContent
> = + MakeTypeVisible, ResolveShape>> +export type InsertableValuesShapedAs
, SHAPE extends InsertShapeContent
> = + MakeTypeVisible>> + +export type UpdatableOnInsertConflictRowShapedAs
, SHAPE extends InsertShapeContent
> = + MakeTypeVisible>> +export type UpdatableOnInsertConflictValuesShapedAs
, SHAPE extends InsertShapeContent
> = MakeTypeVisible>> export type UpdatableRow
= TABLE extends ITable - ? MakeTypeVisible> - : MakeTypeVisible, TABLE & ITable, undefined>> -export type UpdatableValues
= TABLE extends ITable - ? MakeTypeVisible> - : MakeTypeVisible, undefined>> + ? MakeTypeVisible, undefined>> + : MakeTypeVisible>, undefined>> +export type UpdatableValues
= MakeTypeVisible> export type UpdatableRowShapedAs
, SHAPE extends UpdateShape> = - MakeTypeVisible, ITable, ResolveShape>> + MakeTypeVisible, ResolveShape>> export type UpdatableValuesShapedAs
, SHAPE extends UpdateShape> = MakeTypeVisible>> @@ -86,19 +81,23 @@ export type IdColumnKeys = { [K in keyof O]-?: K extends string ? (O[K] exten export type AutogeneratedIdColumnKeys = { [K in keyof O]-?: K extends string ? (O[K] extends PrimaryKeyAutogeneratedColumn ? K : never) : never }[keyof O] // Discard non string keys, if not TS got wrong output when extractColumnsFrom is used with the result of fromRef export type ProvidedIdColumnKeys = { [K in keyof O]-?: K extends string ? (O[K] extends PrimaryKeyColumn ? (O[K] extends PrimaryKeyAutogeneratedColumn ? never : K) : never) : never }[keyof O] // Discard non string keys, if not TS got wrong output when extractColumnsFrom is used with the result of fromRef -export type TableOrViewOf, ALIAS extends string = ''> = +export type TableOrViewOf, ALIAS extends string = ''> = ALIAS extends false /*ALIAS is any*/ - ? ITableOrView> + ? ITableOrView> : ALIAS extends '' - ? ITableOrView - : ITableOrView> + ? ITableOrView> + : ITableOrView> -export type TableOrViewLeftJoinOf, ALIAS extends string = ''> = OuterJoinSource +export type TableOrViewLeftJoinOf, ALIAS extends string = ''> = + ALIAS extends false /*ALIAS is any*/ + ? ForUseInLeftJoin>> + : ALIAS extends '' + ? ForUseInLeftJoin>> + : ForUseInLeftJoin, ALIAS>> -export function fromRef, REF extends ITableOrView>(tableOrView: TABLE_OR_VIEW | (new (...params: any[]) => TABLE_OR_VIEW), ref: REF): TableOrViewWithRef -export function fromRef, REF extends ITableOrView>>(tableOrView: TABLE_OR_VIEW | (new (...params: any[]) => TABLE_OR_VIEW), ref: REF): TableOrViewWithRef -export function fromRef, REF extends ITableOrView>>(tableOrView: TABLE_OR_VIEW | (new (...params: any[]) => TABLE_OR_VIEW), ref: REF): TableOrViewWithRef -export function fromRef, REF extends OuterJoinSource>(tableOrView: TABLE_OR_VIEW | (new (...params: any[]) => TABLE_OR_VIEW), ref: REF): OuterJoinSourceOf -export function fromRef(_tableOrView: any, ref: any): any { +export function fromRef, REF extends ITableOrView | ForUseInLeftJoin>(_tableOrView: T | (new (...params: any[]) => T), ref: REF): FromRef { return ref as any -} \ No newline at end of file +} + +type InferSourceFrom = ({ [K in keyof T]-?: T[K] extends AnyValueSource & HasSource ? SOURCE : never })[keyof T] +type AllowsNoTableOrViewRequired = SOURCE | NNoTableOrViewRequiredFrom \ No newline at end of file diff --git a/src/internal/ColumnImpl.ts b/src/internal/ColumnImpl.ts index 5ddc8ae0..d02d9c2b 100644 --- a/src/internal/ColumnImpl.ts +++ b/src/internal/ColumnImpl.ts @@ -1,4 +1,4 @@ -import { HasIsValue, ITableOrView, __getTableOrViewPrivate, __registerTableOrView } from "../utils/ITableOrView" +import { AnyTableOrView, HasIsValue, __getTableOrViewPrivate, __registerTableOrView } from "../utils/ITableOrView" import type { Column, ColumnWithDefaultValue, ComputedColumn, OptionalColumn, PrimaryKeyAutogeneratedColumn, PrimaryKeyColumn, __ColumnPrivate } from "../utils/Column" import type { TypeAdapter } from "../TypeAdapter" import type { QueryColumns, SqlBuilder, ToSql } from "../sqlBuilders/SqlBuilder" @@ -12,14 +12,14 @@ export class ColumnImpl extends ValueSourceImpl implements Column, __ColumnPriva [type]!: 'column' [isColumnObject]: true = true __name: string - __tableOrView: ITableOrView + __tableOrView: AnyTableOrView __hasDefault: boolean = false __isPrimaryKey: boolean = false __isAutogeneratedPrimaryKey: boolean = false __isComputed = false __sequenceName?: string - constructor(table: ITableOrView, name: string, valueType: ValueType, valueTypeName: string, typeAdapter: TypeAdapter | undefined) { + constructor(table: AnyTableOrView, name: string, valueType: ValueType, valueTypeName: string, typeAdapter: TypeAdapter | undefined) { super(valueType, valueTypeName, 'required', typeAdapter) this.__name = name this.__tableOrView = table @@ -84,20 +84,20 @@ export class ColumnImpl extends ValueSourceImpl implements Column, __ColumnPriva return (this as this & OptionalColumn & ComputedColumn) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { __getTableOrViewPrivate(this.__tableOrView).__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(_sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(_sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { if (onlyForTablesOrViews.has(this.__tableOrView)) { requiredColumns.add(this) } } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getTableOrViewPrivate(this.__tableOrView).__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getTableOrViewPrivate(this.__tableOrView).__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -105,7 +105,7 @@ export class ColumnImpl extends ValueSourceImpl implements Column, __ColumnPriva } } -export function createColumnsFrom(sqlBuilder: HasIsValue, columns: QueryColumns, target: QueryColumns, table: ITableOrView) { +export function createColumnsFrom(sqlBuilder: HasIsValue, columns: QueryColumns, target: QueryColumns, table: AnyTableOrView) { for (const property in columns) { const column = columns[property]! if (isValueSource(column)) { @@ -135,7 +135,7 @@ export function createColumnsFrom(sqlBuilder: HasIsValue, columns: QueryColumns, } } -export function createColumnsFromInnerObject(sqlBuilder: HasIsValue, columns: QueryColumns, target: QueryColumns, table: ITableOrView, prefix: string) { +export function createColumnsFromInnerObject(sqlBuilder: HasIsValue, columns: QueryColumns, target: QueryColumns, table: AnyTableOrView, prefix: string) { const rule = getInnerObjetRuleToApply(sqlBuilder, columns) for (const property in columns) { @@ -221,7 +221,7 @@ export function getInnerObjetRuleToApply(sqlBuilder: HasIsValue, columns: QueryC } if (contaisOriginallyRequired) { - let firstRequiredTables = new Set>() + let firstRequiredTables = new Set() let alwaysSameRequiredTablesSize : undefined | boolean = undefined for (const property in columns) { @@ -236,7 +236,7 @@ export function getInnerObjetRuleToApply(sqlBuilder: HasIsValue, columns: QueryC columnPrivate.__registerTableOrView(sqlBuilder, firstRequiredTables) alwaysSameRequiredTablesSize = true } else if (alwaysSameRequiredTablesSize) { - let valueSourceRequiredTables = new Set>() + let valueSourceRequiredTables = new Set() columnPrivate.__registerTableOrView(sqlBuilder, valueSourceRequiredTables) const initialSize = firstRequiredTables.size if (initialSize !== valueSourceRequiredTables.size) { diff --git a/src/internal/RawFragmentImpl.ts b/src/internal/RawFragmentImpl.ts index 9203005e..1a3fa230 100644 --- a/src/internal/RawFragmentImpl.ts +++ b/src/internal/RawFragmentImpl.ts @@ -1,18 +1,18 @@ import { AnyValueSource, IExecutableDeleteQuery, IExecutableInsertQuery, IExecutableSelectQuery, IExecutableUpdateQuery } from "../expressions/values" import { SqlBuilder, ToSql } from "../sqlBuilders/SqlBuilder" import { Column } from "../utils/Column" -import { HasAddWiths, HasIsValue, ITableOrView, IWithView, __addWiths, __getOldValues, __getValuesForInsert, __isAllowed, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" -import { RawFragment } from "../utils/RawFragment" -import { database, rawFragment } from "../utils/symbols" +import { AnyTableOrView, HasAddWiths, HasIsValue, IWithView, __addWiths, __getOldValues, __getValuesForInsert, __isAllowed, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" +import type { RawFragment } from "../utils/RawFragment" +import { source, type } from "../utils/symbols" export class RawFragmentImpl implements RawFragment, HasAddWiths, ToSql { - [rawFragment]!: "rawFragment" - [database]: any + [type]!: "rawFragment" + [source]: any __template: TemplateStringsArray - __params: Array | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery> + __params: Array | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery> - constructor(template: TemplateStringsArray, params: Array | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery>) { + constructor(template: TemplateStringsArray, params: Array | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery>) { this.__template = template this.__params = params } @@ -29,19 +29,19 @@ export class RawFragmentImpl implements RawFragment, HasAddWiths, ToSql { __addWiths(params[i], sqlBuilder, withs) } } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { const params = this.__params for (let i = 0, length = params.length; i < length; i++) { __registerTableOrView(params[i], sqlBuilder, requiredTablesOrViews) } } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { const params = this.__params for (let i = 0, length = params.length; i < length; i++) { __registerRequiredColumn(params[i], sqlBuilder, requiredColumns, onlyForTablesOrViews) } } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { const params = this.__params for (let i = 0, length = params.length; i < length; i++) { const result = __getOldValues(params[i], sqlBuilder) @@ -51,7 +51,7 @@ export class RawFragmentImpl implements RawFragment, HasAddWiths, ToSql { } return undefined } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { const params = this.__params for (let i = 0, length = params.length; i < length; i++) { const result = __getValuesForInsert(params[i], sqlBuilder) diff --git a/src/internal/ValueSourceImpl.ts b/src/internal/ValueSourceImpl.ts index 0082f9c2..6029a182 100644 --- a/src/internal/ValueSourceImpl.ts +++ b/src/internal/ValueSourceImpl.ts @@ -1,8 +1,8 @@ import { SqlBuilder, SqlOperationStatic0, SqlOperationStatic1, SqlOperation1, SqlOperation2, ToSql, HasOperation, SqlSequenceOperation, SqlFragmentOperation, AggregateFunctions0, AggregateFunctions1, AggregateFunctions1or2, SqlFunction0, SqlComparator0, SelectData, hasToSql } from "../sqlBuilders/SqlBuilder" import { BooleanValueSource, NumberValueSource, StringValueSource, IValueSource, NullableValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, __ValueSourcePrivate, IfValueSource, BigintValueSource, isValueSource, AlwaysIfValueSource, IAnyBooleanValueSource, AnyValueSource, ValueSource, OptionalType, IAggregatedArrayValueSource, AggregatedArrayValueSource, __AggregatedArrayColumns, __AggregatedArrayMode, UuidValueSource, AggregatedArrayValueSourceProjectableAsNullable, ValueType, CustomIntValueSource, CustomDoubleValueSource, CustomUuidValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource, CustomLocalDateTimeValueSource } from "../expressions/values" import { CustomBooleanTypeAdapter, TypeAdapter } from "../TypeAdapter" -import { HasAddWiths, HasIsValue, ITableOrView, IWithView, __getOldValues, __getTableOrViewPrivate, __getValuesForInsert, __isAllowed, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" -import { database, tableOrView, valueSourceType, valueType as valueType_, optionalType as optionalType_ , booleanValueSourceType, comparableValueSourceType, localDateTimeValueSourceType, localDateValueSourceType, equalableValueSourceType, nullableValueSourceType, numberValueSourceType, stringValueSourceType, localTimeValueSourceType, ifValueSourceType, bigintValueSourceType, valueSourceTypeName, anyBooleanValueSourceType, isValueSourceObject, aggregatedArrayValueSourceType, isSelectQueryObject, uuidValueSourceType, customIntValueSourceType, customDoubleValueSourceType, customUuidValueSourceType, customLocalDateValueSourceType, customLocalTimeValueSourceType, customLocalDateTimeValueSourceType } from "../utils/symbols" +import { AnyTableOrView, HasAddWiths, HasIsValue, IWithView, __getOldValues, __getTableOrViewPrivate, __getValuesForInsert, __isAllowed, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" +import { valueType as valueType_, optionalType as optionalType_ , booleanValueSource, comparableValueSource, localDateTimeValueSource, localDateValueSource, equalableValueSource, nullableValueSource, numberValueSource, stringValueSource, localTimeValueSource, ifValueSource, bigintValueSource, typeName, anyBooleanValueSource, isValueSourceObject, aggregatedArrayValueSource, isSelectQueryObject, uuidValueSource, customIntValueSource, customDoubleValueSource, customUuidValueSource, customLocalDateValueSource, customLocalTimeValueSource, customLocalDateTimeValueSource, source } from "../utils/symbols" import { __addWiths } from "../utils/ITableOrView" import { __getValueSourcePrivate } from "../expressions/values" import { ProxyTypeAdapter } from "./ProxyTypeAdapter" @@ -10,31 +10,29 @@ import { Column } from "../utils/Column" import type { FragmentQueryBuilder } from "../queryBuilders/FragmentQueryBuilder" export abstract class ValueSourceImpl implements IValueSource, NullableValueSource, BooleanValueSource, NumberValueSource, BigintValueSource, CustomIntValueSource, CustomDoubleValueSource, StringValueSource, LocalDateValueSource, LocalTimeValueSource, LocalDateTimeValueSource, CustomLocalDateValueSource, CustomLocalTimeValueSource, CustomLocalDateTimeValueSource, IfValueSource, AlwaysIfValueSource, IAnyBooleanValueSource, IAggregatedArrayValueSource, AggregatedArrayValueSource, AggregatedArrayValueSourceProjectableAsNullable, UuidValueSource, CustomUuidValueSource, ToSql, __ValueSourcePrivate { - [valueSourceType]!: 'ValueSource' - [nullableValueSourceType]!: 'NullableValueSource' - [equalableValueSourceType]!: 'EqualableValueSource' - [comparableValueSourceType]!: 'ComparableValueSource' - [booleanValueSourceType]!: 'BooleanValueSource' - [ifValueSourceType]!: 'IfValueSource' - [numberValueSourceType]!: 'NumberValueSource' - [bigintValueSourceType]!: 'BigintValueSource' - [customIntValueSourceType]!: 'CustomIntValueSource' - [customDoubleValueSourceType]!: 'CustomDoubleValueSource' - [stringValueSourceType]!: 'StringValueSource' - [localDateValueSourceType]!: 'LocalDateValueSource' - [localTimeValueSourceType]!: 'LocalTimeValueSource' - [localDateTimeValueSourceType]!: 'LocalDateTimeValueSource' - [customLocalDateValueSourceType]!: 'CustomLocalDateValueSource' - [customLocalTimeValueSourceType]!: 'CustomLocalTimeValueSource' - [customLocalDateTimeValueSourceType]!: 'CustomLocalDateTimeValueSource' - [anyBooleanValueSourceType]!: 'AnyBooleanValueSource' - [aggregatedArrayValueSourceType]!: 'AggregatedArrayValueSource' - [uuidValueSourceType]!: 'UuidValueSource' - [customUuidValueSourceType]!: 'CustomUuidValueSource' - [valueSourceTypeName]!: any - - [database]: any - [tableOrView]: any + [nullableValueSource]!: 'NullableValueSource' + [equalableValueSource]!: 'EqualableValueSource' + [comparableValueSource]!: 'ComparableValueSource' + [booleanValueSource]!: 'BooleanValueSource' + [ifValueSource]!: 'IfValueSource' + [numberValueSource]!: 'NumberValueSource' + [bigintValueSource]!: 'BigintValueSource' + [customIntValueSource]!: 'CustomIntValueSource' + [customDoubleValueSource]!: 'CustomDoubleValueSource' + [stringValueSource]!: 'StringValueSource' + [localDateValueSource]!: 'LocalDateValueSource' + [localTimeValueSource]!: 'LocalTimeValueSource' + [localDateTimeValueSource]!: 'LocalDateTimeValueSource' + [customLocalDateValueSource]!: 'CustomLocalDateValueSource' + [customLocalTimeValueSource]!: 'CustomLocalTimeValueSource' + [customLocalDateTimeValueSource]!: 'CustomLocalDateTimeValueSource' + [anyBooleanValueSource]!: 'AnyBooleanValueSource' + [aggregatedArrayValueSource]!: 'AggregatedArrayValueSource' + [uuidValueSource]!: 'UuidValueSource' + [customUuidValueSource]!: 'CustomUuidValueSource' + [typeName]: any + [source]: any + [valueType_]: any [optionalType_]: any @@ -68,16 +66,16 @@ export abstract class ValueSourceImpl implements IValueSource>): void { // Do nothing } - __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set>): void { + __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set): void { // Do nothing } - __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set): void { // Do nothing } - __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } - __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } __isAllowed(_sqlBuilder: HasIsValue): boolean { @@ -764,16 +762,16 @@ export class BooleanValueWhenNoValueValueSource extends ValueSourceImpl implemen __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { this.__valueSource.__addWiths(sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -812,18 +810,18 @@ export class ValueWhenNoValueValueSource extends ValueSourceImpl { this.__valueSource.__addWiths(sqlBuilder, withs) this.__valueWhenNoValue.__addWiths(sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) this.__valueWhenNoValue.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) this.__valueWhenNoValue.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) || this.__valueWhenNoValue.__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) || this.__valueWhenNoValue.__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -846,16 +844,16 @@ export class SqlOperationStatic1ValueSource extends ValueSourceImpl implements H __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getValuesForInsert(this.__value, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -887,16 +885,16 @@ export class SqlOperationConstValueSource extends ValueSourceImpl implements Has __addWiths(sqlBuilder: HasIsValue,withs: Array>): void { __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getValuesForInsert(this.__value, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -919,16 +917,16 @@ export class SqlOperation0ValueSource extends ValueSourceImpl implements HasOper __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { this.__valueSource.__addWiths(sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -951,16 +949,16 @@ export class SqlOperationIsNullValueSource extends ValueSourceImpl implements Ha __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { this.__valueSource.__addWiths(sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -986,18 +984,18 @@ export class SqlOperation1ValueSource extends ValueSourceImpl implements HasOper this.__valueSource.__addWiths(sqlBuilder, withs) __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) || __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) || __getValuesForInsert(this.__value, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1034,7 +1032,7 @@ export class SqlOperationInValueSource extends ValueSourceImpl implements HasOpe } } } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) const values = this.__value if (Array.isArray(values)) { @@ -1045,7 +1043,7 @@ export class SqlOperationInValueSource extends ValueSourceImpl implements HasOpe __registerTableOrView(values, sqlBuilder, requiredTablesOrViews) } } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) const values = this.__value if (Array.isArray(values)) { @@ -1056,7 +1054,7 @@ export class SqlOperationInValueSource extends ValueSourceImpl implements HasOpe __registerRequiredColumn(values, sqlBuilder, requiredColumns, onlyForTablesOrViews) } } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { let result = this.__valueSource.__getOldValues(sqlBuilder) if (result) { return result @@ -1074,7 +1072,7 @@ export class SqlOperationInValueSource extends ValueSourceImpl implements HasOpe } return undefined } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { let result = this.__valueSource.__getValuesForInsert(sqlBuilder) if (result) { return result @@ -1130,18 +1128,18 @@ export class SqlOperationValueWhenNullValueSource extends ValueSourceImpl implem this.__valueSource.__addWiths(sqlBuilder, withs) __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) || __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) || __getValuesForInsert(this.__value, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1167,18 +1165,18 @@ export class SqlOperation1NotOptionalValueSource extends ValueSourceImpl impleme this.__valueSource.__addWiths(sqlBuilder, withs) __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) || __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) || __getValuesForInsert(this.__value, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1210,27 +1208,27 @@ export class SqlOperation1ValueSourceIfValueOrNoop extends ValueSourceImpl imple this.__valueSource.__addWiths(sqlBuilder, withs) __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { if (!sqlBuilder._isValue(this.__value)) { return } this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { if (!sqlBuilder._isValue(this.__value)) { return } this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { if (!sqlBuilder._isValue(this.__value)) { return undefined } return this.__valueSource.__getOldValues(sqlBuilder) || __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { if (!sqlBuilder._isValue(this.__value)) { return undefined } @@ -1275,7 +1273,7 @@ export class SqlOperationInValueSourceIfValueOrNoop extends ValueSourceImpl impl __addWiths(values, sqlBuilder, withs) } } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { if (!sqlBuilder._isValue(this.__value)) { return } @@ -1289,7 +1287,7 @@ export class SqlOperationInValueSourceIfValueOrNoop extends ValueSourceImpl impl __registerTableOrView(values, sqlBuilder, requiredTablesOrViews) } } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { if (!sqlBuilder._isValue(this.__value)) { return } @@ -1303,7 +1301,7 @@ export class SqlOperationInValueSourceIfValueOrNoop extends ValueSourceImpl impl __registerRequiredColumn(values, sqlBuilder, requiredColumns, onlyForTablesOrViews) } } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { if (!sqlBuilder._isValue(this.__value)) { return undefined } @@ -1324,7 +1322,7 @@ export class SqlOperationInValueSourceIfValueOrNoop extends ValueSourceImpl impl } return undefined } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { if (!sqlBuilder._isValue(this.__value)) { return undefined } @@ -1400,18 +1398,18 @@ export class SqlOperation1ValueSourceIfValueOrIgnore extends ValueSourceImpl imp this.__valueSource.__addWiths(sqlBuilder, withs) __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) || __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) || __getValuesForInsert(this.__value, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1440,20 +1438,20 @@ export class SqlOperation2ValueSource extends ValueSourceImpl implements HasOper __addWiths(this.__value, sqlBuilder, withs) __addWiths(this.__value2, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value2, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value2, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) || __getOldValues(this.__value, sqlBuilder) || __getOldValues(this.__value2, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) || __getValuesForInsert(this.__value, sqlBuilder) || __getValuesForInsert(this.__value2, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1488,20 +1486,20 @@ export class SqlOperation2ValueSourceIfValueOrIgnore extends ValueSourceImpl imp __addWiths(this.__value, sqlBuilder, withs) __addWiths(this.__value2, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) __registerTableOrView(this.__value2, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__value2, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) || __getOldValues(this.__value, sqlBuilder) || __getOldValues(this.__value2, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) || __getValuesForInsert(this.__value, sqlBuilder) || __getValuesForInsert(this.__value2, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1521,16 +1519,16 @@ export class NoopValueSource extends ValueSourceImpl { __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { this.__valueSource.__addWiths(sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1574,21 +1572,21 @@ export class FragmentValueSource extends ValueSourceImpl { value.__addWiths(sqlBuilder, withs) } } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { const sqlParams = this.__sqlParams for (let i = 0, length = sqlParams.length; i < length; i++) { const value = __getValueSourcePrivate(sqlParams[i]!) value.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { const sqlParams = this.__sqlParams for (let i = 0, length = sqlParams.length; i < length; i++) { const value = __getValueSourcePrivate(sqlParams[i]!) value.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { const sqlParams = this.__sqlParams for (let i = 0, length = sqlParams.length; i < length; i++) { const value = __getValueSourcePrivate(sqlParams[i]!) @@ -1599,7 +1597,7 @@ export class FragmentValueSource extends ValueSourceImpl { } return undefined } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { const sqlParams = this.__sqlParams for (let i = 0, length = sqlParams.length; i < length; i++) { const value = __getValueSourcePrivate(sqlParams[i]!) @@ -1655,16 +1653,16 @@ export class ValueSourceFromBuilder extends ValueSourceImpl { __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { this.__getBuilderOutputPrivate().__addWiths(sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__getBuilderOutputPrivate().__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__getBuilderOutputPrivate().__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__getBuilderOutputPrivate().__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__getBuilderOutputPrivate().__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1691,16 +1689,16 @@ export class AllowWhenValueSource extends ValueSourceImpl { __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { this.__valueSource.__addWiths(sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__valueSource.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__valueSource.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__valueSource.__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1752,16 +1750,16 @@ export class AggregateFunctions1ValueSource extends ValueSourceImpl implements H __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getValuesForInsert(this.__value, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1786,16 +1784,16 @@ export class AggregateFunctions1or2ValueSource extends ValueSourceImpl implement __addWiths(sqlBuilder: HasIsValue, withs: Array>): void { __addWiths(this.__value, sqlBuilder, withs) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { __registerTableOrView(this.__value, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { __registerRequiredColumn(this.__value, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getOldValues(this.__value, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return __getValuesForInsert(this.__value, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -1898,22 +1896,20 @@ function condition(valueSource: ValueSourceImpl): ValueSourceImpl { } export class TableOrViewRawFragmentValueSource implements ValueSource, __ValueSourcePrivate, ToSql { - [tableOrView]: any [valueType_]: any [optionalType_]: any - [valueSourceType]!: "ValueSource" - [database]: any - [valueSourceTypeName]: any + [source]: any + [typeName]: any [isValueSourceObject]: true = true __valueType: ValueType = '' __valueTypeName: string = '' __optionalType: OptionalType = 'required' __typeAdapter?: TypeAdapter | undefined - __tableOrView: ITableOrView + __tableOrView: AnyTableOrView __operation: '_rawFragmentTableName' | '_rawFragmentTableAlias' - constructor(_tableOrView: ITableOrView, operation: '_rawFragmentTableName' | '_rawFragmentTableAlias') { + constructor(_tableOrView: AnyTableOrView, operation: '_rawFragmentTableName' | '_rawFragmentTableAlias') { this.__tableOrView = _tableOrView this.__operation = operation } @@ -1941,16 +1937,16 @@ export class TableOrViewRawFragmentValueSource implements ValueSource[]): void { // Do nothing } - __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set>): void { + __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set): void { // Do nothing } - __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set): void { // Do nothing } - __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } - __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } __isAllowed(_sqlBuilder: HasIsValue): boolean { @@ -1967,7 +1963,7 @@ export class TableOrViewRawFragmentValueSource implements ValueSource, operation: '_rawFragmentTableName' | '_rawFragmentTableAlias') { + constructor(allowed: boolean, error: Error, _tableOrView: AnyTableOrView, operation: '_rawFragmentTableName' | '_rawFragmentTableAlias') { super(_tableOrView, operation) this.__error = error this.__allowed = allowed @@ -2005,16 +2001,16 @@ export class InlineSelectValueSource extends ValueSourceImpl implements HasOpera __addWiths(sqlBuilder: HasIsValue, withs: IWithView[]): void { __addInlineQueryWiths(sqlBuilder, withs, this.__selectData) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__selectData.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__selectData.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__selectData.__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__selectData.__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -2023,13 +2019,11 @@ export class InlineSelectValueSource extends ValueSourceImpl implements HasOpera } export class AggregateSelectValueSource implements ValueSource, IAggregatedArrayValueSource, AggregatedArrayValueSource, AggregatedArrayValueSourceProjectableAsNullable, __ValueSourcePrivate, ToSql { - [tableOrView]: any [valueType_]: any [optionalType_]: any - [valueSourceType]!: "ValueSource" - [database]: any - [valueSourceTypeName]: any - [aggregatedArrayValueSourceType]!: 'AggregatedArrayValueSource' + [source]: any + [typeName]: any + [aggregatedArrayValueSource]!: 'AggregatedArrayValueSource' [isValueSourceObject]: true = true __valueType: ValueType = 'aggregatedArray' @@ -2078,16 +2072,16 @@ export class AggregateSelectValueSource implements ValueSource[]): void { __addInlineQueryWiths(sqlBuilder, withs, this.__selectData) } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__selectData.__registerTableOrView(sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__selectData.__registerRequiredColumn(sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__selectData.__getOldValues(sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__selectData.__getValuesForInsert(sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { @@ -2146,13 +2140,11 @@ export class AllowWhenAggregateSelectValueSource extends AggregateSelectValueSou } export class NullAggregateSelectValueSource implements ValueSource, IAggregatedArrayValueSource, AggregatedArrayValueSource, AggregatedArrayValueSourceProjectableAsNullable, __ValueSourcePrivate, ToSql { - [tableOrView]: any [valueType_]: any [optionalType_]: any - [valueSourceType]!: "ValueSource" - [database]: any - [valueSourceTypeName]: any - [aggregatedArrayValueSourceType]!: 'AggregatedArrayValueSource' + [source]: any + [typeName]: any + [aggregatedArrayValueSource]!: 'AggregatedArrayValueSource' [isValueSourceObject]: true = true __valueType: ValueType = 'aggregatedArray' @@ -2199,14 +2191,14 @@ export class NullAggregateSelectValueSource implements ValueSource[]): void { } - __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set>): void { + __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set): void { } - __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set): void { } - __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } - __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } __isAllowed(_sqlBuilder: HasIsValue): boolean { @@ -2314,13 +2306,11 @@ function valueSourceInitializationForInlineSelect(selectData: SelectData, requir } export class AggregateValueAsArrayValueSource implements ValueSource, IAggregatedArrayValueSource, AggregatedArrayValueSource, AggregatedArrayValueSourceProjectableAsNullable, __ValueSourcePrivate, ToSql { - [tableOrView]: any [valueType_]: any [optionalType_]: any - [valueSourceType]!: "ValueSource" - [database]: any - [valueSourceTypeName]: any - [aggregatedArrayValueSourceType]!: 'AggregatedArrayValueSource' + [source]: any + [typeName]: any + [aggregatedArrayValueSource]!: 'AggregatedArrayValueSource' [isValueSourceObject]: true = true __valueType: ValueType = 'aggregatedArray' @@ -2372,10 +2362,10 @@ export class AggregateValueAsArrayValueSource implements ValueSource>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { this.__registerTableOrViewOf(sqlBuilder, requiredTablesOrViews, this.__aggregatedArrayColumns) } - __registerTableOrViewOf(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>, aggregatedArrayColumns: __AggregatedArrayColumns | AnyValueSource | null | undefined): void { + __registerTableOrViewOf(sqlBuilder: HasIsValue, requiredTablesOrViews: Set, aggregatedArrayColumns: __AggregatedArrayColumns | AnyValueSource | null | undefined): void { if (!aggregatedArrayColumns) { return } else if (isValueSource(aggregatedArrayColumns)) { @@ -2387,10 +2377,10 @@ export class AggregateValueAsArrayValueSource implements ValueSource, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { this.__registerRequiredColumnOf(sqlBuilder, requiredColumns, onlyForTablesOrViews, this.__aggregatedArrayColumns) } - __registerRequiredColumnOf(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>, aggregatedArrayColumns: __AggregatedArrayColumns | AnyValueSource | null | undefined): void { + __registerRequiredColumnOf(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set, aggregatedArrayColumns: __AggregatedArrayColumns | AnyValueSource | null | undefined): void { if (!aggregatedArrayColumns) { return } else if (isValueSource(aggregatedArrayColumns)) { @@ -2402,10 +2392,10 @@ export class AggregateValueAsArrayValueSource implements ValueSource | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__getOldValuesOf(sqlBuilder, this.__aggregatedArrayColumns) } - __getOldValuesOf(sqlBuilder: HasIsValue, aggregatedArrayColumns: __AggregatedArrayColumns | AnyValueSource | null | undefined): ITableOrView | undefined { + __getOldValuesOf(sqlBuilder: HasIsValue, aggregatedArrayColumns: __AggregatedArrayColumns | AnyValueSource | null | undefined): AnyTableOrView | undefined { if (!aggregatedArrayColumns) { return undefined } else if (isValueSource(aggregatedArrayColumns)) { @@ -2421,10 +2411,10 @@ export class AggregateValueAsArrayValueSource implements ValueSource | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return this.__getValuesForInsertOf(sqlBuilder, this.__aggregatedArrayColumns) } - __getValuesForInsertOf(sqlBuilder: HasIsValue, aggregatedArrayColumns: __AggregatedArrayColumns | AnyValueSource | null | undefined): ITableOrView | undefined { + __getValuesForInsertOf(sqlBuilder: HasIsValue, aggregatedArrayColumns: __AggregatedArrayColumns | AnyValueSource | null | undefined): AnyTableOrView | undefined { if (!aggregatedArrayColumns) { return undefined } else if (isValueSource(aggregatedArrayColumns)) { @@ -2518,13 +2508,11 @@ export class AllowWhenAggregateValueAsArrayValueSource extends AggregateValueAsA } export class NullAggregateValueAsArrayValueSource implements ValueSource, IAggregatedArrayValueSource, AggregatedArrayValueSource, AggregatedArrayValueSourceProjectableAsNullable, __ValueSourcePrivate, ToSql { - [tableOrView]: any [valueType_]: any [optionalType_]: any - [valueSourceType]!: "ValueSource" - [database]: any - [valueSourceTypeName]: any - [aggregatedArrayValueSourceType]!: 'AggregatedArrayValueSource' + [source]: any + [typeName]: any + [aggregatedArrayValueSource]!: 'AggregatedArrayValueSource' [isValueSourceObject]: true = true __valueType: ValueType = 'aggregatedArray' @@ -2562,14 +2550,14 @@ export class NullAggregateValueAsArrayValueSource implements ValueSource[]): void { } - __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set>): void { + __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set): void { } - __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set): void { } - __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } - __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } __isAllowed(_sqlBuilder: HasIsValue): boolean { diff --git a/src/internal/WithViewImpl.ts b/src/internal/WithViewImpl.ts index 74dc527d..8fee69dd 100644 --- a/src/internal/WithViewImpl.ts +++ b/src/internal/WithViewImpl.ts @@ -1,17 +1,16 @@ -import { HasIsValue, ITableOrView, IWithView, __addWiths, __getTableOrViewPrivate, __ITableOrViewPrivate, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" -import type { AliasedTableOrView, OuterJoinSourceOf, WITH_VIEW } from "../utils/tableOrViewUtils" -import type { AnyDB } from "../databases" +import { HasIsValue, IWithView, __addWiths, __getTableOrViewPrivate, __ITableOrViewPrivate, __registerRequiredColumn, __registerTableOrView, AnyTableOrView } from "../utils/ITableOrView" +import type { AliasedTableOrView, AsAliasedForUseInLeftJoin, AsForUseInLeftJoin } from "../utils/tableOrViewUtils" import type { SelectData, SqlBuilder, WithSelectData } from "../sqlBuilders/SqlBuilder" import { createColumnsFrom } from "../internal/ColumnImpl" -import { database, tableOrViewRef, type } from "../utils/symbols" +import { isTableOrViewObject, source, type } from "../utils/symbols" import { __getValueSourceOfObject, __getValueSourcePrivate } from "../expressions/values" -import { RawFragment } from "../utils/RawFragment" +import type { RawFragment } from "../utils/RawFragment" import { Column } from "../utils/Column" -export class WithViewImpl> implements IWithView, WithSelectData, __ITableOrViewPrivate { - [database]!: REF[typeof database] +export class WithViewImpl implements IWithView, WithSelectData, __ITableOrViewPrivate { + [isTableOrViewObject]: true = true; + [source]: any [type]!: 'with' - [tableOrViewRef]!: REF __sqlBuilder: SqlBuilder /* implements __ITableOrViewPrivate as private members*/ @@ -53,10 +52,10 @@ export class WithViewImpl { - return this.forUseInLeftJoinAs('') + forUseInLeftJoin(): AsForUseInLeftJoin { + return this.forUseInLeftJoinAs('') as any } - forUseInLeftJoinAs(as: ALIAS): OuterJoinSourceOf { + forUseInLeftJoinAs(as: ALIAS): AsAliasedForUseInLeftJoin { const result = new WithViewImpl(this.__sqlBuilder, this.__name, this.__selectData) result.__as = as result.__forUseInLeftJoin = true @@ -89,17 +88,17 @@ export class WithViewImpl>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { requiredTablesOrViews.add(this) __registerTableOrView(this.__template, sqlBuilder, requiredTablesOrViews) } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { __registerRequiredColumn(this.__template, sqlBuilder, requiredColumns, onlyForTablesOrViews) } - __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } - __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { return undefined } __isAllowed(_sqlBuilder: HasIsValue): boolean { diff --git a/src/queryBuilders/AbstractQueryBuilder.ts b/src/queryBuilders/AbstractQueryBuilder.ts index e5fb4696..c8cee9df 100644 --- a/src/queryBuilders/AbstractQueryBuilder.ts +++ b/src/queryBuilders/AbstractQueryBuilder.ts @@ -1,7 +1,7 @@ import { AnyValueSource, isValueSource, __getValueSourcePrivate } from "../expressions/values" import { getQueryColumn, QueryColumns, SqlBuilder } from "../sqlBuilders/SqlBuilder" import { Column } from "../utils/Column" -import { ITableOrView, IWithView, __getTableOrViewPrivate, __registerRequiredColumn } from "../utils/ITableOrView" +import { AnyTableOrView, IWithView, __getTableOrViewPrivate, __registerRequiredColumn } from "../utils/ITableOrView" export class AbstractQueryBuilder { __sqlBuilder: SqlBuilder @@ -175,7 +175,7 @@ export class AbstractQueryBuilder { let containsRequiredInOptionalObject = false let requiredInOptionalObjectHaveValue = true // Rule 2 - let firstRequiredTables = new Set>() + let firstRequiredTables = new Set() let alwaysSameRequiredTablesSize : undefined | boolean = undefined let originallyRequiredHaveValue = true @@ -221,7 +221,7 @@ export class AbstractQueryBuilder { valueSourcePrivate.__registerTableOrView(this.__sqlBuilder, firstRequiredTables) alwaysSameRequiredTablesSize = true } else if (alwaysSameRequiredTablesSize) { - let valueSourceRequiredTables = new Set>() + let valueSourceRequiredTables = new Set() valueSourcePrivate.__registerTableOrView(this.__sqlBuilder, valueSourceRequiredTables) const initialSize = firstRequiredTables.size if (initialSize !== valueSourceRequiredTables.size) { @@ -276,7 +276,7 @@ export class AbstractQueryBuilder { return result } - __getOldValueOfColumns(columns: QueryColumns | undefined): ITableOrView | undefined { + __getOldValueOfColumns(columns: QueryColumns | undefined): AnyTableOrView | undefined { for (const property in columns) { const column = columns[property]! if (isValueSource(column)) { @@ -294,7 +294,7 @@ export class AbstractQueryBuilder { return undefined } - __getValuesForInsertOfColumns(columns: { [property: string]: any } | undefined): ITableOrView | undefined { + __getValuesForInsertOfColumns(columns: { [property: string]: any } | undefined): AnyTableOrView | undefined { for (const property in columns) { const column = columns[property]! if (isValueSource(column)) { @@ -307,7 +307,7 @@ export class AbstractQueryBuilder { return undefined } - __registerTableOrViewOfColumns(columns: QueryColumns | undefined, requiredTablesOrViews: Set>) { + __registerTableOrViewOfColumns(columns: QueryColumns | undefined, requiredTablesOrViews: Set) { for (const property in columns) { const column = columns[property]! if (isValueSource(column)) { @@ -329,7 +329,7 @@ export class AbstractQueryBuilder { } } - __registerRequiredColumnOfColmns(columns: QueryColumns | undefined, requiredColumns: Set, newOnly: Set>) { + __registerRequiredColumnOfColmns(columns: QueryColumns | undefined, requiredColumns: Set, newOnly: Set) { for (const property in columns) { const column = columns[property]! if (isValueSource(column)) { diff --git a/src/queryBuilders/DeleteQueryBuilder.ts b/src/queryBuilders/DeleteQueryBuilder.ts index 100872df..7df51048 100644 --- a/src/queryBuilders/DeleteQueryBuilder.ts +++ b/src/queryBuilders/DeleteQueryBuilder.ts @@ -1,28 +1,29 @@ import { SqlBuilder, DeleteData, JoinData, ToSql, isAllowedQueryColumns } from "../sqlBuilders/SqlBuilder" -import { HasAddWiths, HasIsValue, ITable, ITableOrView, IWithView, OuterJoinSource, __addWiths, __getTableOrViewPrivate, __isAllowed } from "../utils/ITableOrView" +import { AnyTableOrView, ForUseInLeftJoin, HasAddWiths, HasIsValue, ITable, IWithView, __addWiths, __getTableOrViewPrivate, __isAllowed } from "../utils/ITableOrView" import { IBooleanValueSource, IIfValueSource, AnyValueSource, AlwaysIfValueSource, isValueSource } from "../expressions/values" -import type { DeleteExpression, ExecutableDelete, DynamicExecutableDeleteExpression, DeleteExpressionAllowingNoWhere, DeleteCustomization, CustomizableExecutableDelete, ComposableCustomizableExecutableDelete, ReturnableExecutableDelete, ExecutableDeleteReturning, DeleteColumns, DeleteWhereExpression, DeleteWhereExpressionAllowingNoWhere, DeleteWhereJoinExpression, DynamicOnExpression, OnExpression, DeleteExpressionWithoutJoin, DeleteUsingExpression, DeleteWhereJoinExpressionAllowingNoWhere, DynamicOnExpressionAllowingNoWhere, OnExpressionAllowingNoWhere, DeleteExpressionWithoutJoinAllowingNoWhere, DeleteUsingExpressionAllowingNoWhere, ComposableCustomizableExecutableDeleteProjectableAsNullable } from "../expressions/delete" +import type { DeleteExpression, ExecutableDelete, DynamicExecutableDeleteExpression, DeleteExpressionAllowingNoWhere, DeleteCustomization, CustomizableExecutableDelete, ComposableCustomizableExecutableDelete, ReturnableExecutableDelete, ExecutableDeleteReturning, DeleteColumns, DeleteWhereExpression, DeleteWhereExpressionAllowingNoWhere, DeleteWhereJoinExpression, DynamicOnExpression, OnExpression, DeleteExpressionWithoutJoin, DeleteUsingExpression, DeleteWhereJoinExpressionAllowingNoWhere, DynamicOnExpressionAllowingNoWhere, OnExpressionAllowingNoWhere, DeleteExpressionWithoutJoinAllowingNoWhere, DeleteUsingExpressionAllowingNoWhere, CustomizableExecutableDeleteProjectableAsNullable } from "../expressions/delete" import ChainedError from "chained-error" import { attachSource } from "../utils/attachSource" -import { database, resultType, tableOrView, type } from "../utils/symbols" +import { from, resultType, source, type, using } from "../utils/symbols" import { asAlwaysIfValueSource } from "../expressions/values" import { __getValueSourcePrivate } from "../expressions/values" import { AbstractQueryBuilder, __setQueryMetadata } from "./AbstractQueryBuilder" import { Column } from "../utils/Column" -export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWiths, ToSql, DeleteExpression, DeleteExpressionAllowingNoWhere, CustomizableExecutableDelete, ExecutableDelete, DynamicExecutableDeleteExpression, DeleteData, ComposableCustomizableExecutableDelete, ReturnableExecutableDelete, ExecutableDeleteReturning, DeleteWhereExpression, DeleteWhereExpressionAllowingNoWhere, DeleteWhereJoinExpression, DynamicOnExpression, OnExpression, DeleteExpressionWithoutJoin, DeleteUsingExpression, DeleteWhereJoinExpressionAllowingNoWhere, DynamicOnExpressionAllowingNoWhere, OnExpressionAllowingNoWhere, DeleteExpressionWithoutJoinAllowingNoWhere, DeleteUsingExpressionAllowingNoWhere, ComposableCustomizableExecutableDeleteProjectableAsNullable { +export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWiths, ToSql, DeleteExpression, DeleteExpressionAllowingNoWhere, CustomizableExecutableDelete, ExecutableDelete, DynamicExecutableDeleteExpression, DeleteData, ComposableCustomizableExecutableDelete, ReturnableExecutableDelete, ExecutableDeleteReturning, DeleteWhereExpression, DeleteWhereExpressionAllowingNoWhere, DeleteWhereJoinExpression, DynamicOnExpression, OnExpression, DeleteExpressionWithoutJoin, DeleteUsingExpression, DeleteWhereJoinExpressionAllowingNoWhere, DynamicOnExpressionAllowingNoWhere, OnExpressionAllowingNoWhere, DeleteExpressionWithoutJoinAllowingNoWhere, DeleteUsingExpressionAllowingNoWhere, CustomizableExecutableDeleteProjectableAsNullable { + [source]: any + [from]: any + [using]: any [type]: any - [database]: any - [tableOrView]: any [resultType]: any __table: ITable __where?: AlwaysIfValueSource __allowNoWhere: boolean __withs: Array> = [] - __customization?: DeleteCustomization + __customization?: DeleteCustomization //__columns?: QueryColumns // declared at AbstractQueryBuilder - __using?: Array> + __using?: Array __joins?: Array __oneColumn?: boolean @@ -265,7 +266,7 @@ export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWi - using(table: ITableOrView): any { + using(table: AnyTableOrView): any { this.__finishJoin() this.__query = '' if (!this.__using) { @@ -275,7 +276,7 @@ export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - join(table: ITableOrView): any { + join(table: AnyTableOrView): any { this.__finishJoin() this.__query = '' if (this.__lastJoin) { @@ -288,7 +289,7 @@ export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - innerJoin(table: ITableOrView): any { + innerJoin(table: AnyTableOrView): any { this.__finishJoin() this.__query = '' if (this.__lastJoin) { @@ -301,7 +302,7 @@ export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - leftJoin(source: OuterJoinSource): any { + leftJoin(source: ForUseInLeftJoin): any { this.__finishJoin() this.__query = '' if (this.__lastJoin) { @@ -314,7 +315,7 @@ export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(source).__addWiths(this.__sqlBuilder, this.__withs) return this } - leftOuterJoin(source: OuterJoinSource): any { + leftOuterJoin(source: ForUseInLeftJoin): any { this.__finishJoin() this.__query = '' if (this.__lastJoin) { @@ -355,7 +356,7 @@ export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWi - customizeQuery(customization: DeleteCustomization): this { + customizeQuery(customization: DeleteCustomization): this { this.__finishJoin() this.__customization = customization __addWiths(customization.beforeQuery, this.__sqlBuilder, this.__withs) @@ -364,7 +365,7 @@ export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWi return this } - returning(columns: DeleteColumns): this { + returning(columns: DeleteColumns): this { this.__finishJoin() this.__query = '' this.__columns = columns @@ -392,17 +393,17 @@ export class DeleteQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(withView).__addWiths(sqlBuilder, withs) } } - __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set>): void { + __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set): void { // do nothing because it is not possible to add external dependency } - __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set): void { // do nothing because it is not possible to add external dependency } - __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { // old values fake table is not possible to be used here return undefined } - __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { // values for insert fake table is not possible to be used here return undefined } diff --git a/src/queryBuilders/InsertQueryBuilder.ts b/src/queryBuilders/InsertQueryBuilder.ts index c2796a71..8bbc125c 100644 --- a/src/queryBuilders/InsertQueryBuilder.ts +++ b/src/queryBuilders/InsertQueryBuilder.ts @@ -1,22 +1,23 @@ import { SqlBuilder, InsertData, SelectData, ToSql, isAllowedQueryColumns } from "../sqlBuilders/SqlBuilder" -import{ HasAddWiths, HasIsValue, ITable, ITableOrView, IWithView, __getTableOrViewPrivate, __isAllowed } from "../utils/ITableOrView" +import{ AnyTableOrView, HasAddWiths, HasIsValue, ITable, IWithView, __getTableOrViewPrivate, __isAllowed } from "../utils/ITableOrView" import type { InsertExpression, ExecutableInsertExpression, ExecutableInsert, ExecutableInsertReturning, CustomizableExecutableMultipleInsert, CustomizableExecutableInsertFromSelect,/*MissingKeysInsertExpression, ShapedMissingKeysInsertExpression, MissingKeysMultipleInsertExpression, ShapedMissingKeysMultipleInsertExpression*/ InsertCustomization, CustomizableExecutableInsertReturningLastInsertedId, CustomizableExecutableSimpleInsert, ComposableCustomizableExecutableInsert, ExecutableInsertReturningLastInsertedId, InsertColumns, CustomizableExecutableInsert, OnConflictDoMultipleInsert, InsertOnConflictSetsExpression, DynamicOnConflictWhereExpression, OnConflictOnColumnWhere, CustomizableExecutableInsertFromSelectOnConflict, CustomizableExecutableSimpleInsertOnConflict, OnConflictDoSimpleInsert, CustomizableExecutableMultipleInsertOnConfict, CustomizableExecutableInsertFromSelectOnConflictOptional, CustomizableExecutableSimpleInsertOnConflictOptional, CustomizableExecutableMultipleInsertOnConfictOptional, ExecutableMultipleInsertExpression, ShapedExecutableInsertExpression, ShapedExecutableMultipleInsertExpression, ShapedInsertExpression, ShapedInsertOnConflictSetsExpression, ComposableCustomizableExecutableInsertProjectableAsNullable, ComposableCustomizableExecutableInsertOptionalProjectableAsNullable } from "../expressions/insert" import { Column, isColumn } from "../utils/Column" import { __getColumnOfObject, __getColumnPrivate } from "../utils/Column" import ChainedError from "chained-error" import { attachSource } from "../utils/attachSource" -import { database, resultType, tableOrView, type } from "../utils/symbols" +import { from, resultType, source, type, using } from "../utils/symbols" import { AlwaysIfValueSource, AnyValueSource, asAlwaysIfValueSource, IBooleanValueSource, IExecutableSelectQuery, IIfValueSource, IStringValueSource, isValueSource, __getValueSourcePrivate } from "../expressions/values" import { __addWiths } from "../utils/ITableOrView" import { AbstractQueryBuilder, __setQueryMetadata } from "./AbstractQueryBuilder" -import { RawFragment } from "../utils/RawFragment" +import type { RawFragment } from "../utils/RawFragment" // one implement ommited intentionally to don't confuse TypeScript -export class InsertQueryBuilder extends AbstractQueryBuilder implements HasAddWiths, ToSql, InsertExpression, ShapedInsertExpression, ExecutableInsertReturningLastInsertedId, ExecutableInsert, ExecutableInsertExpression, ShapedExecutableInsertExpression, ExecutableMultipleInsertExpression, ShapedExecutableMultipleInsertExpression, CustomizableExecutableMultipleInsert, CustomizableExecutableInsertFromSelect, CustomizableExecutableInsertReturningLastInsertedId, CustomizableExecutableSimpleInsert, /*MissingKeysInsertExpression, ShapedMissingKeysInsertExpression, MissingKeysMultipleInsertExpression, ShapedMissingKeysMultipleInsertExpression,*/ InsertData, ComposableCustomizableExecutableInsert, ExecutableInsertReturning, ExecutableInsert, CustomizableExecutableInsert, OnConflictDoMultipleInsert, InsertOnConflictSetsExpression, ShapedInsertOnConflictSetsExpression, DynamicOnConflictWhereExpression, OnConflictOnColumnWhere, CustomizableExecutableInsertFromSelectOnConflict, CustomizableExecutableSimpleInsertOnConflict, OnConflictDoSimpleInsert, CustomizableExecutableMultipleInsertOnConfict, CustomizableExecutableInsertFromSelectOnConflictOptional, CustomizableExecutableSimpleInsertOnConflictOptional, CustomizableExecutableMultipleInsertOnConfictOptional, ComposableCustomizableExecutableInsertProjectableAsNullable, ComposableCustomizableExecutableInsertOptionalProjectableAsNullable { +export class InsertQueryBuilder extends AbstractQueryBuilder implements HasAddWiths, ToSql, InsertExpression, ShapedInsertExpression, ExecutableInsertReturningLastInsertedId, ExecutableInsert, ExecutableInsertExpression, ShapedExecutableInsertExpression, ExecutableMultipleInsertExpression, ShapedExecutableMultipleInsertExpression, CustomizableExecutableMultipleInsert, CustomizableExecutableInsertFromSelect, CustomizableExecutableInsertReturningLastInsertedId, CustomizableExecutableSimpleInsert, /*MissingKeysInsertExpression, ShapedMissingKeysInsertExpression, MissingKeysMultipleInsertExpression, ShapedMissingKeysMultipleInsertExpression,*/ InsertData, ComposableCustomizableExecutableInsert, ExecutableInsertReturning, ExecutableInsert, CustomizableExecutableInsert, OnConflictDoMultipleInsert, InsertOnConflictSetsExpression, ShapedInsertOnConflictSetsExpression, DynamicOnConflictWhereExpression, OnConflictOnColumnWhere, CustomizableExecutableInsertFromSelectOnConflict, CustomizableExecutableSimpleInsertOnConflict, OnConflictDoSimpleInsert, CustomizableExecutableMultipleInsertOnConfict, CustomizableExecutableInsertFromSelectOnConflictOptional, CustomizableExecutableSimpleInsertOnConflictOptional, CustomizableExecutableMultipleInsertOnConfictOptional, ComposableCustomizableExecutableInsertProjectableAsNullable, ComposableCustomizableExecutableInsertOptionalProjectableAsNullable { + [source]: any + [from]: any + [using]: any [type]: any - [database]: any - [tableOrView]: any [resultType]: any __table: ITable @@ -28,7 +29,7 @@ export class InsertQueryBuilder extends AbstractQueryBuilder implements HasAddWi __idColumn?: Column __from?: SelectData __withs: Array> = [] - __customization?: InsertCustomization + __customization?: InsertCustomization //__columns?: QueryColumns // declared at AbstractQueryBuilder __onConflictOnConstraint?: string | IStringValueSource | RawFragment __onConflictOnColumns?: AnyValueSource[] @@ -37,7 +38,7 @@ export class InsertQueryBuilder extends AbstractQueryBuilder implements HasAddWi __onConflictUpdateShape?: { [property: string] : string } __onConflictUpdateSets?: { [property: string]: any } __onConflictUpdateWhere?: AlwaysIfValueSource - __valuesForInsert?: ITableOrView + __valuesForInsert?: AnyTableOrView __oneColumn?: boolean @@ -1554,13 +1555,13 @@ export class InsertQueryBuilder extends AbstractQueryBuilder implements HasAddWi dynamicValues(columns: any): this { return this.values(columns) } - from(select: IExecutableSelectQuery): this { + from(select: IExecutableSelectQuery): this { this.__from = select as any as SelectData __addWiths(select, this.__sqlBuilder, this.__withs) return this } - customizeQuery(customization: InsertCustomization): this { + customizeQuery(customization: InsertCustomization): this { this.__customization = customization __addWiths(customization.beforeQuery, this.__sqlBuilder, this.__withs) __addWiths(customization.afterInsertKeyword, this.__sqlBuilder, this.__withs) @@ -1879,17 +1880,17 @@ export class InsertQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(withView).__addWiths(sqlBuilder, withs) } } - __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set>): void { + __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set): void { // do nothing because it is not possible to add external dependency } - __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set): void { // do nothing because it is not possible to add external dependency } - __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { // old values fake table is not possible to be used here return undefined } - __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { // values for insert fake table is not possible to be used here return undefined } diff --git a/src/queryBuilders/SelectQueryBuilder.ts b/src/queryBuilders/SelectQueryBuilder.ts index 9262017c..5c357af3 100644 --- a/src/queryBuilders/SelectQueryBuilder.ts +++ b/src/queryBuilders/SelectQueryBuilder.ts @@ -1,14 +1,13 @@ import { SqlBuilder, JoinData, ToSql, SelectData, CompoundOperator, CompoundSelectData, PlainSelectData, QueryColumns, isAllowedQueryColumns, OrderByEntry } from "../sqlBuilders/SqlBuilder" import type { SelectExpression, SelectColumns, OrderByMode, SelectExpressionSubquery, ExecutableSelectExpressionWithoutWhere, DynamicWhereExecutableSelectExpression, GroupByOrderByExecutableSelectExpression, OffsetExecutableSelectExpression, DynamicWhereExpressionWithoutSelect, /*SelectExpressionFromNoTable,*/ SelectWhereJoinExpression, DynamicOnExpression, OnExpression, SelectExpressionWithoutJoin, SelectWhereExpression, OrderByExecutableSelectExpression, GroupByOrderByHavingExecutableSelectExpression, DynamicHavingExecutableSelectExpression, GroupByOrderHavingByExpressionWithoutSelect, DynamicHavingExpressionWithoutSelect, ICompoundableSelect, CompoundableCustomizableExecutableSelectExpression, CompoundedExecutableSelectExpression, ExecutableSelect, WithableExecutableSelect, SelectCustomization, WhereableExecutableSelectExpressionWithGroupBy, DynamicWhereExecutableSelectExpressionWithGroupBy, GroupByOrderByHavingExecutableSelectExpressionWithoutWhere, DynamicHavingExecutableSelectExpressionWithoutWhere, DynamicWhereSelectExpressionWithoutSelect, CompoundableExecutableSelectExpression, CompoundedOrderByExecutableSelectExpression, CompoundedOffsetExecutableSelectExpression, CompoundedCustomizableExecutableSelect, OrderableExecutableSelectExpressionWithoutWhere, OrderByExecutableSelectExpressionWithoutWhere, OffsetExecutableSelectExpressionWithoutWhere, CompoundableCustomizableExpressionWithoutWhere, DynamicWhereLimitExecutableSelectExpression, DynamicWhereCompoundableCustomizableExecutableSelectExpression, WithableExecutableSelectWithoutWhere, CompoundableExecutableSelectExpressionWithoutWhere, CompoundableCustomizableExecutableSelectExpressionWitoutWhere, WhereableCompoundableExecutableSelectExpressionWithoutWhere, RecursivelyConnectedExecutableSelectExpression, RecursivelyConnectedExpressionWithoutSelect, RecursivelyConnectedExecutableSelectExpressionWithoutWhere, CompoundedLimitExecutableSelectExpression, CompoundedOrderedExecutableSelectExpression, LimitExecutableSelectExpression, OrderedExecutableSelectExpression, LimitExecutableSelectExpressionWithoutWhere, OrderedExecutableSelectExpressionWithoutWhere, RecursivelyConnectedSelectWhereExpression, ConnectByExpression, OrderByExecutableSelectExpressionProjectableAsNullable, GroupByOrderByExecutableSelectExpressionProjectableAsNullable, WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable } from "../expressions/select" -import { HasAddWiths, HasIsValue, ITableOrView, IWithView, OuterJoinSource, __getOldValues, __getValuesForInsert, __isAllowed, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" +import { AnyTableOrView, ForUseInLeftJoin, HasAddWiths, HasIsValue, IWithView, __getOldValues, __getValuesForInsert, __isAllowed, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" import { IIfValueSource, IBooleanValueSource, INumberValueSource, IExecutableSelectQuery, AnyValueSource, AlwaysIfValueSource, isValueSource } from "../expressions/values" -import type { WithView } from "../utils/tableOrViewUtils" import { __addWiths, __getTableOrViewPrivate } from "../utils/ITableOrView" import { __getValueSourcePrivate } from "../expressions/values" import ChainedError from "chained-error" import { AggregateFunctions0ValueSource, AggregateSelectValueSource, InlineSelectValueSource, ValueSourceImpl } from "../internal/ValueSourceImpl" import { attachSource } from "../utils/attachSource" -import { columnsType, database, requiredTableOrView, resultType, type, compoundableColumns, isSelectQueryObject } from "../utils/symbols" +import { columnsType, resultType, type, compoundableColumns, isSelectQueryObject, source, from, using, selectColumnsType } from "../utils/symbols" import { asAlwaysIfValueSource } from "../expressions/values" import { WithViewImpl } from "../internal/WithViewImpl" import { createColumnsFrom } from "../internal/ColumnImpl" @@ -16,14 +15,16 @@ import { View } from "../View" import { AbstractQueryBuilder, __setQueryMetadata } from "./AbstractQueryBuilder" import { Column } from "../utils/Column" -abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, HasAddWiths, IExecutableSelectQuery, CompoundableCustomizableExecutableSelectExpression, CompoundedExecutableSelectExpression, WithableExecutableSelect, ExecutableSelect, LimitExecutableSelectExpression, OrderByExecutableSelectExpression, OrderedExecutableSelectExpression, OffsetExecutableSelectExpression, CompoundableCustomizableExecutableSelectExpression, CompoundableExecutableSelectExpression, CompoundedLimitExecutableSelectExpression, CompoundedOrderByExecutableSelectExpression, CompoundedOrderedExecutableSelectExpression, CompoundedOffsetExecutableSelectExpression, CompoundedCustomizableExecutableSelect, OrderableExecutableSelectExpressionWithoutWhere, WithableExecutableSelectWithoutWhere, CompoundableExecutableSelectExpressionWithoutWhere, CompoundableCustomizableExecutableSelectExpressionWitoutWhere { - [database]: any - [requiredTableOrView]: any +abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, HasAddWiths, IExecutableSelectQuery, CompoundableCustomizableExecutableSelectExpression, CompoundedExecutableSelectExpression, WithableExecutableSelect, ExecutableSelect, LimitExecutableSelectExpression, OrderByExecutableSelectExpression, OrderedExecutableSelectExpression, OffsetExecutableSelectExpression, CompoundableCustomizableExecutableSelectExpression, CompoundableExecutableSelectExpression, CompoundedLimitExecutableSelectExpression, CompoundedOrderByExecutableSelectExpression, CompoundedOrderedExecutableSelectExpression, CompoundedOffsetExecutableSelectExpression, CompoundedCustomizableExecutableSelect, OrderableExecutableSelectExpressionWithoutWhere, WithableExecutableSelectWithoutWhere, CompoundableExecutableSelectExpressionWithoutWhere, CompoundableCustomizableExecutableSelectExpressionWitoutWhere { + [source]: any + [from]: any + [using]: any [type]: any [compoundableColumns]: any [resultType]: any [columnsType]: any + [selectColumnsType]: any [isSelectQueryObject]: true = true @@ -33,7 +34,7 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has __limit?: number | INumberValueSource __offset?: number | INumberValueSource __withs: Array> = [] - __customization?: SelectCustomization + __customization?: SelectCustomization __oneColumn = false __requiredResult?: boolean @@ -42,11 +43,11 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has __query = '' __params: any[] = [] - __recursiveInternalView?: WithViewImpl - __recursiveView?: WithViewImpl + __recursiveInternalView?: WithViewImpl + __recursiveView?: WithViewImpl __recursiveSelect?: SelectData & AbstractSelect - __subSelectUsing?: ITableOrView[] + __subSelectUsing?: AnyTableOrView[] __asInlineAggregatedArrayValue?: boolean @@ -357,7 +358,7 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has } } - __combineSubSelectUsing(select: ICompoundableSelect, result: CompoundSelectQueryBuilder) { + __combineSubSelectUsing(select: ICompoundableSelect, result: CompoundSelectQueryBuilder) { const selectPrivate = select as any as AbstractSelect if (this.__subSelectUsing) { if (selectPrivate.__subSelectUsing) { @@ -370,48 +371,48 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has } } - union(select: ICompoundableSelect): any { + union(select: ICompoundableSelect): any { const result = new CompoundSelectQueryBuilder(this.__sqlBuilder, this.__asSelectData(), 'union', this.__compoundableAsSelectData(select)) this.__combineSubSelectUsing(select, result) return result } - unionAll(select: ICompoundableSelect): any { + unionAll(select: ICompoundableSelect): any { const result = new CompoundSelectQueryBuilder(this.__sqlBuilder, this.__asSelectData(), 'unionAll', this.__compoundableAsSelectData(select)) this.__combineSubSelectUsing(select, result) return result } - intersect(select: ICompoundableSelect): any { + intersect(select: ICompoundableSelect): any { const result = new CompoundSelectQueryBuilder(this.__sqlBuilder, this.__asSelectData(), 'intersect', this.__compoundableAsSelectData(select)) this.__combineSubSelectUsing(select, result) return result } - intersectAll(select: ICompoundableSelect): any { + intersectAll(select: ICompoundableSelect): any { const result = new CompoundSelectQueryBuilder(this.__sqlBuilder, this.__asSelectData(), 'intersectAll', this.__compoundableAsSelectData(select)) this.__combineSubSelectUsing(select, result) return result } - except(select: ICompoundableSelect): any { + except(select: ICompoundableSelect): any { const result = new CompoundSelectQueryBuilder(this.__sqlBuilder, this.__asSelectData(), 'except', this.__compoundableAsSelectData(select)) this.__combineSubSelectUsing(select, result) return result } - exceptAll(select: ICompoundableSelect): any { + exceptAll(select: ICompoundableSelect): any { const result = new CompoundSelectQueryBuilder(this.__sqlBuilder, this.__asSelectData(), 'exceptAll', this.__compoundableAsSelectData(select)) this.__combineSubSelectUsing(select, result) return result } - minus(select: ICompoundableSelect): any { + minus(select: ICompoundableSelect): any { const result = new CompoundSelectQueryBuilder(this.__sqlBuilder, this.__asSelectData(), 'minus', this.__compoundableAsSelectData(select)) this.__combineSubSelectUsing(select, result) return result } - minusAll(select: ICompoundableSelect): any { + minusAll(select: ICompoundableSelect): any { const result = new CompoundSelectQueryBuilder(this.__sqlBuilder, this.__asSelectData(), 'minusAll', this.__compoundableAsSelectData(select)) this.__combineSubSelectUsing(select, result) return result }; - __compoundableAsSelectData(select: ICompoundableSelect): SelectData { + __compoundableAsSelectData(select: ICompoundableSelect): SelectData { return (select as any as AbstractSelect).__asSelectData() } @@ -423,7 +424,7 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has __getTableOrViewPrivate(withView).__addWiths(sqlBuilder, withs) } } - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void { + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { const subSelectUsing = this.__subSelectUsing if (!subSelectUsing) { return @@ -433,12 +434,12 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has __getTableOrViewPrivate(tableOrView).__registerTableOrView(sqlBuilder, requiredTablesOrViews) } } - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { const subSelectUsing = this.__subSelectUsing if (!subSelectUsing) { return } - const newOnly = new Set>() + const newOnly = new Set() for (let i = 0, length = subSelectUsing.length; i < length; i++) { const tableOrView = subSelectUsing[i]! if (onlyForTablesOrViews.has(tableOrView)) { @@ -469,8 +470,8 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has this.__registerRequiredColumnInSelect(sqlBuilder, requiredColumns, newOnly) } - abstract __registerRequiredColumnInSelect(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + abstract __registerRequiredColumnInSelect(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { const subSelectUsing = this.__subSelectUsing if (!subSelectUsing) { return undefined @@ -484,7 +485,7 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has } return undefined } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { const subSelectUsing = this.__subSelectUsing if (!subSelectUsing) { return undefined @@ -510,7 +511,7 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has return sqlBuilder._buildInlineSelect(this.__asSelectData(), params) } - forUseInQueryAs(as: string): WithView { + forUseInQueryAs(as: string): any { const recursiveView = this.__recursiveView if (recursiveView) { recursiveView.__name = as @@ -520,7 +521,7 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has this.__recursiveSelect = undefined return recursiveView as any } - return new WithViewImpl(this.__sqlBuilder, as, this.__asSelectData()) as any + return new WithViewImpl(this.__sqlBuilder, as, this.__asSelectData()) as any } forUseAsInlineQueryValue(): any { @@ -544,10 +545,10 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has } } - __buildRecursive(fn: (view: any) => ICompoundableSelect, unionAll: boolean): void { + __buildRecursive(fn: (view: any) => ICompoundableSelect, unionAll: boolean): void { const sqlBuilder = this.__sqlBuilder const name = 'recursive_select_' + sqlBuilder._generateUnique() - const recursiveInternalView = new WithViewImpl(this.__sqlBuilder, name, this as any) + const recursiveInternalView = new WithViewImpl(this.__sqlBuilder, name, this as any) recursiveInternalView.__ignoreWith = true let recursiveInternalSelect if (unionAll) { @@ -555,7 +556,7 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has } else { recursiveInternalSelect = this.union(fn(recursiveInternalView)) } - const recursiveView = new WithViewImpl(this.__sqlBuilder, name, recursiveInternalSelect) + const recursiveView = new WithViewImpl(this.__sqlBuilder, name, recursiveInternalSelect) recursiveView.__recursive = true const recursiveSelect = new SelectQueryBuilder(this.__sqlBuilder, [recursiveView], false) @@ -571,15 +572,15 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has this.__recursiveView = recursiveView this.__recursiveSelect = recursiveSelect.__asSelectData() // __asSelectData is important here to detect the required tables } - recursiveUnion(fn: (view: any) => ICompoundableSelect): any { + recursiveUnion(fn: (view: any) => ICompoundableSelect): any { this.__buildRecursive(fn, false) return this } - recursiveUnionAll(fn: (view: any) => ICompoundableSelect): any { + recursiveUnionAll(fn: (view: any) => ICompoundableSelect): any { this.__buildRecursive(fn, true) return this } - __buildRecursiveFn(fn: (view: any) => IBooleanValueSource): (view: any) => ICompoundableSelect { + __buildRecursiveFn(fn: (view: any) => IBooleanValueSource): (view: any) => ICompoundableSelect { return (view: any) => { const current = this as any as PlainSelectData const result = new SelectQueryBuilder(this.__sqlBuilder, current.__tablesOrViews, false) @@ -601,7 +602,7 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has return this } - customizeQuery(customization: SelectCustomization): any { + customizeQuery(customization: SelectCustomization): any { this.__customization = customization __addWiths(customization.beforeWithQuery, this.__sqlBuilder, this.__withs) __addWiths(customization.beforeQuery, this.__sqlBuilder, this.__withs) @@ -616,10 +617,10 @@ abstract class AbstractSelect extends AbstractQueryBuilder implements ToSql, Has } } -export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSelectData, SelectExpression, /*SelectExpressionFromNoTable,*/ ExecutableSelectExpressionWithoutWhere, RecursivelyConnectedExecutableSelectExpressionWithoutWhere, DynamicWhereExecutableSelectExpression, DynamicWhereExpressionWithoutSelect, RecursivelyConnectedExpressionWithoutSelect, GroupByOrderByExecutableSelectExpression, GroupByOrderByExecutableSelectExpressionProjectableAsNullable, RecursivelyConnectedExecutableSelectExpression, SelectWhereJoinExpression, DynamicOnExpression, OnExpression, SelectExpressionWithoutJoin, SelectExpressionSubquery, SelectWhereExpression, RecursivelyConnectedSelectWhereExpression, GroupByOrderByHavingExecutableSelectExpression, DynamicHavingExecutableSelectExpression, GroupByOrderHavingByExpressionWithoutSelect, DynamicHavingExpressionWithoutSelect, WhereableExecutableSelectExpressionWithGroupBy, WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable, DynamicWhereExecutableSelectExpressionWithGroupBy, GroupByOrderByHavingExecutableSelectExpressionWithoutWhere, DynamicHavingExecutableSelectExpressionWithoutWhere, DynamicWhereSelectExpressionWithoutSelect, LimitExecutableSelectExpressionWithoutWhere, OrderByExecutableSelectExpressionWithoutWhere, OrderedExecutableSelectExpressionWithoutWhere, OffsetExecutableSelectExpressionWithoutWhere, CompoundableCustomizableExpressionWithoutWhere, DynamicWhereLimitExecutableSelectExpression, DynamicWhereCompoundableCustomizableExecutableSelectExpression, WhereableCompoundableExecutableSelectExpressionWithoutWhere, DynamicWhereCompoundableCustomizableExecutableSelectExpression, ConnectByExpression, OrderByExecutableSelectExpressionProjectableAsNullable { +export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSelectData, SelectExpression, /*SelectExpressionFromNoTable,*/ ExecutableSelectExpressionWithoutWhere, RecursivelyConnectedExecutableSelectExpressionWithoutWhere, DynamicWhereExecutableSelectExpression, DynamicWhereExpressionWithoutSelect, RecursivelyConnectedExpressionWithoutSelect, GroupByOrderByExecutableSelectExpression, GroupByOrderByExecutableSelectExpressionProjectableAsNullable, RecursivelyConnectedExecutableSelectExpression, SelectWhereJoinExpression, DynamicOnExpression, OnExpression, SelectExpressionWithoutJoin, SelectExpressionSubquery, SelectWhereExpression, RecursivelyConnectedSelectWhereExpression, GroupByOrderByHavingExecutableSelectExpression, DynamicHavingExecutableSelectExpression, GroupByOrderHavingByExpressionWithoutSelect, DynamicHavingExpressionWithoutSelect, WhereableExecutableSelectExpressionWithGroupBy, WhereableExecutableSelectExpressionWithGroupByProjectableAsNullable, DynamicWhereExecutableSelectExpressionWithGroupBy, GroupByOrderByHavingExecutableSelectExpressionWithoutWhere, DynamicHavingExecutableSelectExpressionWithoutWhere, DynamicWhereSelectExpressionWithoutSelect, LimitExecutableSelectExpressionWithoutWhere, OrderByExecutableSelectExpressionWithoutWhere, OrderedExecutableSelectExpressionWithoutWhere, OffsetExecutableSelectExpressionWithoutWhere, CompoundableCustomizableExpressionWithoutWhere, DynamicWhereLimitExecutableSelectExpression, DynamicWhereCompoundableCustomizableExecutableSelectExpression, WhereableCompoundableExecutableSelectExpressionWithoutWhere, DynamicWhereCompoundableCustomizableExecutableSelectExpression, ConnectByExpression, OrderByExecutableSelectExpressionProjectableAsNullable { __type: 'plain' = 'plain' __distinct: boolean - __tablesOrViews: Array> + __tablesOrViews: Array __joins: Array = [] __where?: AlwaysIfValueSource __startWith?: AlwaysIfValueSource // Oracle @@ -627,13 +628,13 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __connectByNoCycle?: boolean // Oracle __having?: AlwaysIfValueSource __groupBy: Array = [] - __requiredTablesOrViews?: Set> + __requiredTablesOrViews?: Set __lastJoin?: JoinData __inHaving = false __hasOptionalJoin = false - constructor(sqlBuilder: SqlBuilder, tables: Array>, distinct: boolean) { + constructor(sqlBuilder: SqlBuilder, tables: Array, distinct: boolean) { super(sqlBuilder) this.__tablesOrViews = tables this.__distinct = distinct @@ -643,7 +644,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe } } - __registerRequiredColumnInSelect(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumnInSelect(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { const tablesOrViews = this.__tablesOrViews for (let i = 0, length = tablesOrViews.length; i < length; i++) { __registerRequiredColumn(tablesOrViews[i], sqlBuilder, requiredColumns, onlyForTablesOrViews) @@ -674,7 +675,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe delete data.__limit delete data.__offset - const withView = new WithViewImpl(this.__sqlBuilder, 'result_for_count', data) + const withView = new WithViewImpl(this.__sqlBuilder, 'result_for_count', data) const withs: Array> = [] withView.__addWiths(this.__sqlBuilder, withs) @@ -713,7 +714,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe return this.__sqlBuilder._buildSelect(selectCountData, params) } - select(columns: SelectColumns): any { // any to avoid deep errors + select(columns: SelectColumns): any { // any to avoid deep errors this.__finishJoinHaving() this.__query = '' this.__columns = columns @@ -738,14 +739,14 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __getValueSourcePrivate(column).__addWiths(this.__sqlBuilder, this.__withs) return this } - from(table: ITableOrView): any { + from(table: AnyTableOrView): any { this.__finishJoinHaving() this.__query = '' this.__tablesOrViews.push(table) __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - join(table: ITableOrView): any { + join(table: AnyTableOrView): any { this.__finishJoinHaving() this.__query = '' if (this.__lastJoin) { @@ -758,7 +759,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - innerJoin(table: ITableOrView): any { + innerJoin(table: AnyTableOrView): any { this.__finishJoinHaving() this.__query = '' if (this.__lastJoin) { @@ -771,7 +772,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - leftJoin(source: OuterJoinSource): any { + leftJoin(source: ForUseInLeftJoin): any { this.__finishJoinHaving() this.__query = '' if (this.__lastJoin) { @@ -784,7 +785,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __getTableOrViewPrivate(source).__addWiths(this.__sqlBuilder, this.__withs) return this } - leftOuterJoin(source: OuterJoinSource): any { + leftOuterJoin(source: ForUseInLeftJoin): any { this.__finishJoinHaving() this.__query = '' if (this.__lastJoin) { @@ -797,7 +798,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __getTableOrViewPrivate(source).__addWiths(this.__sqlBuilder, this.__withs) return this } - optionalJoin(table: ITableOrView): any { + optionalJoin(table: AnyTableOrView): any { this.__finishJoinHaving() this.__query = '' if (this.__lastJoin) { @@ -812,7 +813,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - optionalInnerJoin(table: ITableOrView): any { + optionalInnerJoin(table: AnyTableOrView): any { this.__finishJoinHaving() this.__query = '' if (this.__lastJoin) { @@ -827,7 +828,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - optionalLeftJoin(source: OuterJoinSource): any { + optionalLeftJoin(source: ForUseInLeftJoin): any { this.__finishJoinHaving() this.__query = '' if (this.__lastJoin) { @@ -842,7 +843,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe __getTableOrViewPrivate(source).__addWiths(this.__sqlBuilder, this.__withs) return this } - optionalLeftOuterJoin(source: OuterJoinSource): any { + optionalLeftOuterJoin(source: ForUseInLeftJoin): any { this.__finishJoinHaving() this.__query = '' if (this.__lastJoin) { @@ -1028,8 +1029,8 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe } return this } - __generateRequiredTableOrView(): Set> { - const requiredTableOrView = new Set>() + __generateRequiredTableOrView(): Set { + const requiredTableOrView = new Set() this.__registerTableOrViewOfColumns(this.__columns, requiredTableOrView) const where = this.__where @@ -1090,7 +1091,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe return requiredTableOrView } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { let result = super.__getOldValues(this.__sqlBuilder) if (result) { return result @@ -1105,7 +1106,7 @@ export class SelectQueryBuilder extends AbstractSelect implements ToSql, PlainSe } return undefined } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { let result = super.__getValuesForInsert(sqlBuilder) if (result) { return result @@ -1248,7 +1249,7 @@ export class CompoundSelectQueryBuilder extends AbstractSelect implements ToSql, this.__oneColumn = firstQuery.__oneColumn if (firstQuery.__subSelectUsing && secondQuery.__subSelectUsing) { - const subSelectUsing: Array> = [] + const subSelectUsing: Array = [] firstQuery.__subSelectUsing.forEach(value => { if (!subSelectUsing.includes(value)) { subSelectUsing.push(value) @@ -1283,7 +1284,7 @@ export class CompoundSelectQueryBuilder extends AbstractSelect implements ToSql, } } - __registerRequiredColumnInSelect(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { + __registerRequiredColumnInSelect(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { __registerRequiredColumn(this.__firstQuery, sqlBuilder, requiredColumns, onlyForTablesOrViews) __registerRequiredColumn(this.__secondQuery, sqlBuilder, requiredColumns, onlyForTablesOrViews) } @@ -1293,7 +1294,7 @@ export class CompoundSelectQueryBuilder extends AbstractSelect implements ToSql, delete data.__limit delete data.__offset - const withView = new WithViewImpl(this.__sqlBuilder, 'result_for_count', data) + const withView = new WithViewImpl(this.__sqlBuilder, 'result_for_count', data) const withs: Array> = [] withView.__addWiths(this.__sqlBuilder, withs) @@ -1322,10 +1323,10 @@ export class CompoundSelectQueryBuilder extends AbstractSelect implements ToSql, } return this } - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return super.__getOldValues(sqlBuilder) || __getOldValues(this.__firstQuery, sqlBuilder) || __getOldValues(this.__secondQuery, sqlBuilder) } - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined { return super.__getValuesForInsert(sqlBuilder) || __getValuesForInsert(this.__firstQuery, sqlBuilder) || __getValuesForInsert(this.__secondQuery, sqlBuilder) } __isAllowed(sqlBuilder: HasIsValue): boolean { diff --git a/src/queryBuilders/UpdateQueryBuilder.ts b/src/queryBuilders/UpdateQueryBuilder.ts index 40f470bd..9478c37d 100644 --- a/src/queryBuilders/UpdateQueryBuilder.ts +++ b/src/queryBuilders/UpdateQueryBuilder.ts @@ -1,20 +1,21 @@ import { isAllowedQueryColumns, JoinData, SqlBuilder, ToSql, UpdateData } from "../sqlBuilders/SqlBuilder" -import { HasAddWiths, HasIsValue, ITable, ITableOrView, IWithView, OuterJoinSource, __getTableOrViewPrivate, __isAllowed } from "../utils/ITableOrView" +import { AnyTableOrView, ForUseInLeftJoin, HasAddWiths, HasIsValue, ITable, IWithView, __getTableOrViewPrivate, __isAllowed } from "../utils/ITableOrView" import { AlwaysIfValueSource, AnyValueSource, IBooleanValueSource, IIfValueSource, isValueSource } from "../expressions/values" -import type { UpdateExpression, ExecutableUpdate, ExecutableUpdateExpression, DynamicExecutableUpdateExpression, UpdateExpressionAllowingNoWhere, NotExecutableUpdateExpression, CustomizableExecutableUpdate, UpdateCustomization, ComposableCustomizableExecutableUpdate, ReturnableExecutableUpdate, ExecutableUpdateReturning, UpdateColumns, UpdateSetExpression, UpdateSetExpressionAllowingNoWhere, UpdateSetJoinExpression, DynamicOnExpression, OnExpression, UpdateExpressionWithoutJoin, UpdateFromExpression, UpdateSetJoinExpressionAllowingNoWhere, DynamicOnExpressionAllowingNoWhere, OnExpressionAllowingNoWhere, UpdateExpressionWithoutJoinAllowingNoWhere, UpdateFromExpressionAllowingNoWhere, ShapedUpdateSetExpression, ShapedUpdateSetExpressionAllowingNoWhere, ShapedExecutableUpdateExpression, ShapedNotExecutableUpdateExpression, ComposableCustomizableExecutableUpdateProjectableAsNullable } from "../expressions/update" +import type { UpdateExpression, ExecutableUpdate, ExecutableUpdateExpression, DynamicExecutableUpdateExpression, UpdateExpressionAllowingNoWhere, NotExecutableUpdateExpression, CustomizableExecutableUpdate, UpdateCustomization, CustomizableExecutableUpdateReturning, ReturnableExecutableUpdate, ExecutableUpdateReturning, UpdateColumns, UpdateSetExpression, UpdateSetExpressionAllowingNoWhere, UpdateSetJoinExpression, DynamicOnExpression, OnExpression, UpdateExpressionWithoutJoin, UpdateFromExpression, UpdateSetJoinExpressionAllowingNoWhere, DynamicOnExpressionAllowingNoWhere, OnExpressionAllowingNoWhere, UpdateExpressionWithoutJoinAllowingNoWhere, UpdateFromExpressionAllowingNoWhere, ShapedUpdateSetExpression, ShapedUpdateSetExpressionAllowingNoWhere, ShapedExecutableUpdateExpression, ShapedNotExecutableUpdateExpression, CustomizableExecutableUpdateProjectableAsNullable } from "../expressions/update" import ChainedError from "chained-error" import { attachSource } from "../utils/attachSource" -import { database, resultType, tableOrView, type } from "../utils/symbols" +import { from, resultType, source, type, using } from "../utils/symbols" import { asAlwaysIfValueSource } from "../expressions/values" import { __addWiths } from "../utils/ITableOrView" import { __getValueSourcePrivate } from "../expressions/values" import { __setQueryMetadata, AbstractQueryBuilder } from "./AbstractQueryBuilder" import { Column, isColumn } from "../utils/Column" -export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWiths, ToSql, UpdateExpression, UpdateExpressionAllowingNoWhere, ExecutableUpdate, CustomizableExecutableUpdate, ExecutableUpdateExpression, ShapedExecutableUpdateExpression, NotExecutableUpdateExpression, ShapedNotExecutableUpdateExpression, DynamicExecutableUpdateExpression, UpdateData, ComposableCustomizableExecutableUpdate, ReturnableExecutableUpdate, ExecutableUpdateReturning, UpdateSetExpression, ShapedUpdateSetExpression, UpdateSetExpressionAllowingNoWhere, ShapedUpdateSetExpressionAllowingNoWhere, UpdateSetJoinExpression, DynamicOnExpression, OnExpression, UpdateExpressionWithoutJoin, UpdateFromExpression, UpdateSetJoinExpressionAllowingNoWhere, DynamicOnExpressionAllowingNoWhere, OnExpressionAllowingNoWhere, UpdateExpressionWithoutJoinAllowingNoWhere, UpdateFromExpressionAllowingNoWhere, ComposableCustomizableExecutableUpdateProjectableAsNullable { +export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWiths, ToSql, UpdateExpression, UpdateExpressionAllowingNoWhere, ExecutableUpdate, CustomizableExecutableUpdate, ExecutableUpdateExpression, ShapedExecutableUpdateExpression, NotExecutableUpdateExpression, ShapedNotExecutableUpdateExpression, DynamicExecutableUpdateExpression, UpdateData, CustomizableExecutableUpdateReturning, ReturnableExecutableUpdate, ExecutableUpdateReturning, UpdateSetExpression, ShapedUpdateSetExpression, UpdateSetExpressionAllowingNoWhere, ShapedUpdateSetExpressionAllowingNoWhere, UpdateSetJoinExpression, DynamicOnExpression, OnExpression, UpdateExpressionWithoutJoin, UpdateFromExpression, UpdateSetJoinExpressionAllowingNoWhere, DynamicOnExpressionAllowingNoWhere, OnExpressionAllowingNoWhere, UpdateExpressionWithoutJoinAllowingNoWhere, UpdateFromExpressionAllowingNoWhere, CustomizableExecutableUpdateProjectableAsNullable { + [source]: any + [from]: any + [using]: any [type]: any - [database]: any - [tableOrView]: any [resultType]: any __table: ITable @@ -23,10 +24,10 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi __where?: AlwaysIfValueSource __allowNoWhere: boolean __withs: Array> = [] - __customization?: UpdateCustomization + __customization?: UpdateCustomization //__columns?: QueryColumns // declared at AbstractQueryBuilder - __oldValues?: ITableOrView - __froms?: Array> + __oldValues?: AnyTableOrView + __froms?: Array __joins?: Array __oneColumn?: boolean @@ -844,7 +845,7 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi - from(table: ITableOrView): any { + from(table: AnyTableOrView): any { this.__finishJoin() this.__query = '' if (!this.__froms) { @@ -854,7 +855,7 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - join(table: ITableOrView): any { + join(table: AnyTableOrView): any { this.__finishJoin() this.__query = '' if (this.__lastJoin) { @@ -867,7 +868,7 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - innerJoin(table: ITableOrView): any { + innerJoin(table: AnyTableOrView): any { this.__finishJoin() this.__query = '' if (this.__lastJoin) { @@ -880,7 +881,7 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(table).__addWiths(this.__sqlBuilder, this.__withs) return this } - leftJoin(source: OuterJoinSource): any { + leftJoin(source: ForUseInLeftJoin): any { this.__finishJoin() this.__query = '' if (this.__lastJoin) { @@ -893,7 +894,7 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(source).__addWiths(this.__sqlBuilder, this.__withs) return this } - leftOuterJoin(source: OuterJoinSource): any { + leftOuterJoin(source: ForUseInLeftJoin): any { this.__finishJoin() this.__query = '' if (this.__lastJoin) { @@ -934,7 +935,7 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi - customizeQuery(customization: UpdateCustomization): this { + customizeQuery(customization: UpdateCustomization): this { this.__customization = customization __addWiths(customization.beforeQuery, this.__sqlBuilder, this.__withs) __addWiths(customization.afterUpdateKeyword, this.__sqlBuilder, this.__withs) @@ -942,7 +943,7 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi return this } - returning(columns: UpdateColumns): this { + returning(columns: UpdateColumns): this { this.__query = '' this.__columns = columns this.__registerTableOrViewWithOfColumns(columns, this.__withs) @@ -971,17 +972,17 @@ export class UpdateQueryBuilder extends AbstractQueryBuilder implements HasAddWi __getTableOrViewPrivate(withView).__addWiths(sqlBuilder, withs) } } - __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set>): void { + __registerTableOrView(_sqlBuilder: HasIsValue, _requiredTablesOrViews: Set): void { // do nothing because it is not possible to add external dependency } - __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set>): void { + __registerRequiredColumn(_sqlBuilder: HasIsValue, _requiredColumns: Set, _onlyForTablesOrViews: Set): void { // do nothing because it is not possible to add external dependency } - __getOldValues(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getOldValues(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { // old values fake table is not possible to be used here return undefined } - __getValuesForInsert(_sqlBuilder: HasIsValue): ITableOrView | undefined { + __getValuesForInsert(_sqlBuilder: HasIsValue): AnyTableOrView | undefined { // values for insert fake table is not possible to be used here return undefined } diff --git a/src/sqlBuilders/AbstractMySqlMariaBDSqlBuilder.ts b/src/sqlBuilders/AbstractMySqlMariaBDSqlBuilder.ts index 45f7988a..82ba251c 100644 --- a/src/sqlBuilders/AbstractMySqlMariaBDSqlBuilder.ts +++ b/src/sqlBuilders/AbstractMySqlMariaBDSqlBuilder.ts @@ -4,7 +4,7 @@ import { AnyValueSource, isValueSource, __AggregatedArrayColumns, ValueType } fr import { AbstractSqlBuilder } from "./AbstractSqlBuilder" import { __getValueSourcePrivate } from "../expressions/values" import { Column, isColumn, __getColumnOfObject, __getColumnPrivate } from "../utils/Column" -import { ITableOrView } from "../utils/ITableOrView" +import { AnyTableOrView } from "../utils/ITableOrView" import { SqlOperation1ValueSource, SqlOperation1ValueSourceIfValueOrIgnore } from "../internal/ValueSourceImpl" export class AbstractMySqlMariaDBSqlBuilder extends AbstractSqlBuilder { @@ -328,7 +328,7 @@ export class AbstractMySqlMariaDBSqlBuilder extends AbstractSqlBuilder { } return result } - _buildUpdateFrom(_query: UpdateData, _updatePrimaryKey: boolean, _requiredTables: Set> | undefined, _requiredColumns: Set | undefined, _params: any[]): string { + _buildUpdateFrom(_query: UpdateData, _updatePrimaryKey: boolean, _requiredTables: Set | undefined, _requiredColumns: Set | undefined, _params: any[]): string { return '' } _buidDeleteUsing(query: DeleteData, params: any[]): string { diff --git a/src/sqlBuilders/AbstractSqlBuilder.ts b/src/sqlBuilders/AbstractSqlBuilder.ts index 0d7398a4..d951a7b7 100644 --- a/src/sqlBuilders/AbstractSqlBuilder.ts +++ b/src/sqlBuilders/AbstractSqlBuilder.ts @@ -1,5 +1,5 @@ import { ToSql, SqlBuilder, DeleteData, InsertData, UpdateData, SelectData, SqlOperation, WithQueryData, CompoundOperator, JoinData, QueryColumns, FlatQueryColumns, flattenQueryColumns, getQueryColumn, WithSelectData, WithValuesData, OrderByEntry } from "./SqlBuilder" -import { ITableOrView, __ITableOrViewPrivate, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" +import { AnyTableOrView, __ITableOrViewPrivate, __registerRequiredColumn, __registerTableOrView } from "../utils/ITableOrView" import { AnyValueSource, BooleanValueSource, EqualableValueSource, IAggregatedArrayValueSource, IAnyBooleanValueSource, IExecutableDeleteQuery, IExecutableInsertQuery, IExecutableSelectQuery, IExecutableUpdateQuery, isValueSource, __AggregatedArrayColumns, __getValueSourceOfObject, __ValueSourcePrivate, __isStringValueSource, __isBooleanValueSource, ValueType } from "../expressions/values" import { Column, isColumn, __ColumnPrivate } from "../utils/Column" import { CustomBooleanTypeAdapter, DefaultTypeAdapter, TypeAdapter } from "../TypeAdapter" @@ -11,7 +11,7 @@ import { __getColumnOfObject, __getColumnPrivate } from "../utils/Column" import { QueryRunner } from "../queryRunners/QueryRunner" import { getWithData } from "./SqlBuilder" import { __getValueSourcePrivate } from "../expressions/values" -import { RawFragment } from "../utils/RawFragment" +import type { RawFragment } from "../utils/RawFragment" export class AbstractSqlBuilder implements SqlBuilder { // @ts-ignore @@ -51,10 +51,10 @@ export class AbstractSqlBuilder implements SqlBuilder { _resetUnique(): void { this._unique = 1 } - _getSafeTableOrView(params: any[]): ITableOrView | undefined { + _getSafeTableOrView(params: any[]): AnyTableOrView | undefined { return (params as any)._safeTableOrView } - _setSafeTableOrView(params: any[], tableOrView: ITableOrView | undefined): void { + _setSafeTableOrView(params: any[], tableOrView: AnyTableOrView | undefined): void { Object.defineProperty(params, '_safeTableOrView', { value: tableOrView, writable: true, @@ -73,10 +73,10 @@ export class AbstractSqlBuilder implements SqlBuilder { configurable: true }) } - _getForceAliasFor(params: any[]): ITableOrView | undefined { + _getForceAliasFor(params: any[]): AnyTableOrView | undefined { return (params as any)._forceAliasFor } - _setForceAliasFor(params: any[], value: ITableOrView | undefined): void { + _setForceAliasFor(params: any[], value: AnyTableOrView | undefined): void { Object.defineProperty(params, '_forceAliasFor', { value: value, writable: true, @@ -84,10 +84,10 @@ export class AbstractSqlBuilder implements SqlBuilder { configurable: true }) } - _getFakeNamesOf(params: any[]): Set> | undefined { + _getFakeNamesOf(params: any[]): Set | undefined { return (params as any)._fakeNamesOf } - _setFakeNamesOf(params: any[], value: Set> | undefined): void { + _setFakeNamesOf(params: any[], value: Set | undefined): void { Object.defineProperty(params, '_fakeNamesOf', { value: value, writable: true, @@ -303,7 +303,7 @@ export class AbstractSqlBuilder implements SqlBuilder { return "'" + value + "'" } } - _getTableOrViewVisibleName(table: ITableOrView): string { + _getTableOrViewVisibleName(table: AnyTableOrView): string { const t = __getTableOrViewPrivate(table) let result = this._escape(t.__name, false) if (t.__as) { @@ -315,7 +315,7 @@ export class AbstractSqlBuilder implements SqlBuilder { return result } _supportTableAliasWithAs = true - _appendTableOrViewName(table: ITableOrView, params: any[]): string { + _appendTableOrViewName(table: AnyTableOrView, params: any[]): string { const t = __getTableOrViewPrivate(table) if (t.__template) { return this._appendRawFragment(t.__template, params) @@ -352,11 +352,11 @@ export class AbstractSqlBuilder implements SqlBuilder { } return result } - _appendTableOrViewNameForFrom(table: ITableOrView, _params: any[]): string { + _appendTableOrViewNameForFrom(table: AnyTableOrView, _params: any[]): string { const t = __getTableOrViewPrivate(table) return this._escape(t.__name, false) } - _appendTableOrViewNoAliasForFrom(_table: ITableOrView, _params: any[]): string { + _appendTableOrViewNoAliasForFrom(_table: AnyTableOrView, _params: any[]): string { return '' } _appendRawFragment(rawFragment: RawFragment, params: any[]): string { @@ -380,7 +380,7 @@ export class AbstractSqlBuilder implements SqlBuilder { } return this._appendCondition(condition, params) } - _appendSql(value: ToSql | AnyValueSource | IExecutableSelectQuery | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery, params: any[]): string { + _appendSql(value: ToSql | AnyValueSource | IExecutableSelectQuery | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery, params: any[]): string { return (value as ToSql).__toSql(this, params) // All ValueSource or Column have a hidden implemetation of ToSql } _appendSqlParenthesis(value: ToSql | AnyValueSource, params: any[]): string { @@ -650,7 +650,7 @@ export class AbstractSqlBuilder implements SqlBuilder { } return result } - _buildFromJoins(tables: ITableOrView[] | undefined, joins: JoinData[] | undefined, requiredTablesOrViews: Set> | undefined, params: any[]): string { + _buildFromJoins(tables: AnyTableOrView[] | undefined, joins: JoinData[] | undefined, requiredTablesOrViews: Set | undefined, params: any[]): string { let fromJoins = '' if (tables && tables.length > 0) { @@ -764,7 +764,7 @@ export class AbstractSqlBuilder implements SqlBuilder { const oldFakeNameOf = this._getFakeNamesOf(params) if (oldFakeNameOf) { if (requiredTablesOrViews) { - const newFakeNameOf = new Set>() + const newFakeNameOf = new Set() requiredTablesOrViews.forEach(v => { if (oldFakeNameOf.has(v)) { newFakeNameOf.add(v) @@ -2023,7 +2023,7 @@ export class AbstractSqlBuilder implements SqlBuilder { this._resetRootQuery(query, params) return updateQuery } - _extractAdditionalRequiredTablesForUpdate(query: UpdateData, _params: any[]): Set> | undefined { + _extractAdditionalRequiredTablesForUpdate(query: UpdateData, _params: any[]): Set | undefined { if (!this._updateOldValueInFrom || !query.__oldValues) { return undefined } @@ -2033,7 +2033,7 @@ export class AbstractSqlBuilder implements SqlBuilder { return undefined } - const result = new Set>() + const result = new Set() const sets = query.__sets for (let property in sets) { @@ -2054,7 +2054,7 @@ export class AbstractSqlBuilder implements SqlBuilder { } return result } - _extractAdditionalRequiredColumnsForUpdate(query: UpdateData, requiredTables: Set> | undefined, _params: any[]): Set | undefined { + _extractAdditionalRequiredColumnsForUpdate(query: UpdateData, requiredTables: Set | undefined, _params: any[]): Set | undefined { if (!requiredTables) { return undefined } @@ -2084,7 +2084,7 @@ export class AbstractSqlBuilder implements SqlBuilder { const columnPrivate = __getColumnPrivate(column) return this._escape(columnPrivate.__name, true) } - _appendUpdateOldValueForUpdate(query: UpdateData, updatePrimaryKey: boolean, _requiredTables: Set> | undefined, _params: any[]) { + _appendUpdateOldValueForUpdate(query: UpdateData, updatePrimaryKey: boolean, _requiredTables: Set | undefined, _params: any[]) { const oldValues = query.__oldValues if (!oldValues) { return '' @@ -2104,7 +2104,7 @@ export class AbstractSqlBuilder implements SqlBuilder { _buildAfterUpdateTable(_query: UpdateData, _params: any[]): string { return '' } - _buildUpdateFrom(query: UpdateData, updatePrimaryKey: boolean, requiredTables: Set> | undefined, requiredColumns: Set | undefined, params: any[]): string { + _buildUpdateFrom(query: UpdateData, updatePrimaryKey: boolean, requiredTables: Set | undefined, requiredColumns: Set | undefined, params: any[]): string { if (!this._updateOldValueInFrom) { const from = this._buildFromJoins(query.__froms, query.__joins, undefined, params) if (from) { @@ -2893,7 +2893,7 @@ export class AbstractSqlBuilder implements SqlBuilder { result += sql[sql.length - 1] return result } - _rawFragment(params: any[], sql: TemplateStringsArray, sqlParams: Array | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery>): string { + _rawFragment(params: any[], sql: TemplateStringsArray, sqlParams: Array | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery>): string { if (sqlParams.length <= 0) { return sql[0]! } @@ -2905,10 +2905,10 @@ export class AbstractSqlBuilder implements SqlBuilder { result += sql[sql.length - 1] return result } - _rawFragmentTableName(params: any[], tableOrView: ITableOrView): string { + _rawFragmentTableName(params: any[], tableOrView: AnyTableOrView): string { return this._appendTableOrViewNameForFrom(tableOrView, params) } - _rawFragmentTableAlias(params: any[], tableOrView: ITableOrView): string { + _rawFragmentTableAlias(params: any[], tableOrView: AnyTableOrView): string { const forceAliasFor = this._getForceAliasFor(params) const forceAliasAs = this._getForceAliasAs(params) const as = __getTableOrViewPrivate(tableOrView).__as diff --git a/src/sqlBuilders/MySqlSqlBuilder.ts b/src/sqlBuilders/MySqlSqlBuilder.ts index 0e54c28e..734bf50b 100644 --- a/src/sqlBuilders/MySqlSqlBuilder.ts +++ b/src/sqlBuilders/MySqlSqlBuilder.ts @@ -1,6 +1,6 @@ import { AnyValueSource, isValueSource, __AggregatedArrayColumns, __getValueSourcePrivate, __isUuidValueSource, ValueType, __isUuidValueType } from "../expressions/values" import type { TypeAdapter } from "../TypeAdapter" -import { ITableOrView } from "../utils/ITableOrView" +import { AnyTableOrView } from "../utils/ITableOrView" import { AbstractMySqlMariaDBSqlBuilder } from "./AbstractMySqlMariaBDSqlBuilder" import { FlatQueryColumns, flattenQueryColumns, hasWithData, InsertData, SelectData, ToSql, WithQueryData } from "./SqlBuilder" @@ -100,7 +100,7 @@ export class MySqlSqlBuilder extends AbstractMySqlMariaDBSqlBuilder { } return super._buildWith(withData, params) } - _appendTableOrViewNameForFrom(table: ITableOrView, params: any[]): string { + _appendTableOrViewNameForFrom(table: AnyTableOrView, params: any[]): string { if (this._connectionConfiguration.compatibilityMode) { // The with clause must be expanded inline when it is required if (hasWithData(table)) { @@ -116,7 +116,7 @@ export class MySqlSqlBuilder extends AbstractMySqlMariaDBSqlBuilder { } return super._appendTableOrViewNameForFrom(table, params) } - _appendTableOrViewNoAliasForFrom(table: ITableOrView, params: any[]): string { + _appendTableOrViewNoAliasForFrom(table: AnyTableOrView, params: any[]): string { if (this._connectionConfiguration.compatibilityMode) { // The with name must be used as alias if (hasWithData(table)) { @@ -126,7 +126,7 @@ export class MySqlSqlBuilder extends AbstractMySqlMariaDBSqlBuilder { return super._appendTableOrViewNoAliasForFrom(table, params) } - _setSafeTableOrView(params: any[], tableOrView: ITableOrView | undefined): void { + _setSafeTableOrView(params: any[], tableOrView: AnyTableOrView | undefined): void { if (this._connectionConfiguration.compatibilityMode) { // The inline query alias (from the with) always requires explicit name if (hasWithData(tableOrView)) { diff --git a/src/sqlBuilders/SqlBuilder.ts b/src/sqlBuilders/SqlBuilder.ts index 64e2e75f..23822449 100644 --- a/src/sqlBuilders/SqlBuilder.ts +++ b/src/sqlBuilders/SqlBuilder.ts @@ -1,4 +1,4 @@ -import type { ITableOrView, ITable, IWithView, HasIsValue } from "../utils/ITableOrView" +import type { ITable, IWithView, HasIsValue, AnyTableOrView } from "../utils/ITableOrView" import { IExecutableSelectQuery, AnyValueSource, AlwaysIfValueSource, INumberValueSource, isValueSource, IAggregatedArrayValueSource, IExecutableInsertQuery, IExecutableUpdateQuery, IExecutableDeleteQuery, IStringValueSource, __getValueSourcePrivate, ValueType } from "../expressions/values" import type { DefaultTypeAdapter, TypeAdapter } from "../TypeAdapter" import type { OrderByMode, SelectCustomization } from "../expressions/select" @@ -9,7 +9,7 @@ import type { UpdateCustomization } from "../expressions/update" import type { DeleteCustomization } from "../expressions/delete" import type { InsertCustomization } from "../expressions/insert" import type { isSelectQueryObject } from "../utils/symbols" -import { RawFragment } from "../utils/RawFragment" +import type { RawFragment } from "../utils/RawFragment" export type QueryColumns = { [property: string]: AnyValueSource | QueryColumns } export type FlatQueryColumns = { [property: string]: AnyValueSource } @@ -87,7 +87,7 @@ export interface WithValuesData { __name: string __as?: string __values: any[] - __getTableOrView(): ITableOrView + __getTableOrView(): AnyTableOrView } export type WithData = WithSelectData | WithValuesData @@ -106,15 +106,15 @@ export function getWithData(withView: IWithView): WithData { export interface JoinData { __joinType: 'join' | 'innerJoin' | 'leftJoin' | 'leftOuterJoin' - __tableOrView: ITableOrView + __tableOrView: AnyTableOrView __on?: AlwaysIfValueSource __optional?: boolean } export interface WithQueryData { __withs: Array> - __customization?: SelectCustomization - __subSelectUsing?: Array> + __customization?: SelectCustomization + __subSelectUsing?: Array } export type OrderByEntry = { @@ -130,7 +130,7 @@ export interface PlainSelectData extends WithQueryData { __distinct: boolean __columns: QueryColumns __oneColumn: boolean - __tablesOrViews: Array> + __tablesOrViews: Array __joins: Array __where?: AlwaysIfValueSource __startWith?: AlwaysIfValueSource // Oracle @@ -142,7 +142,7 @@ export interface PlainSelectData extends WithQueryData { __orderingSiblingsOnly?: boolean // Oracle __limit?: number | INumberValueSource __offset?: number | INumberValueSource - __requiredTablesOrViews?: Set> + __requiredTablesOrViews?: Set __asInlineAggregatedArrayValue?: boolean } @@ -170,7 +170,7 @@ export interface InsertData extends WithQueryData { __multiple?: { [property: string]: any }[] __idColumn?: Column __from?: SelectData - __customization?: InsertCustomization + __customization?: InsertCustomization __columns?: QueryColumns __onConflictOnConstraint?: string | IStringValueSource | RawFragment __onConflictOnColumns?: AnyValueSource[] @@ -179,7 +179,7 @@ export interface InsertData extends WithQueryData { __onConflictUpdateShape?: { [property: string] : string } __onConflictUpdateSets?: { [property: string]: any } __onConflictUpdateWhere?: AlwaysIfValueSource - __valuesForInsert?: ITableOrView + __valuesForInsert?: AnyTableOrView } export interface UpdateData extends WithQueryData { @@ -188,10 +188,10 @@ export interface UpdateData extends WithQueryData { __sets: { [property: string] : any} __where?: AlwaysIfValueSource __allowNoWhere: boolean - __customization?: UpdateCustomization + __customization?: UpdateCustomization __columns?: QueryColumns - __oldValues?: ITableOrView - __froms?: Array> + __oldValues?: AnyTableOrView + __froms?: Array __joins?: Array } @@ -199,9 +199,9 @@ export interface DeleteData extends WithQueryData { __table: ITable, __where?: AlwaysIfValueSource __allowNoWhere: boolean - __customization?: DeleteCustomization + __customization?: DeleteCustomization __columns?: QueryColumns - __using?: Array> + __using?: Array __joins?: Array } @@ -227,9 +227,9 @@ export interface SqlBuilder extends SqlOperation { _generateUnique(): number _resetUnique(): void - _rawFragment(params: any[], sql: TemplateStringsArray, sqlParams: Array | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery>): string - _rawFragmentTableName(params: any[], tableOrView: ITableOrView): string - _rawFragmentTableAlias(params: any[], tableOrView: ITableOrView): string + _rawFragment(params: any[], sql: TemplateStringsArray, sqlParams: Array | IExecutableInsertQuery | IExecutableUpdateQuery | IExecutableDeleteQuery>): string + _rawFragmentTableName(params: any[], tableOrView: AnyTableOrView): string + _rawFragmentTableAlias(params: any[], tableOrView: AnyTableOrView): string _inlineSelectAsValue(query: SelectData, params: any[]): string _inlineSelectAsValueForCondition(query: SelectData, params: any[]): string diff --git a/src/sqlBuilders/SqlServerSqlBuilder.ts b/src/sqlBuilders/SqlServerSqlBuilder.ts index 02cc4479..275807c2 100644 --- a/src/sqlBuilders/SqlServerSqlBuilder.ts +++ b/src/sqlBuilders/SqlServerSqlBuilder.ts @@ -38,7 +38,7 @@ export class SqlServerSqlBuilder extends AbstractSqlBuilder { _trueValueForCondition = '(1=1)' _falseValueForCondition = '(0=1)' _nullValueForCondition = '(0=null)' - _appendSql(value: ToSql | AnyValueSource | IExecutableSelectQuery, params: any[]): string { + _appendSql(value: ToSql | AnyValueSource | IExecutableSelectQuery, params: any[]): string { if (isValueSource(value) && !isColumn(value)) { const valueSourcePrivate = __getValueSourcePrivate(value) if (valueSourcePrivate.__isBooleanForCondition) { @@ -74,7 +74,7 @@ export class SqlServerSqlBuilder extends AbstractSqlBuilder { } return false } - _appendSqlMaybeUuid(value: ToSql | AnyValueSource | IExecutableSelectQuery, params: any[]): string { + _appendSqlMaybeUuid(value: ToSql | AnyValueSource | IExecutableSelectQuery, params: any[]): string { if (this._isUuid(value)) { return 'convert(nvarchar, ' + this._appendSql(value, params) + ')' } else { @@ -1029,7 +1029,7 @@ export class SqlServerSqlBuilder extends AbstractSqlBuilder { result += sql[sql.length - 1] return result } - _rawFragment(params: any[], sql: TemplateStringsArray, sqlParams: Array>): string { + _rawFragment(params: any[], sql: TemplateStringsArray, sqlParams: Array>): string { if (sqlParams.length <= 0) { return sql[0]! } diff --git a/src/sqlBuilders/SqliteSqlBuilder.ts b/src/sqlBuilders/SqliteSqlBuilder.ts index 594c313f..9e2e2af6 100644 --- a/src/sqlBuilders/SqliteSqlBuilder.ts +++ b/src/sqlBuilders/SqliteSqlBuilder.ts @@ -5,7 +5,7 @@ import { AbstractSqlBuilder } from "./AbstractSqlBuilder" import { __getValueSourcePrivate } from "../expressions/values" import { Column, isColumn } from "../utils/Column" import type { SqliteDateTimeFormat, SqliteDateTimeFormatType } from "../connections/SqliteConfiguration" -import { ITableOrView } from "../utils/ITableOrView" +import { AnyTableOrView } from "../utils/ITableOrView" export class SqliteSqlBuilder extends AbstractSqlBuilder { sqlite: true = true @@ -156,7 +156,7 @@ export class SqliteSqlBuilder extends AbstractSqlBuilder { _falseValue = '0' _trueValueForCondition = '1' _falseValueForCondition = '0' - _appendUpdateOldValueForUpdate(_query: UpdateData, _updatePrimaryKey: boolean, _requiredTables: Set> | undefined, _params: any[]) { + _appendUpdateOldValueForUpdate(_query: UpdateData, _updatePrimaryKey: boolean, _requiredTables: Set | undefined, _params: any[]) { return '' } _buildInsertOutput(_query: InsertData, _params: any[]): string { diff --git a/src/typeMarks/MariaDBDB.ts b/src/typeMarks/MariaDBDB.ts deleted file mode 100644 index de98d70f..00000000 --- a/src/typeMarks/MariaDBDB.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { MariaDB } from "../databases" -import type { databaseName } from "../utils/symbols" - -export interface DB extends MariaDB { - [databaseName]: NAME -} diff --git a/src/typeMarks/MySqlDB.ts b/src/typeMarks/MySqlDB.ts deleted file mode 100644 index 4745c700..00000000 --- a/src/typeMarks/MySqlDB.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { MySql } from "../databases" -import type { databaseName } from "../utils/symbols" - -export interface DB extends MySql { - [databaseName]: NAME -} diff --git a/src/typeMarks/NoopDBDB.ts b/src/typeMarks/NoopDBDB.ts deleted file mode 100644 index 5beaa71e..00000000 --- a/src/typeMarks/NoopDBDB.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { NoopDB } from "../databases" -import type { databaseName } from "../utils/symbols" - -export interface DB extends NoopDB { - [databaseName]: NAME -} diff --git a/src/typeMarks/OracleDB.ts b/src/typeMarks/OracleDB.ts deleted file mode 100644 index 847582a3..00000000 --- a/src/typeMarks/OracleDB.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Oracle } from "../databases" -import type { databaseName } from "../utils/symbols" - -export interface DB extends Oracle { - [databaseName]: NAME -} diff --git a/src/typeMarks/PostgreSqlDB.ts b/src/typeMarks/PostgreSqlDB.ts deleted file mode 100644 index 8244408b..00000000 --- a/src/typeMarks/PostgreSqlDB.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { PostgreSql } from "../databases" -import type { databaseName } from "../utils/symbols" - -export interface DB extends PostgreSql { - [databaseName]: NAME -} diff --git a/src/typeMarks/SqlServerDB.ts b/src/typeMarks/SqlServerDB.ts deleted file mode 100644 index b4c75f54..00000000 --- a/src/typeMarks/SqlServerDB.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SqlServer } from "../databases" -import type { databaseName } from "../utils/symbols" - -export interface DB extends SqlServer { - [databaseName]: NAME -} diff --git a/src/typeMarks/SqliteDB.ts b/src/typeMarks/SqliteDB.ts deleted file mode 100644 index 78edb279..00000000 --- a/src/typeMarks/SqliteDB.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Sqlite } from "../databases" -import type { databaseName } from "../utils/symbols" - -export interface DB extends Sqlite { - [databaseName]: NAME -} diff --git a/src/typeMarks/TABLE.ts b/src/typeMarks/TABLE.ts deleted file mode 100644 index 8ee57eaf..00000000 --- a/src/typeMarks/TABLE.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { AnyDB } from "../databases"; -import type { ITableOrViewRef } from "../utils/ITableOrView"; -import type { tableName, type } from "../utils/symbols"; - -export interface TABLE extends ITableOrViewRef { - [tableName]: NAME - [type]: 'table' -} \ No newline at end of file diff --git a/src/typeMarks/VIEW.ts b/src/typeMarks/VIEW.ts deleted file mode 100644 index 63dcf983..00000000 --- a/src/typeMarks/VIEW.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { AnyDB } from "../databases"; -import type { ITableOrViewRef } from "../utils/ITableOrView"; -import type { type, viewName } from "../utils/symbols"; - -export interface VIEW extends ITableOrViewRef { - [viewName]: NAME - [type]: 'view' -} \ No newline at end of file diff --git a/src/utils/Column.ts b/src/utils/Column.ts index d2a04de3..565b9345 100644 --- a/src/utils/Column.ts +++ b/src/utils/Column.ts @@ -1,4 +1,4 @@ -import type { ITableOrView } from "./ITableOrView" +import type { AnyTableOrView } from "./ITableOrView" import type { ToSql } from "../sqlBuilders/SqlBuilder" import type { AnyValueSource, __ValueSourcePrivate } from "../expressions/values" import type { autogeneratedPrimaryKeyValue, computedValue, hasDefaultValue, optionalValue, primaryKeyValue, type } from "./symbols" @@ -43,7 +43,7 @@ export type ExtractColumnSubtypeInfo = export interface __ColumnPrivate extends __ValueSourcePrivate { [isColumnObject]: true __name: string - __tableOrView: ITableOrView + __tableOrView: AnyTableOrView __hasDefault: boolean __isPrimaryKey: boolean __isAutogeneratedPrimaryKey: boolean @@ -65,7 +65,7 @@ export function __getColumnPrivate(column: Column): __ColumnPrivate { return column as any } -export function __getColumnOfObject(obj: ITableOrView | { [property: string] : Column}, column: string): (Column & ToSql) | undefined { +export function __getColumnOfObject(obj: AnyTableOrView | { [property: string] : Column}, column: string): (Column & ToSql) | undefined { const result = (obj as any)[column] if (!result) { return undefined diff --git a/src/utils/IConnection.ts b/src/utils/IConnection.ts index 68ecb582..24017130 100644 --- a/src/utils/IConnection.ts +++ b/src/utils/IConnection.ts @@ -1,7 +1,6 @@ -import type { AnyDB } from "../databases" -import type { database, type } from "./symbols" +import type { NDB } from "./sourceName" +import type { connection } from "./symbols" -export interface IConnection { - [database]: DB - [type]: 'Connection' +export interface IConnection { + [connection]: DB } \ No newline at end of file diff --git a/src/utils/ITableOrView.ts b/src/utils/ITableOrView.ts index b56fed13..42428a41 100644 --- a/src/utils/ITableOrView.ts +++ b/src/utils/ITableOrView.ts @@ -1,22 +1,32 @@ -import type { AnyDB } from "../databases" -import { RawFragment } from "./RawFragment" -import type { database, noTableOrViewRequired, oldValues, outerJoinAlias, outerJoinDatabase, outerJoinTableOrView, resolvedShape, tableOrView, tableOrViewAlias, tableOrViewCustomName, tableOrViewRef, tableOrViewRefType, type, valuesForInsert } from "./symbols" +import type { RawFragment } from "./RawFragment" +import type { NDB, NDBWithType, NDbType, NGetDBFrom, NNoTableOrViewRequired, NSource, NWithSameDB } from "./sourceName" +import type { isTableOrViewObject, source, type } from "./symbols" -export interface ITableOrViewRef { - [database]: DB - [tableOrViewRefType]: 'tableOrViewRef' +export interface HasSource { + [source]: SOURCE } -export interface OfDB { - [database]: DB +export interface AvailableIn { + [source]: SOURCE } -export interface ITableOrView> extends OfDB { - [tableOrViewRef]: REF +export interface OfDB { + [source]: NDBWithType } -export interface ITableOrViewOf> extends ITableOrView { - +export interface OfSameDB> { + [source]: NWithSameDB +} + +export interface SameDB { + [source]: NWithSameDB +} + +export interface AnyTableOrView { + [isTableOrViewObject]: true +} + +export interface ITableOrView extends AnyTableOrView, HasSource { } // Duplicated here to avoid circular reference @@ -30,10 +40,10 @@ export interface HasIsValue { export interface HasAddWiths { __addWiths(sqlBuilder: HasIsValue, withs: Array>): void - __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set>): void - __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void - __getOldValues(sqlBuilder: HasIsValue): ITableOrView | undefined - __getValuesForInsert(sqlBuilder: HasIsValue): ITableOrView | undefined + __registerTableOrView(sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void + __registerRequiredColumn(sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void + __getOldValues(sqlBuilder: HasIsValue): AnyTableOrView | undefined + __getValuesForInsert(sqlBuilder: HasIsValue): AnyTableOrView | undefined __isAllowed(sqlBuilder: HasIsValue): boolean } @@ -46,7 +56,7 @@ export function __addWiths(value: any, sqlBuilder: HasIsValue, withs: Array>): void { +export function __registerTableOrView(value: any, sqlBuilder: HasIsValue, requiredTablesOrViews: Set): void { if (value === undefined || value === null) { return } @@ -55,7 +65,7 @@ export function __registerTableOrView(value: any, sqlBuilder: HasIsValue, requir } } -export function __registerRequiredColumn(value: any, sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set>): void { +export function __registerRequiredColumn(value: any, sqlBuilder: HasIsValue, requiredColumns: Set, onlyForTablesOrViews: Set): void { if (value === undefined || value === null) { return } @@ -64,7 +74,7 @@ export function __registerRequiredColumn(value: any, sqlBuilder: HasIsValue, req } } -export function __getOldValues(value: any, sqlBuilder: HasIsValue): ITableOrView | undefined { +export function __getOldValues(value: any, sqlBuilder: HasIsValue): AnyTableOrView | undefined { if (value === undefined || value === null) { return undefined } @@ -74,7 +84,7 @@ export function __getOldValues(value: any, sqlBuilder: HasIsValue): ITableOrView return undefined } -export function __getValuesForInsert(value: any, sqlBuilder: HasIsValue): ITableOrView | undefined { +export function __getValuesForInsert(value: any, sqlBuilder: HasIsValue): AnyTableOrView | undefined { if (value === undefined || value === null) { return undefined } @@ -95,6 +105,7 @@ export function __isAllowed(value: any, sqlBuilder: HasIsValue): boolean { } export interface __ITableOrViewPrivate extends HasAddWiths { + [isTableOrViewObject]: true __name: string __as?: string __type: 'table' | 'view' | 'with' | 'values' @@ -106,95 +117,51 @@ export interface __ITableOrViewPrivate extends HasAddWiths { __hasExternalDependencies?: boolean } -export function __getTableOrViewPrivate(table: ITableOrView | OuterJoinSource): __ITableOrViewPrivate { +export function __getTableOrViewPrivate(table: AnyTableOrView | ForUseInLeftJoin): __ITableOrViewPrivate { return table as any } -export interface ITable> extends ITableOrView{ +export interface ITable extends ITableOrView { [type]: 'table' } -export interface ITableOf> extends ITable { - -} - -export interface ITableOfDB extends ITable> { - -} - -export interface IView> extends ITableOrView{ +export interface IView extends ITableOrView { [type]: 'view' } -export interface IValues> extends ITableOrView{ +export interface IValues extends ITableOrView { [type]: 'values' } -export interface IWithView> extends ITableOrView{ +export interface IWithView extends ITableOrView { [type]: 'with' } -export interface NoTableOrViewRequired extends ITableOrViewRef { - [noTableOrViewRequired]: 'NoTableOrViewRequired' +export interface ITableOrViewAlias extends ITableOrView { + [type]: 'tableOrViewAlias' } -export interface NoTableOrViewRequiredView extends IView> { - [noTableOrViewRequired]: 'NoTableOrViewRequiredView' +export interface NoTableOrViewRequired extends IView> { } -export interface OLD> extends ITableOrViewRef { - [tableOrViewRef]: REF - [oldValues]: 'OldValues' -} - -export interface OldTableOrView> extends ITableOrView> { - [tableOrView]: TABLE_OR_VIEW - [oldValues]: 'OldValuesTableOrView' -} - -export interface VALUES_FOR_INSERT> extends ITableOrViewRef { - [tableOrViewRef]: REF - [valuesForInsert]: 'ValuesForInsert' -} - -export interface ValuesForInsertTableOrView> extends ITableOrView> { - [tableOrView]: TABLE_OR_VIEW - [valuesForInsert]: 'ValuesForInsertTableOrView' -} - -export interface TABLE_OR_VIEW_ALIAS, ALIAS> extends ITableOrViewRef { - [tableOrViewAlias]: ALIAS - [tableOrViewRef]: REF -} - -export interface CUSTOMIZED_TABLE_OR_VIEW, NAME> extends ITableOrViewRef { - [tableOrViewCustomName]: NAME - [tableOrViewRef]: REF -} +export type NoTableOrViewRequiredOfSameDB> = NoTableOrViewRequired> -export interface TableOrViewAlias, ALIAS> extends ITableOrView> { - [tableOrView]: TABLE_OR_VIEW - [tableOrViewAlias]: ALIAS +export interface OldValues extends HasSource { + [type]: 'oldValues' } -export interface OuterJoinSource, ALIAS> { - [outerJoinDatabase]: TABLE_OR_VIEW[typeof database] - [outerJoinTableOrView]: TABLE_OR_VIEW - [outerJoinAlias]: ALIAS +export interface ValuesForInsert extends HasSource { + [type]: 'valuesForInsert' } -export interface OUTER_JOIN_SOURCE, ALIAS> extends ITableOrViewRef { - [outerJoinDatabase]: REF[typeof database] - [outerJoinTableOrView]: REF - [outerJoinAlias]: ALIAS +export interface ForUseInLeftJoin extends HasSource { + [type]: 'forUseInLeftJoin' } -export interface ITableOrViewOuterJoin, ALIAS> extends ITableOrView> { - [tableOrView]: TABLE_OR_VIEW - [tableOrViewAlias]: ALIAS - [outerJoinAlias]: ALIAS +export interface ResolvedShape extends HasSource { + [type]: 'resolvedShape' } -export interface ResolvedShape
> extends ITableOfDB { - [resolvedShape]: 'resolvedShape' +export interface IRawFragment extends HasSource { + [type]: 'rawFragment' } \ No newline at end of file diff --git a/src/utils/RawFragment.ts b/src/utils/RawFragment.ts index 6af1e997..7d60d4a6 100644 --- a/src/utils/RawFragment.ts +++ b/src/utils/RawFragment.ts @@ -1,7 +1,5 @@ -import { AnyDB } from "../databases" -import { database, rawFragment } from "./symbols" +import type { IRawFragment } from "./ITableOrView" +import type { NSource } from "./sourceName" -export class RawFragment { - [rawFragment]!: 'rawFragment' - [database]!: DB +export interface RawFragment extends IRawFragment { } diff --git a/src/utils/resultUtils.ts b/src/utils/resultUtils.ts index 129db6bf..2f2c16c0 100644 --- a/src/utils/resultUtils.ts +++ b/src/utils/resultUtils.ts @@ -1,8 +1,5 @@ -import { AnyDB } from "../databases" import type { AnyValueSource, IValueSource, OptionalType, OptionalTypeRequiredOrAny, RemapIValueSourceTypeWithOptionalType, ValueSourceOf, ValueSourceValueTypeForRequiredInOptionalObject, ValueSourceValueTypeForObjectResult, ValueSourceValueTypeForOptionalObjectResultSameOuterJoin, ValueSourceValueTypeForNullableObjectResult, ValueSourceValueTypeForRequiredInNullableOptionalObject, ValueSourceValueTypeForOptionalNullableObjectResultSameOuterJoin } from "../expressions/values" -import { NoTableOrViewRequired, OUTER_JOIN_SOURCE, ITableOrViewRef } from "./ITableOrView" -import { database } from "./symbols" - +import { NAnyLeftJoin, NNoTableOrViewRequiredFrom, NSource } from "./sourceName" // Result export type ResultObjectValues = FixOptionalProperties<{ @@ -19,7 +16,7 @@ export type ResultObjectValuesProjectedAsNullable = FixOptionalProperti : InnerResultNullableObjectValues> }> -// Column name considering picking +// Column name with path structure export type RequiredColumnNames = T extends AnyValueSource ? 'result' : 'any' extends T ? never : RequiredInnerColumnNames // Discard any cases to avoid "Type instantiation is excessively deep and possibly infinite.ts(2589)" type RequiredInnerColumnNames = { [K in keyof T]-?: @@ -33,13 +30,11 @@ type RequiredInnerColumnNames = { [K in keyof T]-?: // Picking -export type RequiredKeysOfPickingColumns = T extends AnyValueSource ? never : { [K in keyof T]-?: {} extends Pick ? never : K }[keyof T] - type FixPickableObjectWhereCouldBeNotPicked = // In case all properties in a complex projection can me ommited in a select picked, the object can be absent as well undefined extends string ? RESULT // tsc is working with strict mode disabled. There is no way to infer the optional properties. Keep as required is a better approximation. : { } extends RESULT ? RESULT | undefined : RESULT -export type FixOptionalProperties = +type FixOptionalProperties = undefined extends string ? RESULT // tsc is working with strict mode disabled. There is no way to infer the optional properties. Keep as required is a better approximation. : { [P in keyof OptionalMap]: true extends OptionalMap ? RESULT[P] : NonNullable} @@ -65,15 +60,15 @@ type OmittablePropertiesOfProjectedAsNullable = ({ [K in keyof TYPE]-?: un // For compound -export type ColumnsForCompound, COLUMNS> = COLUMNS extends AnyValueSource - ? RemapIValueSourceTypeWithOptionalType> - : InnerColumnsForCompound +export type ColumnsForCompound = COLUMNS extends AnyValueSource + ? RemapIValueSourceTypeWithOptionalType> + : InnerColumnsForCompound -type InnerColumnsForCompound, COLUMNS> = +type InnerColumnsForCompound = { [K in keyof COLUMNS]: COLUMNS[K] extends AnyValueSource | undefined - ? RemapIValueSourceTypeWithOptionalType> - : InnerColumnsForCompound + ? RemapIValueSourceTypeWithOptionalType> + : InnerColumnsForCompound } type CompoundColumnOptionalType = @@ -204,19 +199,19 @@ type InnerObjectIsRequired = type AllFromSameLeftJoinWithOriginallyRequired = FalseWhenNever<( { [K in keyof TYPE]-?: - TYPE[K] extends IValueSource | undefined // Undefined is to deal with picking columns - ? OUTER_JOIN_SOURCE extends T + TYPE[K] extends IValueSource | undefined // Undefined is to deal with picking columns + ? SOURCE extends NAnyLeftJoin ? ( - InnerTables | NoTableOrViewRequired extends T | NoTableOrViewRequired + InnerTables | NNoTableOrViewRequiredFrom extends SOURCE | NNoTableOrViewRequiredFrom ? IsOriginallyRequired : false - ) : T extends NoTableOrViewRequired + ) : SOURCE extends NNoTableOrViewRequiredFrom ? never : false : never })[keyof TYPE]> -type InnerTables = ({ [K in keyof TYPE]-?: TYPE[K] extends ValueSourceOf | undefined ? T : never})[keyof TYPE] // Undefined is to deal with picking columns +type InnerTables = ({ [K in keyof TYPE]-?: TYPE[K] extends ValueSourceOf | undefined ? SOURCE : never})[keyof TYPE] // Undefined is to deal with picking columns type IsRequiredInOptionalObject = 'any' extends OPTIONAL_TYPE ? never : diff --git a/src/utils/sourceName.ts b/src/utils/sourceName.ts new file mode 100644 index 00000000..af79dea6 --- /dev/null +++ b/src/utils/sourceName.ts @@ -0,0 +1,90 @@ +/* + * Note: + * - DB argument is not enforced to make easier to TS process it + * - Sorces at enforced at the end of the process + * - Source names always ends in / to easy infering matches + * + * Possible strings (using $ for interponated values) + * + * Connection + * - NConnection: $DB_TYPE:$DB_NAME/ + * - NDB (NConnection alias): $DB_TYPE:DB_$NAME/ + * + * Source of data: + * - NTable: $DB_TYPE:DB_$NAME/table:$NAME/ + * - NTable (with alias): $DB_TYPE:DB_$NAME/table:$NAME/alias:$ALIAS/ + * - NView: $DB_TYPE:DB_$NAME/view:$NAME/ + * - NView (with alias): $DB_TYPE:DB_$NAME/view:$NAME/alias:$ALIAS/ + * - NValues: $DB_TYPE:DB_$NAME/values:$NAME/ + * - NValues (with alias): $DB_TYPE:DB_$NAME/values:$NAME/alias:$ALIAS/ + * - NWith: $DB_TYPE:DB_$NAME/with:$NAME/ + * - NWith (with alias): $DB_TYPE:DB_$NAME/with:$NAME/alias:$ALIAS/ + * + * Source of data (for left join): + * - NTable: $DB_TYPE:DB_$NAME/leftJoin-table:$NAME/ + * - NTable (with alias): $DB_TYPE:DB_$NAME/leftJoin-table:$NAME/alias:$ALIAS/ + * - NView: $DB_TYPE:DB_$NAME/leftJoin-view:$NAME/ + * - NView (with alias): $DB_TYPE:DB_$NAME/leftJoin-view:$NAME/alias:$ALIAS/ + * - NValues: $DB_TYPE:DB_$NAME/leftJoin-values:$NAME/ + * - NValues (with alias): $DB_TYPE:DB_$NAME/leftJoin-values:$NAME/alias:$ALIAS/ + * - NWith: $DB_TYPE:DB_$NAME/leftJoin-with:$NAME/ + * - NWith (with alias): $DB_TYPE:DB_$NAME/leftJoin-with:$NAME/alias:$ALIAS/ + * + * Special source of data: + * - NNoTableOrViewRequired: $DB_TYPE:DB_$NAME/noTableOrViewRequired/ + * - NOldValues: $DB_TYPE:DB_$NAME/oldValues:$NAME/ + * - NValuesForInsert: $DB_TYPE:DB_$NAME/valuesForInsert:$NAME/ + * - NRecursive: $DB_TYPE:DB_$NAME/recursive/ + * - NCompoundable (select): $DB_TYPE:DB_$NAME/compoundable/ + * + * Customized tables or views: + * The original $NAME will be extended with +customizedAs~$CUSTOMIZATION_NAME + */ +export type NDbType ='mariaDB' | 'mySql' | 'noopDB' | 'oracle' | 'postgreSql' | 'sqlite' | 'sqlServer' +export type NGetDBTypeFrom = SOURCE extends `${infer DB_TYPE extends NDbType}:${any}` ? DB_TYPE : never // Not ended to match any +export type NGetDBNameFrom = SOURCE extends `${NDbType}:${infer DB_NAME}/${any}` ? DB_NAME : never // Not ended to match any +export type NConnection = `${DB_TYPE}:${DB_NAME}/` +export type NDBWithType = `${DB_TYPE}:${any}` // Not ended to match any +export type NDB = string // NDBConnection +export type NGetDBFrom = SOURCE extends `${infer DB_TYPE extends NDbType}:${infer NAME}/${any}` ? NConnection : never // Not ended to match any +export type NWithDB = `${DB}${any}` // Not ended to match any +export type NWithSameDB = `${NGetDBFrom}${any}` // Not ended to match any +export type NTable = `${DB}table:${NAME}/` +/** deprecated */ +export type NTableOf<_DB extends string /* IDB */, _NAME extends string> = string // NTable<_DB, _NAME> +export type NView = `${DB}view:${NAME}/` +export type NValues = `${DB}values:${NAME}/` +export type NWith = `${DB}with:${NAME}/` +export type NWithFrom = NWith, NAME> +export type NAlias = `${SOURCE}alias:${ALIAS}/` +export type NMaybyAliased = `${SOURCE}${any}` // Not ended to match any +export type NNoTableOrViewRequired = `${DB}noTableOrViewRequired/` +export type NAnyNoTableOrViewRequired = `${any}/noTableOrViewRequired/` +export type NNoTableOrViewRequiredFrom = NNoTableOrViewRequired> +export type NOldValues = `${DB}oldValues:${NAME}/` +export type NOldValuesFrom = NOldValues, NGetNameFrom> +export type NValuesForInsert = `${DB}valuesForInsert:${NAME}/` +export type NValuesForInsertFrom = NValuesForInsert, NGetNameFrom> +export type NRecursive = `${DB}recursive/` +export type NRecursiveFrom = NRecursive> +export type NCompoundable = `${DB}compoundable/` +export type NCompoundableFrom = NRecursive> +export type NSource = string // Combines all source type in table, view, values, etc. +export type NType = 'table' | 'view' | 'values' | 'with' /* Specia types with name: */ | 'oldValues' | 'valuesForInsert' +export type NJoinType = 'leftJoin' +export type NGetNameFrom = + SOURCE extends `${NDbType}:${any}/${NType}:${infer NAME}/${any}` + ? NAME + : SOURCE extends `${NDbType}:${any}/${NJoinType}-${NType}:${infer NAME}/${any}` + ? NAME + : never + // Not ended to match any +export type NAsLeftJoin = SOURCE extends `${infer DB_TYPE extends NDbType}:${infer DB_NAME}/${infer REST}` ? `${DB_TYPE}:${DB_NAME}/leftJoin-${REST}` : never // Not ended to match any +export type NAnyLeftJoin = `${any}/leftJoin-${any}` // Not ended to match any +export type NCustomizeAs = + SOURCE extends `${infer DB_TYPE extends NDbType}:${infer DB_NAME}/${infer TYPE extends NType}:${infer NAME}/${infer REST}` + ? `${DB_TYPE}:${DB_NAME}/${TYPE}:${NAME}+customizedAs~${CUSTOMIZATION_NAME}/${REST}` + : SOURCE extends `${infer DB_TYPE extends NDbType}:${infer DB_NAME}/${infer JOIN_TYPE extends NJoinType}-${infer TYPE extends NType}:${infer NAME}/${infer REST}` + ? `${DB_TYPE}:${DB_NAME}/${JOIN_TYPE}-${TYPE}:${NAME}+customizedAs~${CUSTOMIZATION_NAME}/${REST}` + : never + // Not ended to match any \ No newline at end of file diff --git a/src/utils/symbols.ts b/src/utils/symbols.ts index 9d5c736f..0c4f710a 100644 --- a/src/utils/symbols.ts +++ b/src/utils/symbols.ts @@ -2,37 +2,23 @@ * All symbols defined here are expected to don't have value */ +export const connection: unique symbol = Symbol('connection') +export const source: unique symbol = Symbol('source') +export const from: unique symbol = Symbol('from') +export const using: unique symbol = Symbol('using') + // Type marks export const isValueSourceObject: unique symbol = Symbol('isValueSourceObject') +export const isTableOrViewObject: unique symbol = Symbol('isTableOrViewObject') export const isColumnObject: unique symbol = Symbol('isColumnObject') export const isSelectQueryObject: unique symbol = Symbol('isSelectQueryObject') // General Symbols export const type: unique symbol = Symbol('type') -export const database: unique symbol = Symbol('database') -export const tableOrView: unique symbol = Symbol('tableOrView') -export const tableOrViewRef: unique symbol = Symbol('tableOrViewRef') -export const tableOrViewRefType: unique symbol = Symbol('tableOrViewRef') -export const tableOrViewCustomName: unique symbol = Symbol('tableOrViewCustomName') export const resultType: unique symbol = Symbol('resultType') export const columnsType: unique symbol = Symbol('columnsType') +export const selectColumnsType: unique symbol = Symbol('selectColumnsType') export const compoundableColumns: unique symbol = Symbol('compoundableColumns') -export const rawFragment: unique symbol = Symbol('rawFragment') -export const resolvedShape: unique symbol = Symbol('resolvedShape') - -// Expressions -export const requiredTableOrView: unique symbol = Symbol('requiredTableOrView') - -// Tables or Views -export const tableName: unique symbol = Symbol('tableName') -export const viewName: unique symbol = Symbol('viewName') -export const tableOrViewAlias: unique symbol = Symbol('tableOrViewAlias') -export const noTableOrViewRequired: unique symbol = Symbol('noTableOrViewRequiredType') -export const outerJoinDatabase: unique symbol = Symbol('outerJoinDatabase') -export const outerJoinTableOrView: unique symbol = Symbol('outerJoinTableOrView') -export const outerJoinAlias: unique symbol = Symbol('outerJoinAlias') -export const oldValues: unique symbol = Symbol('oldValues') -export const valuesForInsert: unique symbol = Symbol('valuesForInsert') // Columns export const valueType: unique symbol = Symbol('valueType') @@ -43,44 +29,28 @@ export const autogeneratedPrimaryKeyValue: unique symbol = Symbol('autogenerated export const primaryKeyValue: unique symbol = Symbol('primaryKeyValue') export const computedValue: unique symbol = Symbol('computedValue') -// Connection -export const databaseName: unique symbol = Symbol('databaseName') - -// Database type -export const anyDBType: unique symbol = Symbol('anyDBType') -export const mariaDBType: unique symbol = Symbol('mariaDBType') -export const mySqlType: unique symbol = Symbol('mySqlType') -export const noopDBType: unique symbol = Symbol('noopDBType') -export const oracleType: unique symbol = Symbol('oracleType') -export const postgreSqlType: unique symbol = Symbol('postgreSqlType') -export const sqliteType: unique symbol = Symbol('sqliteType') -export const sqlServerType: unique symbol = Symbol('sqlServerType') - -export const nextMethodNotSupportedByThisConnection: unique symbol = Symbol('nextMethodNotSupportedByThisConnection') - // Value source type -export const valueSourceType: unique symbol = Symbol('valueSourceType') -export const valueSourceTypeName: unique symbol = Symbol('valueSourceTypeName') -export const nullableValueSourceType: unique symbol = Symbol('nullableValueSourceType') -export const equalableValueSourceType: unique symbol = Symbol('equalableValueSourceType') -export const comparableValueSourceType: unique symbol = Symbol('comparableValueSourceType') -export const booleanValueSourceType: unique symbol = Symbol('booleanValueSourceType') -export const ifValueSourceType: unique symbol = Symbol('ifValueSourceType') -export const anyBooleanValueSourceType: unique symbol = Symbol('anyBooleanValueSourceType') -export const numberValueSourceType: unique symbol = Symbol('numberValueSourceType') -export const bigintValueSourceType: unique symbol = Symbol('bigintValueSourceType') -export const customIntValueSourceType: unique symbol = Symbol('customIntValueSourceType') -export const customDoubleValueSourceType: unique symbol = Symbol('customDoubleValueSourceType') -export const stringValueSourceType: unique symbol = Symbol('stringValueSourceType') -export const uuidValueSourceType: unique symbol = Symbol('uuidValueSourceType') -export const customUuidValueSourceType: unique symbol = Symbol('customUuidValueSourceType') -export const localDateValueSourceType: unique symbol = Symbol('dateValueSourceType') -export const localTimeValueSourceType: unique symbol = Symbol('timeValueSourceType') -export const localDateTimeValueSourceType: unique symbol = Symbol('dateTimeValueSourceType') -export const customLocalDateValueSourceType: unique symbol = Symbol('customLocalDateValueSourceType') -export const customLocalTimeValueSourceType: unique symbol = Symbol('customLocalTimeValueSourceType') -export const customLocalDateTimeValueSourceType: unique symbol = Symbol('customLocalDateTimeValueSourceType') -export const aggregatedArrayValueSourceType: unique symbol = Symbol('aggregatedArrayValueSourceType') +export const typeName: unique symbol = Symbol('typeName') +export const nullableValueSource: unique symbol = Symbol('nullableValueSource') +export const equalableValueSource: unique symbol = Symbol('equalableValueSource') +export const comparableValueSource: unique symbol = Symbol('comparableValueSource') +export const booleanValueSource: unique symbol = Symbol('booleanValueSource') +export const ifValueSource: unique symbol = Symbol('ifValueSource') +export const anyBooleanValueSource: unique symbol = Symbol('anyBooleanValueSource') +export const numberValueSource: unique symbol = Symbol('numberValueSource') +export const bigintValueSource: unique symbol = Symbol('bigintValueSource') +export const customIntValueSource: unique symbol = Symbol('customIntValueSource') +export const customDoubleValueSource: unique symbol = Symbol('customDoubleValueSource') +export const stringValueSource: unique symbol = Symbol('stringValueSource') +export const uuidValueSource: unique symbol = Symbol('uuidValueSource') +export const customUuidValueSource: unique symbol = Symbol('customUuidValueSource') +export const localDateValueSource: unique symbol = Symbol('dateValueSource') +export const localTimeValueSource: unique symbol = Symbol('timeValueSource') +export const localDateTimeValueSource: unique symbol = Symbol('dateTimeValueSource') +export const customLocalDateValueSource: unique symbol = Symbol('customLocalDateValueSource') +export const customLocalTimeValueSource: unique symbol = Symbol('customLocalTimeValueSource') +export const customLocalDateTimeValueSource: unique symbol = Symbol('customLocalDateTimeValueSource') +export const aggregatedArrayValueSource: unique symbol = Symbol('aggregatedArrayValueSource') // Opaque types export const dontCallConstructor: unique symbol = Symbol('dontCallConstructor') diff --git a/src/utils/tableOrViewUtils.ts b/src/utils/tableOrViewUtils.ts index 02b4786f..52ef0843 100644 --- a/src/utils/tableOrViewUtils.ts +++ b/src/utils/tableOrViewUtils.ts @@ -1,22 +1,38 @@ -import type { CUSTOMIZED_TABLE_OR_VIEW, ITable, ITableOrView, IView, IWithView, OuterJoinSource, TableOrViewAlias, TABLE_OR_VIEW_ALIAS, ITableOrViewRef, OLD, OldTableOrView, OUTER_JOIN_SOURCE, ITableOrViewOuterJoin, VALUES_FOR_INSERT, ValuesForInsertTableOrView, IValues, ResolvedShape } from "./ITableOrView" -import type { AnyValueSource, IValueSource, RemapValueSourceType, RemapValueSourceTypeWithOptionalType, ValueSourceOf, ValueSourceValueType } from "../expressions/values" -import type { tableOrViewRef, type, viewName } from "./symbols" -import type { AnyDB } from "../databases" +import type { ITable, ITableOrView, IView, IWithView, IValues, ResolvedShape, OldValues, ValuesForInsert, ForUseInLeftJoin, HasSource, ITableOrViewAlias } from "./ITableOrView" +import type { AnyValueSource, IValueSource, RemapValueSourceType, RemapValueSourceTypeWithOptionalType, ValueSourceValueType } from "../expressions/values" +import type { source } from "./symbols" import type { Column, ColumnWithDefaultValue, ComputedColumn, ExtractColumnInfo, OptionalColumn, PrimaryKeyAutogeneratedColumn } from "./Column" +import type { NAlias, NAsLeftJoin, NCustomizeAs, NGetDBFrom, NGetNameFrom, NOldValues, NSource, NValuesForInsert } from "./sourceName" + +export type ColumnsKeyOf = ({ [K in keyof T]-?: T[K] extends AnyValueSource & Column ? K : never })[keyof T] +type ValueSourcesKeyOf = ({ [K in keyof T]-?: T[K] extends AnyValueSource ? K : never })[keyof T] +type RemapValueSourceTypeInWithColumnInfo, SOURCE extends NSource> = { [K in ValueSourcesKeyOf]: RemapValueSourceType & ExtractColumnInfo } +type RemapValueSourceTypeIn, SOURCE extends NSource> = { [K in ValueSourcesKeyOf]: RemapValueSourceType } + +// old values preserve the column info (only tables have them) +export type AsOldValues> = RemapValueSourceTypeInWithColumnInfo, NGetNameFrom>> & OldValues, NGetNameFrom>> +// values for insert preserve the column info (only tables have them) +export type AsValuesForInsert> = RemapValueSourceTypeInWithColumnInfo, NGetNameFrom>> & ValuesForInsert, NGetNameFrom>> +// alias doesn't preserve the column info (only tables have them) +export type AliasedTableOrView, ALIAS extends string> = RemapValueSourceTypeIn> & ITableOrViewAlias< NAlias> + +// left join doesn't preserve the column info +export type AsForUseInLeftJoin> = RemapValueSourceTypeInForLeftJoin> & ForUseInLeftJoin> +export type AsAliasedForUseInLeftJoin, ALIAS extends string> = RemapValueSourceTypeInForLeftJoin, ALIAS>> & ForUseInLeftJoin, ALIAS>> +type RemapValueSourceTypeInForLeftJoin, SOURCE extends NSource> = { [K in ValueSourcesKeyOf]: RemapValueSourceTypeWithOptionalType> } +type OptionalTypeForLeftJoin = + TYPE extends IValueSource ? ( + 'required' extends OPTIONAL_TYPE + ? 'originallyRequired' + : OPTIONAL_TYPE + ) : never -export type ColumnsOf> = ({ [K in keyof TABLE_OR_VIEW]-?: TABLE_OR_VIEW[K] extends ValueSourceOf & Column ? K : never })[keyof TABLE_OR_VIEW] -type ValueSourcesOf = ({ [K in keyof TABLE_OR_VIEW]-?: TABLE_OR_VIEW[K] extends AnyValueSource ? K : never })[keyof TABLE_OR_VIEW] - -export type OldValues> = { [K in ValueSourcesOf]: RemapValueSourceType, TABLE_OR_VIEW[K]> & ExtractColumnInfo } & OldTableOrView - -export type ValuesForInsert> = { [K in ValueSourcesOf]: RemapValueSourceType, TABLE_OR_VIEW[K]> & ExtractColumnInfo } & ValuesForInsertTableOrView +export type FromRef, REF extends HasSource> = { [K in ValueSourcesKeyOf]: RemapValueSourceType & ExtractColumnInfo } & REF -export type AliasedTableOrView, ALIAS> = { [K in ValueSourcesOf]: RemapValueSourceType, TABLE_OR_VIEW[K]> & ExtractColumnInfo } & TableOrViewAlias -export type TableOrViewWithRef, REF extends ITableOrViewRef> = { [K in ValueSourcesOf]: RemapValueSourceType & ExtractColumnInfo } & ITableOrView /* * This solution don't expose the inner objects in a with because typescript get frozen (see commented implementation in resultUsitls) */ -type WithViewColumns, COLUMNS> = { [K in ValueSourcesOf]: RemapValueSourceTypeWithOptionalType> & Column} & TABLE_OR_VIEW +type WithViewColumns = { [K in ValueSourcesKeyOf]: RemapValueSourceTypeWithOptionalType> & Column} type WithOptionalTypeOf = TYPE extends IValueSource ? ( @@ -25,61 +41,32 @@ type WithOptionalTypeOf = : 'optional' ) : never -// Outer join doesn't preserve the column info -export type OuterJoinSourceOf, ALIAS> = { [K in ValueSourcesOf]: RemapValueSourceTypeWithOptionalType, TABLE_OR_VIEW[K], OuterOptionalTypeOf> } & OuterJoinSource -export type OuterJoinTableOrView, ALIAS> = { [K in ValueSourcesOf]: RemapValueSourceTypeWithOptionalType, TABLE_OR_VIEW[K], OuterOptionalTypeOf> } & ITableOrViewOuterJoin -type OuterOptionalTypeOf = - TYPE extends IValueSource ? ( - 'required' extends OPTIONAL_TYPE - ? 'originallyRequired' - : OPTIONAL_TYPE - ) : never - -export interface WITH_VIEW extends ITableOrViewRef { - [viewName]: NAME - [type]: 'with' -} - type AddAliasMethods> = T & { as(as: ALIAS): AliasedTableOrView - forUseInLeftJoin(): OuterJoinSourceOf - forUseInLeftJoinAs(as: ALIAS): OuterJoinSourceOf + forUseInLeftJoin(): AsForUseInLeftJoin + forUseInLeftJoinAs(as: ALIAS): AsAliasedForUseInLeftJoin } -export type WithView, COLUMNS> = AddAliasMethods, COLUMNS>> - -type CustomizedTableOrViewType, REF extends ITableOrViewRef> = - TABLE_OR_VIEW extends TableOrViewAlias ? ( - T extends ITable ? TableOrViewAlias, ALIAS> - : T extends IView ? TableOrViewAlias, ALIAS> - : T extends IWithView ? TableOrViewAlias, ALIAS> - : T extends IValues ? TableOrViewAlias, ALIAS> - : never - ) - : TABLE_OR_VIEW extends ITable ? ITable - : TABLE_OR_VIEW extends IView ? IView - : TABLE_OR_VIEW extends IWithView ? IWithView - : TABLE_OR_VIEW extends IValues ? IValues - : never - -type CustomizedTableOrViewRefFor, NAME> = - TABLE_OR_VIEW[typeof tableOrViewRef] extends TABLE_OR_VIEW_ALIAS ? TABLE_OR_VIEW_ALIAS, ALIAS> - : CUSTOMIZED_TABLE_OR_VIEW +export type WithView = AddAliasMethods & IWithView> -type CustomizedTableOrViewRefForWitNoAlias, NAME> = - TABLE_OR_VIEW[typeof tableOrViewRef] extends TABLE_OR_VIEW_ALIAS ? CUSTOMIZED_TABLE_OR_VIEW - : CUSTOMIZED_TABLE_OR_VIEW +type CustomizedTableOrViewType, SOURCE extends NSource> = + T extends ITableOrViewAlias ? ITableOrViewAlias + : T extends ITable ? ITable + : T extends IView ? IView + : T extends IWithView ? IWithView + : T extends IValues ? IValues + : never -type CustomizedTableOrViewNoAliasable, NAME> = { [K in ValueSourcesOf]: RemapValueSourceType, TABLE_OR_VIEW[K]> } & CustomizedTableOrViewType> +type CustomizedTableOrViewNoAliasable, SOURCE extends string> = { [K in ValueSourcesKeyOf]: RemapValueSourceType } & CustomizedTableOrViewType -export type CustomizedTableOrView, NAME extends string> = +export type CustomizedTableOrView, CUSTOMIZATION_NAME extends string> = (T extends {as(as: any): any} - ? AddAliasMethods> - : CustomizedTableOrViewNoAliasable + ? AddAliasMethods>> + : CustomizedTableOrViewNoAliasable> ) & { /* added to avoid typescript expansion type, generating better error messages */ } -export type AutogeneratedPrimaryKeyColumnsTypesOf> = ({ [K in keyof T]-?: - T[K] extends ValueSourceOf & Column +export type AutogeneratedPrimaryKeyColumnsTypesOf = ({ [K in keyof T]-?: + T[K] extends AnyValueSource & Column ? ( T[K] extends ComputedColumn ? never @@ -89,24 +76,24 @@ export type AutogeneratedPrimaryKeyColumnsTypesOf> = ) : never })[keyof T] -export type ColumnsForSetOfWithShape
, SHAPE> = - SHAPE extends ResolvedShape
+export type ColumnsForSetOfWithShape = + SHAPE extends ResolvedShape ? ColumnsForSetOf : ColumnsForSetOf
-export type ColumnsForSetOf> = ({ [K in keyof TYPE]-?: - TYPE[K] extends ValueSourceOf & Column +export type ColumnsForSetOf = ({ [K in keyof TYPE]-?: + TYPE[K] extends AnyValueSource & Column ? (TYPE[K] extends ComputedColumn ? never : K) : never })[keyof TYPE] -export type RequiredColumnsForSetOfWithShape
, SHAPE> = - SHAPE extends ResolvedShape
+export type RequiredColumnsForSetOfWithShape = + SHAPE extends ResolvedShape ? RequiredColumnsForSetOf : RequiredColumnsForSetOf
-export type RequiredColumnsForSetOf> = ({ [K in keyof T]-?: - T[K] extends ValueSourceOf & Column +export type RequiredColumnsForSetOf = ({ [K in keyof T]-?: + T[K] extends AnyValueSource & Column ? ( T[K] extends ComputedColumn ? never @@ -118,13 +105,13 @@ export type RequiredColumnsForSetOf> = ({ [K in keyo ) : never })[keyof T] -export type OptionalColumnsForSetOfWithShape
, SHAPE> = - SHAPE extends ResolvedShape
+export type OptionalColumnsForSetOfWithShape = + SHAPE extends ResolvedShape ? OptionalColumnsForSetOf : OptionalColumnsForSetOf
-export type OptionalColumnsForSetOf> = ({ [K in keyof T]-?: - T[K] extends ValueSourceOf & Column +export type OptionalColumnsForSetOf = ({ [K in keyof T]-?: + T[K] extends AnyValueSource & Column ? ( T[K] extends ComputedColumn ? never @@ -136,6 +123,6 @@ export type OptionalColumnsForSetOf> = ({ [K in keyo ) : never })[keyof T] -export type ResolveShape, SHAPE extends {}> = { +export type ResolveShape, SHAPE extends {}> = { [P in keyof SHAPE]: SHAPE[P] extends keyof T ? T[SHAPE[P]] : SHAPE[P] -} & ResolvedShape +} & ResolvedShape