@rvoh/dream 2.13.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/Dream.js +4 -4
- package/dist/cjs/src/dream/QueryDriver/Kysely.js +56 -22
- package/dist/cjs/src/helpers/range.js +1 -1
- package/dist/esm/src/Dream.js +4 -4
- package/dist/esm/src/dream/QueryDriver/Kysely.js +56 -22
- package/dist/esm/src/helpers/range.js +1 -1
- package/dist/types/src/Dream.d.ts +4 -4
- package/dist/types/src/db/migration-helpers/DreamMigrationHelpers.d.ts +3 -3
- package/dist/types/src/dream/QueryDriver/Kysely.d.ts +11 -0
- package/dist/types/src/types/utils.d.ts +1 -1
- package/dist/types/src/types/utils.ts +1 -1
- package/dist/types/src/types/variadic.d.ts +1 -1
- package/dist/types/src/types/variadic.ts +1 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/classes/db.DreamMigrationHelpers.html +9 -9
- package/docs/classes/db.KyselyQueryDriver.html +32 -32
- package/docs/classes/db.PostgresQueryDriver.html +33 -33
- package/docs/classes/db.QueryDriverBase.html +31 -31
- package/docs/classes/errors.CheckConstraintViolation.html +3 -3
- package/docs/classes/errors.ColumnOverflow.html +3 -3
- package/docs/classes/errors.CreateOrFindByFailedToCreateAndFind.html +3 -3
- package/docs/classes/errors.DataIncompatibleWithDatabaseField.html +3 -3
- package/docs/classes/errors.DataTypeColumnTypeMismatch.html +3 -3
- package/docs/classes/errors.DecryptionError.html +2 -2
- package/docs/classes/errors.DecryptionParseError.html +2 -2
- package/docs/classes/errors.DecryptionRotationError.html +3 -3
- package/docs/classes/errors.GlobalNameNotSet.html +3 -3
- package/docs/classes/errors.InvalidCalendarDate.html +2 -2
- package/docs/classes/errors.InvalidClockTime.html +2 -2
- package/docs/classes/errors.InvalidClockTimeTz.html +2 -2
- package/docs/classes/errors.InvalidDateTime.html +2 -2
- package/docs/classes/errors.MissingSerializersDefinition.html +3 -3
- package/docs/classes/errors.NonLoadedAssociation.html +3 -3
- package/docs/classes/errors.NotNullViolation.html +3 -3
- package/docs/classes/errors.RecordNotFound.html +3 -3
- package/docs/classes/errors.ValidationError.html +3 -3
- package/docs/classes/index.CalendarDate.html +33 -33
- package/docs/classes/index.ClockTime.html +32 -32
- package/docs/classes/index.ClockTimeTz.html +35 -35
- package/docs/classes/index.DateTime.html +86 -86
- package/docs/classes/index.Decorators.html +19 -19
- package/docs/classes/index.Dream.html +118 -118
- package/docs/classes/index.DreamApp.html +5 -5
- package/docs/classes/index.DreamTransaction.html +2 -2
- package/docs/classes/index.Env.html +2 -2
- package/docs/classes/index.Query.html +57 -57
- package/docs/classes/system.CliFileWriter.html +4 -4
- package/docs/classes/system.DreamBin.html +2 -2
- package/docs/classes/system.DreamCLI.html +7 -7
- package/docs/classes/system.DreamImporter.html +2 -2
- package/docs/classes/system.DreamLogos.html +2 -2
- package/docs/classes/system.DreamSerializerBuilder.html +11 -11
- package/docs/classes/system.ObjectSerializerBuilder.html +8 -8
- package/docs/classes/system.PathHelpers.html +3 -3
- package/docs/classes/utils.Encrypt.html +3 -3
- package/docs/classes/utils.Range.html +2 -2
- package/docs/functions/db.closeAllDbConnections.html +1 -1
- package/docs/functions/db.dreamDbConnections.html +1 -1
- package/docs/functions/db.untypedDb.html +1 -1
- package/docs/functions/db.validateColumn.html +1 -1
- package/docs/functions/db.validateTable.html +1 -1
- package/docs/functions/errors.pgErrorType.html +1 -1
- package/docs/functions/index.DreamSerializer.html +1 -1
- package/docs/functions/index.ObjectSerializer.html +1 -1
- package/docs/functions/index.ReplicaSafe.html +1 -1
- package/docs/functions/index.STI.html +1 -1
- package/docs/functions/index.SoftDelete.html +1 -1
- package/docs/functions/utils.camelize.html +1 -1
- package/docs/functions/utils.capitalize.html +1 -1
- package/docs/functions/utils.cloneDeepSafe.html +1 -1
- package/docs/functions/utils.compact.html +1 -1
- package/docs/functions/utils.groupBy.html +1 -1
- package/docs/functions/utils.hyphenize.html +1 -1
- package/docs/functions/utils.intersection.html +1 -1
- package/docs/functions/utils.isEmpty.html +1 -1
- package/docs/functions/utils.normalizeUnicode.html +1 -1
- package/docs/functions/utils.pascalize.html +1 -1
- package/docs/functions/utils.percent.html +1 -1
- package/docs/functions/utils.range.html +1 -1
- package/docs/functions/utils.round.html +1 -1
- package/docs/functions/utils.sanitizeString.html +1 -1
- package/docs/functions/utils.snakeify.html +1 -1
- package/docs/functions/utils.sort.html +1 -1
- package/docs/functions/utils.sortBy.html +1 -1
- package/docs/functions/utils.sortObjectByKey.html +1 -1
- package/docs/functions/utils.sortObjectByValue.html +1 -1
- package/docs/functions/utils.uncapitalize.html +1 -1
- package/docs/functions/utils.uniq.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/openapi.OpenapiDescription.html +2 -2
- package/docs/interfaces/openapi.OpenapiSchemaProperties.html +1 -1
- package/docs/interfaces/openapi.OpenapiSchemaPropertiesShorthand.html +1 -1
- package/docs/interfaces/openapi.OpenapiTypeFieldObject.html +1 -1
- package/docs/interfaces/types.BelongsToStatement.html +2 -2
- package/docs/interfaces/types.DecoratorContext.html +2 -2
- package/docs/interfaces/types.DreamAppInitOptions.html +2 -2
- package/docs/interfaces/types.DreamAppOpts.html +2 -2
- package/docs/interfaces/types.DreamDbConfig.html +5 -5
- package/docs/interfaces/types.DurationObject.html +2 -2
- package/docs/interfaces/types.EncryptOptions.html +2 -2
- package/docs/interfaces/types.InternalAnyTypedSerializerRendersMany.html +2 -2
- package/docs/interfaces/types.InternalAnyTypedSerializerRendersOne.html +2 -2
- package/docs/interfaces/types.SerializerRendererOpts.html +2 -2
- package/docs/types/openapi.CommonOpenapiSchemaObjectFields.html +1 -1
- package/docs/types/openapi.OpenapiAllTypes.html +1 -1
- package/docs/types/openapi.OpenapiFormats.html +1 -1
- package/docs/types/openapi.OpenapiNumberFormats.html +1 -1
- package/docs/types/openapi.OpenapiPrimitiveBaseTypes.html +1 -1
- package/docs/types/openapi.OpenapiPrimitiveTypes.html +1 -1
- package/docs/types/openapi.OpenapiSchemaArray.html +1 -1
- package/docs/types/openapi.OpenapiSchemaArrayShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBase.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBody.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBodyShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaCommonFields.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionAllOf.html +2 -2
- package/docs/types/openapi.OpenapiSchemaExpressionAnyOf.html +2 -2
- package/docs/types/openapi.OpenapiSchemaExpressionOneOf.html +2 -2
- package/docs/types/openapi.OpenapiSchemaExpressionRef.html +2 -2
- package/docs/types/openapi.OpenapiSchemaExpressionRefSchemaShorthand.html +2 -2
- package/docs/types/openapi.OpenapiSchemaInteger.html +1 -1
- package/docs/types/openapi.OpenapiSchemaNull.html +2 -2
- package/docs/types/openapi.OpenapiSchemaNumber.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObject.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAllOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAllOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAnyOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectBase.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectBaseShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectOneOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectOneOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaPrimitiveGeneric.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionAllOf.html +2 -2
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionAnyOf.html +2 -2
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionOneOf.html +2 -2
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializableRef.html +2 -2
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializerRef.html +2 -2
- package/docs/types/openapi.OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
- package/docs/types/openapi.OpenapiSchemaString.html +1 -1
- package/docs/types/openapi.OpenapiShorthandAllTypes.html +1 -1
- package/docs/types/openapi.OpenapiShorthandPrimitiveBaseTypes.html +1 -1
- package/docs/types/openapi.OpenapiShorthandPrimitiveTypes.html +1 -1
- package/docs/types/openapi.OpenapiTypeField.html +1 -1
- package/docs/types/system.DreamAppAllowedPackageManagersEnum.html +1 -1
- package/docs/types/types.CalendarDateDurationUnit.html +1 -1
- package/docs/types/types.CalendarDateObject.html +1 -1
- package/docs/types/types.Camelized.html +1 -1
- package/docs/types/types.ClockTimeObject.html +1 -1
- package/docs/types/types.DbConnectionType.html +1 -1
- package/docs/types/types.DbTypes.html +1 -1
- package/docs/types/types.DreamAssociationMetadata.html +1 -1
- package/docs/types/types.DreamAttributes.html +1 -1
- package/docs/types/types.DreamClassAssociationAndStatement.html +1 -1
- package/docs/types/types.DreamClassColumn.html +1 -1
- package/docs/types/types.DreamColumn.html +1 -1
- package/docs/types/types.DreamColumnNames.html +1 -1
- package/docs/types/types.DreamLogLevel.html +1 -1
- package/docs/types/types.DreamLogger.html +2 -2
- package/docs/types/types.DreamModelSerializerType.html +1 -1
- package/docs/types/types.DreamOrViewModelClassSerializerKey.html +1 -1
- package/docs/types/types.DreamOrViewModelSerializerKey.html +1 -1
- package/docs/types/types.DreamParamSafeAttributes.html +1 -1
- package/docs/types/types.DreamParamSafeColumnNames.html +1 -1
- package/docs/types/types.DreamSerializable.html +1 -1
- package/docs/types/types.DreamSerializableArray.html +1 -1
- package/docs/types/types.DreamSerializerKey.html +1 -1
- package/docs/types/types.DreamSerializers.html +1 -1
- package/docs/types/types.DreamVirtualColumns.html +1 -1
- package/docs/types/types.DurationUnit.html +1 -1
- package/docs/types/types.EncryptAlgorithm.html +1 -1
- package/docs/types/types.HasManyStatement.html +1 -1
- package/docs/types/types.HasOneStatement.html +1 -1
- package/docs/types/types.Hyphenized.html +1 -1
- package/docs/types/types.Pascalized.html +1 -1
- package/docs/types/types.PrimaryKeyType.html +1 -1
- package/docs/types/types.RoundingPrecision.html +1 -1
- package/docs/types/types.SerializerCasing.html +1 -1
- package/docs/types/types.SimpleObjectSerializerType.html +1 -1
- package/docs/types/types.Snakeified.html +1 -1
- package/docs/types/types.StrictInterface.html +1 -1
- package/docs/types/types.UpdateableAssociationProperties.html +1 -1
- package/docs/types/types.UpdateableProperties.html +1 -1
- package/docs/types/types.ValidationType.html +1 -1
- package/docs/types/types.ViewModel.html +2 -2
- package/docs/types/types.ViewModelClass.html +1 -1
- package/docs/types/types.WeekdayName.html +1 -1
- package/docs/types/types.WhereStatementForDream.html +1 -1
- package/docs/types/types.WhereStatementForDreamClass.html +1 -1
- package/docs/variables/index.DreamConst.html +1 -1
- package/docs/variables/index.ops.html +1 -1
- package/docs/variables/openapi.openapiPrimitiveTypes.html +1 -1
- package/docs/variables/openapi.openapiShorthandPrimitiveTypes.html +1 -1
- package/docs/variables/system.DreamAppAllowedPackageManagersEnumValues.html +1 -1
- package/docs/variables/system.primaryKeyTypes.html +1 -1
- package/package.json +3 -2
package/dist/cjs/src/Dream.js
CHANGED
|
@@ -2020,10 +2020,10 @@ export default class Dream {
|
|
|
2020
2020
|
* // as: 'ratings',
|
|
2021
2021
|
* // polymorphic: true,
|
|
2022
2022
|
* // source: 'ratings',
|
|
2023
|
-
* //
|
|
2024
|
-
* //
|
|
2025
|
-
* //
|
|
2026
|
-
* //
|
|
2023
|
+
* // and: undefined,
|
|
2024
|
+
* // andNot: undefined,
|
|
2025
|
+
* // selfAnd: undefined,
|
|
2026
|
+
* // selfAndNot: undefined,
|
|
2027
2027
|
* // primaryKeyOverride: null,
|
|
2028
2028
|
* // primaryKey: [Function: primaryKey],
|
|
2029
2029
|
* // primaryKeyValue: [Function: primaryKeyValue],
|
|
@@ -1007,7 +1007,7 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1007
1007
|
joinAndStatements: query['innerJoinAndStatements'],
|
|
1008
1008
|
dreamClass: query['dreamClass'],
|
|
1009
1009
|
// As recursivelyJoin progresses through the chain of associations that
|
|
1010
|
-
// the developer has
|
|
1010
|
+
// the developer has included in a join statement (e.g. `leftJoinPreload('hello as ho', 'world as wd')`),
|
|
1011
1011
|
// previousTableAlias will be modified so that the join statement can properly reference
|
|
1012
1012
|
// what we are joining on. When an `associationQuery` is the start of a join, then `baseSqlAlias` is set,
|
|
1013
1013
|
// this is passed into the very beginning of recursivelyJoin.
|
|
@@ -1022,7 +1022,7 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1022
1022
|
joinAndStatements: query['leftJoinAndStatements'],
|
|
1023
1023
|
dreamClass: query['dreamClass'],
|
|
1024
1024
|
// As recursivelyJoin progresses through the chain of associations that
|
|
1025
|
-
// the developer has
|
|
1025
|
+
// the developer has included in a join statement (e.g. `leftJoinPreload('hello as ho', 'world as wd')`),
|
|
1026
1026
|
// previousTableAlias will be modified so that the join statement can properly reference
|
|
1027
1027
|
// what we are joining on. When an `associationQuery` is the start of a join, then `baseSqlAlias` is set,
|
|
1028
1028
|
// this is passed into the very beginning of recursivelyJoin.
|
|
@@ -1367,6 +1367,19 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1367
1367
|
namespaceColumn(column, alias = this.query['baseSqlAlias']) {
|
|
1368
1368
|
return namespaceColumn(column, alias);
|
|
1369
1369
|
}
|
|
1370
|
+
/**
|
|
1371
|
+
* @internal
|
|
1372
|
+
*
|
|
1373
|
+
* Builds the table expression passed to Kysely's `innerJoin`/`leftJoin` for an
|
|
1374
|
+
* association. When the alias already snakeifies to the table name, Kysely's
|
|
1375
|
+
* CamelCasePlugin emits the correct identifier from the alias alone, so no
|
|
1376
|
+
* explicit `as` clause is needed; otherwise we join the table aliased as `alias`.
|
|
1377
|
+
*
|
|
1378
|
+
* @returns A table expression string, e.g. `"beautiful_balloons as balloon"`
|
|
1379
|
+
*/
|
|
1380
|
+
aliasedJoinTableExpression(tableName, alias) {
|
|
1381
|
+
return snakeify(alias) === tableName ? alias : `${tableName} as ${alias}`;
|
|
1382
|
+
}
|
|
1370
1383
|
checkForQueryViolations() {
|
|
1371
1384
|
const invalidWhereNotClauses = this.similarityStatementBuilder().whereNotStatementsWithSimilarityClauses();
|
|
1372
1385
|
if (invalidWhereNotClauses.length) {
|
|
@@ -1502,12 +1515,19 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1502
1515
|
*/
|
|
1503
1516
|
joinsBridgeThroughAssociations({ query, dreamClassTheAssociationIsDefinedOn, throughAssociation,
|
|
1504
1517
|
/**
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
*
|
|
1508
|
-
*
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1518
|
+
* The table alias to use for the association being joined.
|
|
1519
|
+
*
|
|
1520
|
+
* When the join statement includes an explicit alias, e.g.
|
|
1521
|
+
* `leftJoinPreload('hello as ho', 'world as wd')`, explicitAlias is that
|
|
1522
|
+
* alias ('ho' for `hello`, 'wd' for `world`).
|
|
1523
|
+
*
|
|
1524
|
+
* When no explicit alias is given (e.g. `leftJoinPreload('hello', 'world')`),
|
|
1525
|
+
* `recursivelyJoin` passes the association name itself ('hello', 'world') as
|
|
1526
|
+
* the alias, so explicitAlias is still defined.
|
|
1527
|
+
*
|
|
1528
|
+
* explicitAlias is only `undefined` for the intermediate join tables that
|
|
1529
|
+
* `joinsBridgeThroughAssociations` synthesizes while bridging a `through`
|
|
1530
|
+
* association — those tables are never aliased by the developer.
|
|
1511
1531
|
*/
|
|
1512
1532
|
explicitAlias,
|
|
1513
1533
|
/**
|
|
@@ -1628,12 +1648,19 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1628
1648
|
}
|
|
1629
1649
|
applyOneJoin({ query, dreamClass, association,
|
|
1630
1650
|
/**
|
|
1631
|
-
*
|
|
1632
|
-
*
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1651
|
+
* The table alias to use for the association being joined.
|
|
1652
|
+
*
|
|
1653
|
+
* When the join statement includes an explicit alias, e.g.
|
|
1654
|
+
* `leftJoinPreload('hello as ho', 'world as wd')`, explicitAlias is that
|
|
1655
|
+
* alias ('ho' for `hello`, 'wd' for `world`).
|
|
1656
|
+
*
|
|
1657
|
+
* When no explicit alias is given (e.g. `leftJoinPreload('hello', 'world')`),
|
|
1658
|
+
* `recursivelyJoin` passes the association name itself ('hello', 'world') as
|
|
1659
|
+
* the alias, so explicitAlias is still defined.
|
|
1660
|
+
*
|
|
1661
|
+
* explicitAlias is only `undefined` for the intermediate join tables that
|
|
1662
|
+
* `joinsBridgeThroughAssociations` synthesizes while bridging a `through`
|
|
1663
|
+
* association — those tables are never aliased by the developer.
|
|
1637
1664
|
*/
|
|
1638
1665
|
explicitAlias,
|
|
1639
1666
|
/**
|
|
@@ -1672,12 +1699,19 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1672
1699
|
}
|
|
1673
1700
|
addAssociationJoinStatementToQuery({ query, dreamClass, association,
|
|
1674
1701
|
/**
|
|
1675
|
-
*
|
|
1676
|
-
*
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1679
|
-
*
|
|
1680
|
-
*
|
|
1702
|
+
* The table alias to use for the association being joined.
|
|
1703
|
+
*
|
|
1704
|
+
* When the join statement includes an explicit alias, e.g.
|
|
1705
|
+
* `leftJoinPreload('hello as ho', 'world as wd')`, explicitAlias is that
|
|
1706
|
+
* alias ('ho' for `hello`, 'wd' for `world`).
|
|
1707
|
+
*
|
|
1708
|
+
* When no explicit alias is given (e.g. `leftJoinPreload('hello', 'world')`),
|
|
1709
|
+
* `recursivelyJoin` passes the association name itself ('hello', 'world') as
|
|
1710
|
+
* the alias, so explicitAlias is still defined.
|
|
1711
|
+
*
|
|
1712
|
+
* explicitAlias is only `undefined` for the intermediate join tables that
|
|
1713
|
+
* `joinsBridgeThroughAssociations` synthesizes while bridging a `through`
|
|
1714
|
+
* association — those tables are never aliased by the developer.
|
|
1681
1715
|
*/
|
|
1682
1716
|
explicitAlias,
|
|
1683
1717
|
/**
|
|
@@ -1714,7 +1748,7 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1714
1748
|
leftJoinStatements: this.query['leftJoinStatements'],
|
|
1715
1749
|
});
|
|
1716
1750
|
const to = (dreamClassThroughAssociationWantsToHydrate ?? association.modelCB()).table;
|
|
1717
|
-
const joinTableExpression =
|
|
1751
|
+
const joinTableExpression = this.aliasedJoinTableExpression(to, currentTableAlias);
|
|
1718
1752
|
query = query[(joinType === 'inner' ? 'innerJoin' : 'leftJoin')](joinTableExpression, (join) => {
|
|
1719
1753
|
join = join.onRef(this.namespaceColumn(association.foreignKey(), previousTableAlias), '=', this.namespaceColumn(association.primaryKey(undefined, {
|
|
1720
1754
|
associatedClassOverride: dreamClassThroughAssociationWantsToHydrate,
|
|
@@ -1747,7 +1781,7 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1747
1781
|
}
|
|
1748
1782
|
else {
|
|
1749
1783
|
const to = association.modelCB().table;
|
|
1750
|
-
const joinTableExpression =
|
|
1784
|
+
const joinTableExpression = this.aliasedJoinTableExpression(to, currentTableAlias);
|
|
1751
1785
|
query = query[(joinType === 'inner' ? 'innerJoin' : 'leftJoin')](joinTableExpression, (join) => {
|
|
1752
1786
|
join = join.onRef(this.namespaceColumn(association.primaryKey(), previousTableAlias), '=', this.namespaceColumn(association.foreignKey(), currentTableAlias));
|
|
1753
1787
|
if (association.polymorphic) {
|
package/dist/esm/src/Dream.js
CHANGED
|
@@ -2020,10 +2020,10 @@ export default class Dream {
|
|
|
2020
2020
|
* // as: 'ratings',
|
|
2021
2021
|
* // polymorphic: true,
|
|
2022
2022
|
* // source: 'ratings',
|
|
2023
|
-
* //
|
|
2024
|
-
* //
|
|
2025
|
-
* //
|
|
2026
|
-
* //
|
|
2023
|
+
* // and: undefined,
|
|
2024
|
+
* // andNot: undefined,
|
|
2025
|
+
* // selfAnd: undefined,
|
|
2026
|
+
* // selfAndNot: undefined,
|
|
2027
2027
|
* // primaryKeyOverride: null,
|
|
2028
2028
|
* // primaryKey: [Function: primaryKey],
|
|
2029
2029
|
* // primaryKeyValue: [Function: primaryKeyValue],
|
|
@@ -1007,7 +1007,7 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1007
1007
|
joinAndStatements: query['innerJoinAndStatements'],
|
|
1008
1008
|
dreamClass: query['dreamClass'],
|
|
1009
1009
|
// As recursivelyJoin progresses through the chain of associations that
|
|
1010
|
-
// the developer has
|
|
1010
|
+
// the developer has included in a join statement (e.g. `leftJoinPreload('hello as ho', 'world as wd')`),
|
|
1011
1011
|
// previousTableAlias will be modified so that the join statement can properly reference
|
|
1012
1012
|
// what we are joining on. When an `associationQuery` is the start of a join, then `baseSqlAlias` is set,
|
|
1013
1013
|
// this is passed into the very beginning of recursivelyJoin.
|
|
@@ -1022,7 +1022,7 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1022
1022
|
joinAndStatements: query['leftJoinAndStatements'],
|
|
1023
1023
|
dreamClass: query['dreamClass'],
|
|
1024
1024
|
// As recursivelyJoin progresses through the chain of associations that
|
|
1025
|
-
// the developer has
|
|
1025
|
+
// the developer has included in a join statement (e.g. `leftJoinPreload('hello as ho', 'world as wd')`),
|
|
1026
1026
|
// previousTableAlias will be modified so that the join statement can properly reference
|
|
1027
1027
|
// what we are joining on. When an `associationQuery` is the start of a join, then `baseSqlAlias` is set,
|
|
1028
1028
|
// this is passed into the very beginning of recursivelyJoin.
|
|
@@ -1367,6 +1367,19 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1367
1367
|
namespaceColumn(column, alias = this.query['baseSqlAlias']) {
|
|
1368
1368
|
return namespaceColumn(column, alias);
|
|
1369
1369
|
}
|
|
1370
|
+
/**
|
|
1371
|
+
* @internal
|
|
1372
|
+
*
|
|
1373
|
+
* Builds the table expression passed to Kysely's `innerJoin`/`leftJoin` for an
|
|
1374
|
+
* association. When the alias already snakeifies to the table name, Kysely's
|
|
1375
|
+
* CamelCasePlugin emits the correct identifier from the alias alone, so no
|
|
1376
|
+
* explicit `as` clause is needed; otherwise we join the table aliased as `alias`.
|
|
1377
|
+
*
|
|
1378
|
+
* @returns A table expression string, e.g. `"beautiful_balloons as balloon"`
|
|
1379
|
+
*/
|
|
1380
|
+
aliasedJoinTableExpression(tableName, alias) {
|
|
1381
|
+
return snakeify(alias) === tableName ? alias : `${tableName} as ${alias}`;
|
|
1382
|
+
}
|
|
1370
1383
|
checkForQueryViolations() {
|
|
1371
1384
|
const invalidWhereNotClauses = this.similarityStatementBuilder().whereNotStatementsWithSimilarityClauses();
|
|
1372
1385
|
if (invalidWhereNotClauses.length) {
|
|
@@ -1502,12 +1515,19 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1502
1515
|
*/
|
|
1503
1516
|
joinsBridgeThroughAssociations({ query, dreamClassTheAssociationIsDefinedOn, throughAssociation,
|
|
1504
1517
|
/**
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
*
|
|
1508
|
-
*
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1518
|
+
* The table alias to use for the association being joined.
|
|
1519
|
+
*
|
|
1520
|
+
* When the join statement includes an explicit alias, e.g.
|
|
1521
|
+
* `leftJoinPreload('hello as ho', 'world as wd')`, explicitAlias is that
|
|
1522
|
+
* alias ('ho' for `hello`, 'wd' for `world`).
|
|
1523
|
+
*
|
|
1524
|
+
* When no explicit alias is given (e.g. `leftJoinPreload('hello', 'world')`),
|
|
1525
|
+
* `recursivelyJoin` passes the association name itself ('hello', 'world') as
|
|
1526
|
+
* the alias, so explicitAlias is still defined.
|
|
1527
|
+
*
|
|
1528
|
+
* explicitAlias is only `undefined` for the intermediate join tables that
|
|
1529
|
+
* `joinsBridgeThroughAssociations` synthesizes while bridging a `through`
|
|
1530
|
+
* association — those tables are never aliased by the developer.
|
|
1511
1531
|
*/
|
|
1512
1532
|
explicitAlias,
|
|
1513
1533
|
/**
|
|
@@ -1628,12 +1648,19 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1628
1648
|
}
|
|
1629
1649
|
applyOneJoin({ query, dreamClass, association,
|
|
1630
1650
|
/**
|
|
1631
|
-
*
|
|
1632
|
-
*
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
*
|
|
1636
|
-
*
|
|
1651
|
+
* The table alias to use for the association being joined.
|
|
1652
|
+
*
|
|
1653
|
+
* When the join statement includes an explicit alias, e.g.
|
|
1654
|
+
* `leftJoinPreload('hello as ho', 'world as wd')`, explicitAlias is that
|
|
1655
|
+
* alias ('ho' for `hello`, 'wd' for `world`).
|
|
1656
|
+
*
|
|
1657
|
+
* When no explicit alias is given (e.g. `leftJoinPreload('hello', 'world')`),
|
|
1658
|
+
* `recursivelyJoin` passes the association name itself ('hello', 'world') as
|
|
1659
|
+
* the alias, so explicitAlias is still defined.
|
|
1660
|
+
*
|
|
1661
|
+
* explicitAlias is only `undefined` for the intermediate join tables that
|
|
1662
|
+
* `joinsBridgeThroughAssociations` synthesizes while bridging a `through`
|
|
1663
|
+
* association — those tables are never aliased by the developer.
|
|
1637
1664
|
*/
|
|
1638
1665
|
explicitAlias,
|
|
1639
1666
|
/**
|
|
@@ -1672,12 +1699,19 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1672
1699
|
}
|
|
1673
1700
|
addAssociationJoinStatementToQuery({ query, dreamClass, association,
|
|
1674
1701
|
/**
|
|
1675
|
-
*
|
|
1676
|
-
*
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1679
|
-
*
|
|
1680
|
-
*
|
|
1702
|
+
* The table alias to use for the association being joined.
|
|
1703
|
+
*
|
|
1704
|
+
* When the join statement includes an explicit alias, e.g.
|
|
1705
|
+
* `leftJoinPreload('hello as ho', 'world as wd')`, explicitAlias is that
|
|
1706
|
+
* alias ('ho' for `hello`, 'wd' for `world`).
|
|
1707
|
+
*
|
|
1708
|
+
* When no explicit alias is given (e.g. `leftJoinPreload('hello', 'world')`),
|
|
1709
|
+
* `recursivelyJoin` passes the association name itself ('hello', 'world') as
|
|
1710
|
+
* the alias, so explicitAlias is still defined.
|
|
1711
|
+
*
|
|
1712
|
+
* explicitAlias is only `undefined` for the intermediate join tables that
|
|
1713
|
+
* `joinsBridgeThroughAssociations` synthesizes while bridging a `through`
|
|
1714
|
+
* association — those tables are never aliased by the developer.
|
|
1681
1715
|
*/
|
|
1682
1716
|
explicitAlias,
|
|
1683
1717
|
/**
|
|
@@ -1714,7 +1748,7 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1714
1748
|
leftJoinStatements: this.query['leftJoinStatements'],
|
|
1715
1749
|
});
|
|
1716
1750
|
const to = (dreamClassThroughAssociationWantsToHydrate ?? association.modelCB()).table;
|
|
1717
|
-
const joinTableExpression =
|
|
1751
|
+
const joinTableExpression = this.aliasedJoinTableExpression(to, currentTableAlias);
|
|
1718
1752
|
query = query[(joinType === 'inner' ? 'innerJoin' : 'leftJoin')](joinTableExpression, (join) => {
|
|
1719
1753
|
join = join.onRef(this.namespaceColumn(association.foreignKey(), previousTableAlias), '=', this.namespaceColumn(association.primaryKey(undefined, {
|
|
1720
1754
|
associatedClassOverride: dreamClassThroughAssociationWantsToHydrate,
|
|
@@ -1747,7 +1781,7 @@ export default class KyselyQueryDriver extends QueryDriverBase {
|
|
|
1747
1781
|
}
|
|
1748
1782
|
else {
|
|
1749
1783
|
const to = association.modelCB().table;
|
|
1750
|
-
const joinTableExpression =
|
|
1784
|
+
const joinTableExpression = this.aliasedJoinTableExpression(to, currentTableAlias);
|
|
1751
1785
|
query = query[(joinType === 'inner' ? 'innerJoin' : 'leftJoin')](joinTableExpression, (join) => {
|
|
1752
1786
|
join = join.onRef(this.namespaceColumn(association.primaryKey(), previousTableAlias), '=', this.namespaceColumn(association.foreignKey(), currentTableAlias));
|
|
1753
1787
|
if (association.polymorphic) {
|
|
@@ -1660,10 +1660,10 @@ export default class Dream {
|
|
|
1660
1660
|
* // as: 'ratings',
|
|
1661
1661
|
* // polymorphic: true,
|
|
1662
1662
|
* // source: 'ratings',
|
|
1663
|
-
* //
|
|
1664
|
-
* //
|
|
1665
|
-
* //
|
|
1666
|
-
* //
|
|
1663
|
+
* // and: undefined,
|
|
1664
|
+
* // andNot: undefined,
|
|
1665
|
+
* // selfAnd: undefined,
|
|
1666
|
+
* // selfAndNot: undefined,
|
|
1667
1667
|
* // primaryKeyOverride: null,
|
|
1668
1668
|
* // primaryKey: [Function: primaryKey],
|
|
1669
1669
|
* // primaryKeyValue: [Function: primaryKeyValue],
|
|
@@ -154,11 +154,11 @@ interface DropValueFromEnumTablesAndColumnsForArrayBase {
|
|
|
154
154
|
array: true;
|
|
155
155
|
}
|
|
156
156
|
interface DropValueWithRemovalFromEnumTablesAndColumnsForArray extends DropValueFromEnumTablesAndColumnsForArrayBase {
|
|
157
|
-
behavior: '
|
|
158
|
-
replaceWith: string;
|
|
157
|
+
behavior: 'remove';
|
|
159
158
|
}
|
|
160
159
|
interface DropValueWithReplacementFromEnumTablesAndColumnsForArray extends DropValueFromEnumTablesAndColumnsForArrayBase {
|
|
161
|
-
behavior: '
|
|
160
|
+
behavior: 'replace';
|
|
161
|
+
replaceWith: string;
|
|
162
162
|
}
|
|
163
163
|
type DropValueFromEnumTablesAndColumnsForNonArray = {
|
|
164
164
|
table: string;
|
|
@@ -362,6 +362,17 @@ export default class KyselyQueryDriver<DreamInstance extends Dream> extends Quer
|
|
|
362
362
|
* @returns A string
|
|
363
363
|
*/
|
|
364
364
|
private namespaceColumn;
|
|
365
|
+
/**
|
|
366
|
+
* @internal
|
|
367
|
+
*
|
|
368
|
+
* Builds the table expression passed to Kysely's `innerJoin`/`leftJoin` for an
|
|
369
|
+
* association. When the alias already snakeifies to the table name, Kysely's
|
|
370
|
+
* CamelCasePlugin emits the correct identifier from the alias alone, so no
|
|
371
|
+
* explicit `as` clause is needed; otherwise we join the table aliased as `alias`.
|
|
372
|
+
*
|
|
373
|
+
* @returns A table expression string, e.g. `"beautiful_balloons as balloon"`
|
|
374
|
+
*/
|
|
375
|
+
private aliasedJoinTableExpression;
|
|
365
376
|
private checkForQueryViolations;
|
|
366
377
|
private similarityStatementBuilder;
|
|
367
378
|
/**
|
|
@@ -23,7 +23,7 @@ export type VariadicJoinsArgs<I extends Dream, DB, Schema, ConcreteTableName ext
|
|
|
23
23
|
type VariadicCheckThenRecurse<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], RecursionType extends RecursionTypes, UsedNamespaces, Depth extends number, PreviousConcreteTableName, ConcreteAssociationName, AssociationNamesOrOnClause, LastDream extends Dream = I, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], AllowedNamesForArrayArg = PreviousConcreteTableName extends keyof Schema ? AssociationNamesForAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> : keyof SchemaAssociations & string, NthArgument extends VALID | INVALID = ConcreteArgs['length'] extends 0 ? VALID : ConcreteArgs[0] extends keyof SchemaAssociations & string ? VALID : ConcreteArgs[0] extends AliasedSchemaAssociation<Schema, ConcreteTableName> ? VALID : ConcreteArgs[0] extends JoinAndStatements<LastDream, DB, Schema, ConcreteTableName, RequiredOnClauseKeys<Schema, PreviousConcreteTableName, ConcreteAssociationName>> ? VALID : ConcreteArgs[0] extends readonly AllowedNamesForArrayArg[] ? VALID : ConcreteArgs[0] extends JoinAndStatements<LastDream, DB, Schema, ConcreteTableName, RequiredOnClauseKeys<Schema, PreviousConcreteTableName, ConcreteAssociationName>> ? VALID : ConcreteArgs[0] extends AllowedNamesForArrayArg ? VALID : INVALID> = NthArgument extends INVALID ? `invalid where clause in argument ${Inc<Depth>}` : ConcreteArgs['length'] extends 0 ? AssociationNamesOrOnClause : VariadicRecurse<I, DB, Schema, ConcreteTableName, ConcreteArgs, RecursionType, UsedNamespaces, Depth, PreviousConcreteTableName, ConcreteAssociationName, LastDream>;
|
|
24
24
|
export type AliasedSchemaAssociation<Schema, ConcreteTableName extends keyof Schema, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]]> = `${keyof SchemaAssociations & string} as ${string}`;
|
|
25
25
|
type VariadicRecurse<I extends Dream, DB, Schema, ConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, ConcreteArgs extends readonly unknown[], RecursionType extends RecursionTypes, UsedNamespaces, Depth extends number, PreviousConcreteTableName, ConcreteAssociationName, LastDream extends Dream, SchemaAssociations = Schema[ConcreteTableName]['associations' & keyof Schema[ConcreteTableName]], PolymorphicTableNamesUnion = PreviousConcreteTableName extends keyof Schema ? AssociationTableNamesForAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> : ConcreteTableName, CrossPolymorphicTableForCurrentArg = ConcreteArgs[0] extends string ? TableContainingAssociationInUnion<Schema, PolymorphicTableNamesUnion, ConcreteArgs[0]> : never, EffectiveConcreteTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB = ConcreteArgs[0] extends keyof SchemaAssociations & string ? ConcreteTableName : [CrossPolymorphicTableForCurrentArg] extends [never] ? ConcreteTableName : CrossPolymorphicTableForCurrentArg extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB ? CrossPolymorphicTableForCurrentArg : ConcreteTableName, EffectiveSchemaAssociations = Schema[EffectiveConcreteTableName]['associations' & keyof Schema[EffectiveConcreteTableName]], ConcreteNthArg extends (keyof SchemaAssociations & string) | (keyof EffectiveSchemaAssociations & string) | AliasedSchemaAssociation<Schema, ConcreteTableName> | null = ConcreteArgs[0] extends undefined ? null : ConcreteArgs[0] extends null ? null : ConcreteArgs[0] extends keyof SchemaAssociations & string ? ConcreteArgs[0] & keyof SchemaAssociations & string : ConcreteArgs[0] extends AliasedSchemaAssociation<Schema, ConcreteTableName> ? ConcreteArgs[0] & AliasedSchemaAssociation<Schema, ConcreteTableName> : ConcreteArgs[0] extends keyof EffectiveSchemaAssociations & string ? ConcreteArgs[0] & keyof EffectiveSchemaAssociations & string : null, NextUsedNamespaces = ConcreteArgs[0] extends undefined ? never : ConcreteArgs[0] extends null ? never : ConcreteNthArg extends null ? UsedNamespaces : UsedNamespaces | ConcreteNthArg, CurrentArgumentType extends IS_ASSOCIATION_NAME | IS_ASSOCIATION_ALIAS | IS_CROSS_POLYMORPHIC_ASSOCIATION_NAME | IS_NOT_ASSOCIATION_NAME = ConcreteNthArg extends null ? IS_NOT_ASSOCIATION_NAME : ConcreteNthArg extends keyof SchemaAssociations & string ? IS_ASSOCIATION_NAME : ConcreteNthArg extends AliasedSchemaAssociation<Schema, ConcreteTableName> ? IS_ASSOCIATION_ALIAS : ConcreteNthArg extends keyof EffectiveSchemaAssociations & string ? IS_CROSS_POLYMORPHIC_ASSOCIATION_NAME : IS_NOT_ASSOCIATION_NAME, NextPreviousConcreteTableName = CurrentArgumentType extends IS_ASSOCIATION_NAME ? ConcreteTableName : CurrentArgumentType extends IS_ASSOCIATION_ALIAS ? ConcreteTableName : CurrentArgumentType extends IS_CROSS_POLYMORPHIC_ASSOCIATION_NAME ? EffectiveConcreteTableName : PreviousConcreteTableName, NextUnaliasedAssociationName = CurrentArgumentType extends IS_ASSOCIATION_NAME ? ConcreteNthArg : CurrentArgumentType extends IS_ASSOCIATION_ALIAS ? ConcreteNthArg extends `${infer AssocName extends string} as ${string}` ? AssocName & keyof SchemaAssociations & string : never : CurrentArgumentType extends IS_CROSS_POLYMORPHIC_ASSOCIATION_NAME ? ConcreteNthArg : never, NextAliasedAssociationName = CurrentArgumentType extends IS_ASSOCIATION_NAME ? ConcreteNthArg : CurrentArgumentType extends IS_ASSOCIATION_ALIAS ? ConcreteNthArg extends `${string} as ${infer AssocAlias extends string}` ? AssocAlias & string : ConcreteAssociationName : CurrentArgumentType extends IS_CROSS_POLYMORPHIC_ASSOCIATION_NAME ? ConcreteNthArg : ConcreteAssociationName, IsAssociationNameOrAlias extends boolean = CurrentArgumentType extends IS_ASSOCIATION_NAME | IS_ASSOCIATION_ALIAS | IS_CROSS_POLYMORPHIC_ASSOCIATION_NAME ? true : false, NextTableName extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB = IsAssociationNameOrAlias extends true ? AssociationTableName<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : ConcreteTableName & AssociationTableNames<DB, Schema> & keyof DB, AllowedAssociationNames = IsAssociationNameOrAlias extends true ? AssociationNamesForAssociation<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : PreviousConcreteTableName extends keyof Schema ? AssociationNamesForAssociation<Schema, PreviousConcreteTableName, ConcreteAssociationName> : AssociationNamesForTable<Schema, ConcreteTableName>, // fall back to association names for table for root only
|
|
26
|
-
AssociationTableOrConcreteTable extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB = IsAssociationNameOrAlias extends true ? AssociationTableName<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : ConcreteTableName, CurrentRequiredOnClauseKeys = IsAssociationNameOrAlias extends true ? RequiredOnClauseKeys<Schema, EffectiveConcreteTableName,
|
|
26
|
+
AssociationTableOrConcreteTable extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB = IsAssociationNameOrAlias extends true ? AssociationTableName<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : ConcreteTableName, CurrentRequiredOnClauseKeys = IsAssociationNameOrAlias extends true ? RequiredOnClauseKeys<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName> : RequiredOnClauseKeys<Schema, PreviousConcreteTableName, ConcreteAssociationName>, AllowedNextArgValues = RecursionType extends 'load' ? AllowedNextArgValuesForLoad<DreamAssociationNameToAssociatedModel<LastDream, ConcreteArgs[0] & keyof LastDream>, DB, Schema, AllowedAssociationNames, AssociationTableOrConcreteTable, CurrentRequiredOnClauseKeys> : RecursionType extends 'leftJoinLoad' ? AllowedNextArgValuesForLeftJoinLoad<DreamAssociationNameToAssociatedModel<LastDream, ConcreteArgs[0] & keyof LastDream>, DB, Schema, AllowedAssociationNames, AssociationTableOrConcreteTable, CurrentRequiredOnClauseKeys, NextUsedNamespaces> : RecursionType extends 'join' ? AllowedNextArgValuesForJoin<DreamAssociationNameToAssociatedModel<LastDream, ConcreteArgs[0] & keyof LastDream>, DB, Schema, AllowedAssociationNames, AssociationTableOrConcreteTable, CurrentRequiredOnClauseKeys, NextUsedNamespaces> : never> = Depth extends MAX_VARIADIC_DEPTH ? never : VariadicCheckThenRecurse<I, DB, Schema, NextTableName, ReadonlyTail<ConcreteArgs>, RecursionType, NextUsedNamespaces, Inc<Depth>, NextPreviousConcreteTableName, NextAliasedAssociationName, AllowedNextArgValues, DreamAssociationNameToAssociatedModel<LastDream, ConcreteArgs[0] & keyof LastDream> extends Dream ? DreamAssociationNameToAssociatedModel<LastDream, ConcreteArgs[0] & keyof LastDream> : LastDream>;
|
|
27
27
|
type AllowedNextArgValuesForLoad<I extends Dream, DB, Schema, AllowedNames, TableForJoin extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, RequiredOnClauseKeysForThisAssociation> = AllowedNames | AllowedNames[] | JoinAndStatements<I, DB, Schema, TableForJoin, RequiredOnClauseKeysForThisAssociation>;
|
|
28
28
|
type AllowedNextArgValuesForLeftJoinLoad<I extends Dream, DB, Schema, AllowedNames, TableForJoin extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, RequiredOnClauseKeysForThisAssociation, UsedNamespaces> = Exclude<AllowedNames, UsedNamespaces> | Exclude<AllowedNames, UsedNamespaces>[] | JoinAndStatements<I, DB, Schema, TableForJoin, RequiredOnClauseKeysForThisAssociation>;
|
|
29
29
|
type AllowedNextArgValuesForJoin<I extends Dream, DB, Schema, AllowedNames, TableForJoin extends keyof Schema & AssociationTableNames<DB, Schema> & keyof DB, RequiredOnClauseKeysForThisAssociation, UsedNamespaces> = Exclude<AllowedNames, UsedNamespaces> | JoinAndStatements<I, DB, Schema, TableForJoin, RequiredOnClauseKeysForThisAssociation>;
|
|
@@ -341,7 +341,7 @@ type VariadicRecurse<
|
|
|
341
341
|
: ConcreteTableName,
|
|
342
342
|
//
|
|
343
343
|
CurrentRequiredOnClauseKeys = IsAssociationNameOrAlias extends true
|
|
344
|
-
? RequiredOnClauseKeys<Schema, EffectiveConcreteTableName,
|
|
344
|
+
? RequiredOnClauseKeys<Schema, EffectiveConcreteTableName, NextUnaliasedAssociationName>
|
|
345
345
|
: RequiredOnClauseKeys<Schema, PreviousConcreteTableName, ConcreteAssociationName>,
|
|
346
346
|
//
|
|
347
347
|
AllowedNextArgValues = RecursionType extends 'load'
|
package/docs/assets/hierarchy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.hierarchyData = "
|
|
1
|
+
window.hierarchyData = "eJyVkkFvwiAUx7/LO6OzaFvLcZolyzK3Jct2MB6wfa5ECgaoS2P87gvzwpxb8QKEvD+/H/AOYLR2FtgyyeiUFKMVAYMbiaUTWllgByhGflS8QWDw0qLp5kbs0dxyi0BgK1QFLKFTAq2RwKCU3Fq0N9V6eFY9rF0jgZwqgIGz1cDHB6cNAmUtZGVQAVvScb46EqDjPKA/dBZlF5zaw/9Vf41BMs6pV/Bz4PCsrfswaOMtLiR6PDw1LULqrMZyO9PKOsOFcm9CS+5/6D80GqONHf4VjXDIkvDvZ1q2jXrao9lI/RlD/hGI4dFpwJtzx+9VqZsdd2It8V242u+tucU7gbKKUOg946qOSAtK/KOQJJvkJMmy9LtBskl+pv3a7fB0e796FLbhrqwjfS+HY54vSwOPhXaLVsprWuU80sc8Hr8AarputQ=="
|