@rvoh/dream 2.41.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/Dream.js +155 -13
- package/dist/cjs/src/cli/index.js +39 -5
- package/dist/cjs/src/db/DreamDbConnection.js +19 -1
- package/dist/cjs/src/dream/DreamClassTransactionBuilder.js +34 -2
- package/dist/cjs/src/dream/Query.js +178 -14
- package/dist/cjs/src/dream/QueryDriver/Base.js +80 -0
- package/dist/cjs/src/dream/QueryDriver/Kysely.js +35 -29
- package/dist/cjs/src/dream/QueryDriver/Postgres.js +83 -1
- package/dist/cjs/src/dream/internal/findOrCreateBy.js +6 -1
- package/dist/cjs/src/dream/internal/updateOrCreateBy.js +6 -1
- package/dist/cjs/src/encrypt/algorithms/aes-gcm/decryptAESGCM.js +24 -10
- package/dist/cjs/src/errors/CreateOrFindByFailedToCreateAndFind.js +63 -6
- package/dist/cjs/src/errors/CreateOrUpdateByFailedToCreateAndUpdate.js +41 -6
- package/dist/cjs/src/errors/GeneratedFilesAlreadyExist.js +38 -0
- package/dist/cjs/src/errors/schema-builder/ColumnNamesDoNotRoundTrip.js +28 -0
- package/dist/cjs/src/helpers/cli/ASTConnectionBuilder.js +62 -10
- package/dist/cjs/src/helpers/cli/generateDream.js +109 -18
- package/dist/cjs/src/helpers/cli/generateMigration.js +12 -8
- package/dist/cjs/src/helpers/cli/writeGeneratedFile.js +3 -3
- package/dist/cjs/src/helpers/db/normalizeDataForDb.js +17 -2
- package/dist/esm/src/Dream.js +155 -13
- package/dist/esm/src/cli/index.js +39 -5
- package/dist/esm/src/db/DreamDbConnection.js +19 -1
- package/dist/esm/src/dream/DreamClassTransactionBuilder.js +34 -2
- package/dist/esm/src/dream/Query.js +178 -14
- package/dist/esm/src/dream/QueryDriver/Base.js +80 -0
- package/dist/esm/src/dream/QueryDriver/Kysely.js +35 -29
- package/dist/esm/src/dream/QueryDriver/Postgres.js +83 -1
- package/dist/esm/src/dream/internal/findOrCreateBy.js +6 -1
- package/dist/esm/src/dream/internal/updateOrCreateBy.js +6 -1
- package/dist/esm/src/encrypt/algorithms/aes-gcm/decryptAESGCM.js +24 -10
- package/dist/esm/src/errors/CreateOrFindByFailedToCreateAndFind.js +63 -6
- package/dist/esm/src/errors/CreateOrUpdateByFailedToCreateAndUpdate.js +41 -6
- package/dist/esm/src/errors/GeneratedFilesAlreadyExist.js +38 -0
- package/dist/esm/src/errors/schema-builder/ColumnNamesDoNotRoundTrip.js +28 -0
- package/dist/esm/src/helpers/cli/ASTConnectionBuilder.js +62 -10
- package/dist/esm/src/helpers/cli/generateDream.js +109 -18
- package/dist/esm/src/helpers/cli/generateMigration.js +12 -8
- package/dist/esm/src/helpers/cli/writeGeneratedFile.js +3 -3
- package/dist/esm/src/helpers/db/normalizeDataForDb.js +17 -2
- package/dist/types/src/Dream.d.ts +109 -6
- package/dist/types/src/bin/index.d.ts +11 -0
- package/dist/types/src/cli/index.d.ts +27 -0
- package/dist/types/src/db/DreamDbConnection.d.ts +15 -1
- package/dist/types/src/dream/DreamClassTransactionBuilder.d.ts +34 -2
- package/dist/types/src/dream/Query.d.ts +101 -6
- package/dist/types/src/dream/QueryDriver/Base.d.ts +59 -0
- package/dist/types/src/dream/QueryDriver/Kysely.d.ts +9 -0
- package/dist/types/src/dream/QueryDriver/Postgres.d.ts +29 -1
- package/dist/types/src/dream/internal/executeDatabaseQuery.d.ts +2 -1
- package/dist/types/src/errors/CreateOrFindByFailedToCreateAndFind.d.ts +40 -1
- package/dist/types/src/errors/CreateOrUpdateByFailedToCreateAndUpdate.d.ts +8 -1
- package/dist/types/src/errors/GeneratedFilesAlreadyExist.d.ts +18 -0
- package/dist/types/src/errors/schema-builder/ColumnNamesDoNotRoundTrip.d.ts +12 -0
- package/dist/types/src/helpers/cli/ASTConnectionBuilder.d.ts +23 -1
- package/dist/types/src/helpers/cli/generateDream.d.ts +25 -0
- package/dist/types/src/helpers/cli/generateMigration.d.ts +20 -2
- package/dist/types/src/helpers/cli/syncWithFailureContext.d.ts +7 -2
- package/dist/types/src/helpers/cli/writeGeneratedFile.d.ts +6 -1
- package/dist/types/src/helpers/db/normalizeDataForDb.d.ts +7 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/db.DreamMigrationHelpers.html +11 -11
- package/docs/classes/db.KyselyQueryDriver.html +87 -50
- package/docs/classes/db.PostgresQueryDriver.html +76 -50
- package/docs/classes/db.QueryDriverBase.html +87 -50
- package/docs/classes/errors.CannotSaveMissingDream.html +2 -2
- package/docs/classes/errors.CheckConstraintViolation.html +3 -3
- package/docs/classes/errors.ColumnOverflow.html +3 -3
- package/docs/classes/errors.CreateOrFindByFailedToCreateAndFind.html +6 -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.SortableScopeDidNotStabilize.html +3 -3
- package/docs/classes/errors.SortableScopeLockWaitTimedOut.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 +203 -133
- package/docs/classes/index.DreamApp.html +13 -13
- package/docs/classes/index.DreamTransaction.html +3 -3
- package/docs/classes/index.Env.html +5 -5
- package/docs/classes/index.Query.html +147 -100
- package/docs/classes/system.CliFileWriter.html +4 -4
- package/docs/classes/system.DreamBin.html +7 -3
- 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 +4 -4
- 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 +3 -3
- 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.DecryptCallbacks.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 +6 -6
- package/docs/interfaces/types.DurationObject.html +2 -2
- package/docs/interfaces/types.EncryptOptions.html +2 -2
- package/docs/interfaces/types.EncryptionLegacyKeyUsedEvent.html +4 -4
- package/docs/interfaces/types.InternalAnyTypedSerializerRendersMany.html +2 -2
- package/docs/interfaces/types.InternalAnyTypedSerializerRendersOne.html +2 -2
- package/docs/interfaces/types.IntrospectedColumn.html +7 -7
- package/docs/interfaces/types.IntrospectedDatabase.html +2 -2
- package/docs/interfaces/types.IntrospectedEnum.html +2 -2
- package/docs/interfaces/types.IntrospectedTable.html +5 -5
- 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.OpenapiSchemaCombinatorFields.html +1 -1
- package/docs/types/openapi.OpenapiSchemaCommonFields.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionAllOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionOneOf.html +1 -1
- 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.OpenapiSchemaObjectBase.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectBaseShorthand.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 +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionOneOf.html +1 -1
- 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.IntrospectedValueType.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 +1 -1
- package/dist/cjs/src/helpers/cli/generateFactory.js +0 -10
- package/dist/cjs/src/helpers/cli/generateSerializer.js +0 -18
- package/dist/cjs/src/helpers/cli/generateUnitSpec.js +0 -10
- package/dist/esm/src/helpers/cli/generateFactory.js +0 -10
- package/dist/esm/src/helpers/cli/generateSerializer.js +0 -18
- package/dist/esm/src/helpers/cli/generateUnitSpec.js +0 -10
- package/dist/types/src/helpers/cli/generateFactory.d.ts +0 -5
- package/dist/types/src/helpers/cli/generateSerializer.d.ts +0 -9
- package/dist/types/src/helpers/cli/generateUnitSpec.d.ts +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PostgresQueryDriver | @rvoh/dream</title><meta name="description" content="Documentation for @rvoh/dream"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@rvoh/dream</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/db.html">db</a></li><li><a href="" aria-current="page">PostgresQueryDriver</a></li></ul><h1>Class PostgresQueryDriver<DreamInstance></h1></div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="dreaminstance"><span class="tsd-kind-type-parameter">DreamInstance</span> <span class="tsd-signature-keyword">extends</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li></ul></section><section class="tsd-panel tsd-hierarchy" data-refl="
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PostgresQueryDriver | @rvoh/dream</title><meta name="description" content="Documentation for @rvoh/dream"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@rvoh/dream</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/db.html">db</a></li><li><a href="" aria-current="page">PostgresQueryDriver</a></li></ul><h1>Class PostgresQueryDriver<DreamInstance></h1></div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="dreaminstance"><span class="tsd-kind-type-parameter">DreamInstance</span> <span class="tsd-signature-keyword">extends</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li></ul></section><section class="tsd-panel tsd-hierarchy" data-refl="1378"><h4>Hierarchy (<a href="../hierarchy.html#db.PostgresQueryDriver">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="db.KyselyQueryDriver.html" class="tsd-signature-type tsd-kind-class">KyselyQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">PostgresQueryDriver</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L85">src/dream/QueryDriver/Postgres.ts:85</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
|
|
2
2
|
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#connectionoverride" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>connection<wbr/>Override</span></a>
|
|
3
3
|
<a href="#dreamclass" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dream<wbr/>Class</span></a>
|
|
4
4
|
<a href="#dreaminstance-1" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dream<wbr/>Instance</span></a>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<a href="#dbfor" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>For</span></a>
|
|
19
19
|
<a href="#dbresulttodreaminstance" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Result<wbr/>To<wbr/>Dream<wbr/>Instance</span></a>
|
|
20
20
|
<a href="#delete" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete</span></a>
|
|
21
|
+
<a href="#exists" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>exists</span></a>
|
|
21
22
|
<a href="#hydrateassociation" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>hydrate<wbr/>Association</span></a>
|
|
22
23
|
<a href="#hydratepreload" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>hydrate<wbr/>Preload</span></a>
|
|
23
24
|
<a href="#joinedrowkeycolumns" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>joined<wbr/>Row<wbr/>Key<wbr/>Columns</span></a>
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
<a href="#tokysely" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Kysely</span></a>
|
|
39
40
|
<a href="#update" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update</span></a>
|
|
40
41
|
<a href="#acquireadvisorytransactionlocks" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>acquire<wbr/>Advisory<wbr/>Transaction<wbr/>Locks</span></a>
|
|
42
|
+
<a href="#dataincompatiblewithdatabasefielderror" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>data<wbr/>Incompatible<wbr/>With<wbr/>Database<wbr/>Field<wbr/>Error</span></a>
|
|
41
43
|
<a href="#dbcreate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Create</span></a>
|
|
42
44
|
<a href="#dbdrop" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Drop</span></a>
|
|
43
45
|
<a href="#dbfor-2" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>For</span></a>
|
|
@@ -53,25 +55,27 @@
|
|
|
53
55
|
<a href="#migrate" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>migrate</span></a>
|
|
54
56
|
<a href="#opentestdatabaselocksession" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>open<wbr/>Test<wbr/>Database<wbr/>Lock<wbr/>Session</span></a>
|
|
55
57
|
<a href="#primarykeytype" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>primary<wbr/>Key<wbr/>Type</span></a>
|
|
58
|
+
<a href="#rejectsanyvalueforcolumntype" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rejects<wbr/>Any<wbr/>Value<wbr/>For<wbr/>Column<wbr/>Type</span></a>
|
|
56
59
|
<a href="#rollback" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rollback</span></a>
|
|
57
60
|
<a href="#savedream" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Dream</span></a>
|
|
58
61
|
<a href="#setdatabasetypeparsers" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Database<wbr/>Type<wbr/>Parsers</span></a>
|
|
59
62
|
<a href="#sync" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sync</span></a>
|
|
60
63
|
<a href="#transaction" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>transaction</span></a>
|
|
61
|
-
|
|
62
|
-
</div><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#
|
|
64
|
+
<a href="#violateduniqueindexcolumns" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>violated<wbr/>Unique<wbr/>Index<wbr/>Columns</span></a>
|
|
65
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Constructors</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="constructor"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="constructorpostgresquerydriver"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PostgresQueryDriver</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#constructorpostgresquerydriverdreaminstance">DreamInstance</a> <span class="tsd-signature-keyword">extends</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">query</span><span class="tsd-signature-symbol">:</span> <a href="index.Query.html" class="tsd-signature-type tsd-kind-class">Query</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">PostgresQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span><a href="#constructorpostgresquerydriver" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="constructorpostgresquerydriverdreaminstance"><span class="tsd-kind-type-parameter">DreamInstance</span> <span class="tsd-signature-keyword">extends</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">query</span>: <a href="index.Query.html" class="tsd-signature-type tsd-kind-class">Query</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">PostgresQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#constructor">constructor</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Base.ts#L28">src/dream/QueryDriver/Base.ts:28</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3 class="tsd-anchor-link" id="connectionoverride"><code class="tsd-tag">Protected</code><span>connection<wbr/>Override</span><a href="#connectionoverride" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">connectionOverride</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></div><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#connectionoverride">connectionOverride</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Base.ts#L19">src/dream/QueryDriver/Base.ts:19</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3 class="tsd-anchor-link" id="dreamclass"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>dream<wbr/>Class</span><a href="#dreamclass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">dreamClass</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DreamConstructorType</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dreamclass">dreamClass</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Base.ts#L16">src/dream/QueryDriver/Base.ts:16</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3 class="tsd-anchor-link" id="dreaminstance-1"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>dream<wbr/>Instance</span><a href="#dreaminstance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">dreamInstance</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a></div><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dreaminstance-1">dreamInstance</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Base.ts#L17">src/dream/QueryDriver/Base.ts:17</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3 class="tsd-anchor-link" id="dreamtransaction"><code class="tsd-tag">Protected</code><span>dream<wbr/>Transaction</span><a href="#dreamtransaction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">dreamTransaction</span><span class="tsd-signature-symbol">:</span> <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dreamtransaction">dreamTransaction</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Base.ts#L18">src/dream/QueryDriver/Base.ts:18</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3 class="tsd-anchor-link" id="innerjoindreamclasses"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code> <code class="tsd-tag">Internal</code><span>inner<wbr/>Join<wbr/>Dream<wbr/>Classes</span><a href="#innerjoindreamclasses" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">innerJoinDreamClasses</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">readonly</span> <span class="tsd-signature-keyword">typeof</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-comment tsd-typography"><p>stores the Dream models joined in this Query instance</p>
|
|
66
|
+
</div><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#innerjoindreamclasses">innerJoinDreamClasses</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Base.ts#L26">src/dream/QueryDriver/Base.ts:26</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="query"><span>query</span><a href="#query" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <a href="index.Query.html" class="tsd-signature-type tsd-kind-class">Query</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#query">query</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Base.ts#L28">src/dream/QueryDriver/Base.ts:28</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="supportsadvisorytransactionlocks"><code class="tsd-tag">Static</code> <code class="tsd-tag">Internal</code><span>supports<wbr/>Advisory<wbr/>Transaction<wbr/>Locks</span><a href="#supportsadvisorytransactionlocks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">supportsAdvisoryTransactionLocks</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><div class="tsd-comment tsd-typography"><p>Whether this driver implements the transaction-scoped advisory lock seam
|
|
63
67
|
(<a href="db.QueryDriverBase.html#acquireadvisorytransactionlocks" class="tsd-kind-method">acquireAdvisoryTransactionLocks</a>). Adapters that can hold a
|
|
64
68
|
key-addressed lock for the life of a transaction override this to <code>true</code>.
|
|
65
69
|
It defaults to <code>false</code> so that a driver without the primitive fails loud
|
|
66
70
|
for features that depend on it (today, the <code>Sortable</code> decorator) rather
|
|
67
71
|
than silently racing on position values.</p>
|
|
68
|
-
</div><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#supportsadvisorytransactionlocks">supportsAdvisoryTransactionLocks</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
72
|
+
</div><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#supportsadvisorytransactionlocks">supportsAdvisoryTransactionLocks</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L373">src/dream/QueryDriver/Postgres.ts:373</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="supportsparalleltestdatabases"><code class="tsd-tag">Static</code> <code class="tsd-tag">Internal</code><span>supports<wbr/>Parallel<wbr/>Test<wbr/>Databases</span><a href="#supportsparalleltestdatabases" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">supportsParallelTestDatabases</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><div class="tsd-comment tsd-typography"><p>Whether this driver implements the per-worker test-database claim seam
|
|
69
73
|
(<a href="db.QueryDriverBase.html#opentestdatabaselocksession" class="tsd-kind-method">openTestDatabaseLockSession</a>). Adapters that can hold a
|
|
70
74
|
process-lifetime, auto-releasing lock to reserve one database from the
|
|
71
75
|
test pool override this to <code>true</code>. It defaults to <code>false</code> so that a new
|
|
72
76
|
adapter fails loud under vitest rather than silently sharing a single
|
|
73
77
|
database across overlapping workers — see <code>src/db/testDatabasePool.ts</code>.</p>
|
|
74
|
-
</div><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#supportsparalleltestdatabases">supportsParallelTestDatabases</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
78
|
+
</div><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#supportsparalleltestdatabases">supportsParallelTestDatabases</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L548">src/dream/QueryDriver/Postgres.ts:548</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Methods</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="applyrowlock"><span>apply<wbr/>Row<wbr/>Lock</span><a href="#applyrowlock" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="applyrowlock-1"><span class="tsd-kind-call-signature">applyRowLock</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">kyselyQuery</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">tableAlias</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#applyrowlock-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Postgres implementation of the row-locking seam: appends
|
|
75
79
|
<code>FOR UPDATE OF "<tableAlias>"</code> to the select, so every row the statement
|
|
76
80
|
returns is exclusively locked until the enclosing transaction ends.</p>
|
|
77
81
|
<p>Scoping the lock to the Query's own base table (rather than a bare
|
|
@@ -83,20 +87,20 @@ statement that collides with another transaction's lock blocks until that
|
|
|
83
87
|
transaction ends. Callers that cannot afford an unbounded wait should set a
|
|
84
88
|
<code>lock_timeout</code> on the connection; see the guarded-destroy notes on
|
|
85
89
|
<code>Query#destroy</code>.</p>
|
|
86
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">kyselyQuery</span>: <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">tableAlias</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#applyrowlock">applyRowLock</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
87
|
-
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#assertmutationpreservesassociationquery">assertMutationPreservesAssociationQuery</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
90
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">kyselyQuery</span>: <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">tableAlias</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#applyrowlock">applyRowLock</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L366">src/dream/QueryDriver/Postgres.ts:366</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3 class="tsd-anchor-link" id="assertmutationpreservesassociationquery"><code class="tsd-tag">Protected</code><span>assert<wbr/>Mutation<wbr/>Preserves<wbr/>Association<wbr/>Query</span><a href="#assertmutationpreservesassociationquery" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="assertmutationpreservesassociationquery-1"><span class="tsd-kind-call-signature">assertMutationPreservesAssociationQuery</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#assertmutationpreservesassociationquery-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Prevents mutation paths that discard an association query's ownership constraint.</p>
|
|
91
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#assertmutationpreservesassociationquery">assertMutationPreservesAssociationQuery</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Base.ts#L41">src/dream/QueryDriver/Base.ts:41</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="associationorderstatements"><span>association<wbr/>Order<wbr/>Statements</span><a href="#associationorderstatements" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="associationorderstatements-1"><span class="tsd-kind-call-signature">associationOrderStatements</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">OrderQueryStatement</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><a href="#associationorderstatements-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>The order statements that the declared <code>order</code> of the associations the
|
|
88
92
|
Query is built on or joins contributes to its ORDER BY, in the order they
|
|
89
93
|
sort, each column namespaced by the alias it is read from. They are read
|
|
90
94
|
off the same join code that emits them, by building the select.</p>
|
|
91
95
|
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">OrderQueryStatement</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h4><p>An array of namespaced order statements</p>
|
|
92
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#associationorderstatements">associationOrderStatements</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
96
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#associationorderstatements">associationOrderStatements</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1273">src/dream/QueryDriver/Kysely.ts:1273</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="avg"><span>avg</span><a href="#avg" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="avg-1"><span class="tsd-kind-call-signature">avg</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">columnName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#avg-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the average value of the specified column
|
|
93
97
|
for this Query</p>
|
|
94
98
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">Game</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">avg</span><span class="hl-1">(</span><span class="hl-6">'score'</span><span class="hl-1">)</span><br/><span class="hl-7">// 1</span>
|
|
95
99
|
</code><button type="button">Copy</button></pre>
|
|
96
100
|
|
|
97
101
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">columnName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>a column name on the model</p>
|
|
98
102
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><p>the average of the values of the specified column for this Query</p>
|
|
99
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#avg">avg</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
103
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#avg">avg</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L803">src/dream/QueryDriver/Kysely.ts:803</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="avgby"><span>avg<wbr/>By</span><a href="#avgby" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="avgby-1"><span class="tsd-kind-call-signature">avgBy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">groupColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">aggregatedColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><a href="#avgby-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the average of the specified column within each group,
|
|
100
104
|
keyed by the value of the provided group column.</p>
|
|
101
105
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">CompositionAsset</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">avgBy</span><span class="hl-1">(</span><span class="hl-6">'name'</span><span class="hl-1">, </span><span class="hl-6">'score'</span><span class="hl-1">)</span><br/><span class="hl-7">// Map(2) { 'primary' => 5, 'secondary' => 4 }</span>
|
|
102
106
|
</code><button type="button">Copy</button></pre>
|
|
@@ -104,19 +108,19 @@ keyed by the value of the provided group column.</p>
|
|
|
104
108
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">groupColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to group by (base or joined-association-namespaced)</p>
|
|
105
109
|
</div></li><li><span><span class="tsd-kind-parameter">aggregatedColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to average within each group</p>
|
|
106
110
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><p>A Map from each present group value to the average of the aggregated column in that group</p>
|
|
107
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#avgby">avgBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
111
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#avgby">avgBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L829">src/dream/QueryDriver/Kysely.ts:829</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="count"><span>count</span><a href="#count" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="count-1"><span class="tsd-kind-call-signature">count</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><a href="#count-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the number of records in the database</p>
|
|
108
112
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">count</span><span class="hl-1">()</span>
|
|
109
113
|
</code><button type="button">Copy</button></pre>
|
|
110
114
|
|
|
111
115
|
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4><p>The number of records in the database</p>
|
|
112
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#count">count</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
116
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#count">count</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L852">src/dream/QueryDriver/Kysely.ts:852</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="countby"><span>count<wbr/>By</span><a href="#countby" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="countby-1"><span class="tsd-kind-call-signature">countBy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">groupColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><a href="#countby-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the number of records in each group, keyed by the
|
|
113
117
|
value of the provided group column.</p>
|
|
114
118
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">countBy</span><span class="hl-1">(</span><span class="hl-6">'name'</span><span class="hl-1">)</span><br/><span class="hl-7">// Map(2) { 'fred' => 2, 'zed' => 1 }</span>
|
|
115
119
|
</code><button type="button">Copy</button></pre>
|
|
116
120
|
|
|
117
121
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">groupColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to group by (base or joined-association-namespaced)</p>
|
|
118
122
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><p>A Map from each present group value to the number of records in that group</p>
|
|
119
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#countby">countBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
123
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#countby">countBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L886">src/dream/QueryDriver/Kysely.ts:886</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="dbconnectiontype"><span>db<wbr/>Connection<wbr/>Type</span><a href="#dbconnectiontype" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="dbconnectiontype-1"><span class="tsd-kind-call-signature">dbConnectionType</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">sqlCommandType</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">SqlCommandType</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a><a href="#dbconnectiontype-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sqlCommandType</span>: <span class="tsd-signature-type">SqlCommandType</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dbconnectiontype">dbConnectionType</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1093">src/dream/QueryDriver/Kysely.ts:1093</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="dbfor"><span>db<wbr/>For</span><a href="#dbfor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="dbfor-1"><span class="tsd-kind-call-signature">dbFor</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">sqlCommandType</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">SqlCommandType</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Kysely</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span><a href="#dbfor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">sqlCommandType</span>: <span class="tsd-signature-type">SqlCommandType</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Kysely</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dbfor">dbFor</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L173">src/dream/QueryDriver/Kysely.ts:173</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="dbresulttodreaminstance"><span>db<wbr/>Result<wbr/>To<wbr/>Dream<wbr/>Instance</span><a href="#dbresulttodreaminstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="dbresulttodreaminstance-1"><span class="tsd-kind-call-signature">dbResultToDreamInstance</span><span class="tsd-signature-symbol"><</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dbresulttodreaminstancedreamclass">DreamClass</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">typeof</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dbresulttodreaminstancerettype">RetType</a> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">InstanceType</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbresulttodreaminstancedreamclass">DreamClass</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">result</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">dreamClass</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbresulttodreaminstancerettype">RetType</a><a href="#dbresulttodreaminstance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>This method is used internally by a Query driver to
|
|
120
124
|
take the result of a single row in a database, and
|
|
121
125
|
turn that row into the provided dream instance.</p>
|
|
122
126
|
<p>If needed, the return type can be overriden to
|
|
@@ -126,24 +130,29 @@ cannot be inferred, i.e.</p>
|
|
|
126
130
|
<pre><code class="ts"><span class="hl-0">this</span><span class="hl-1">.</span><span class="hl-5">dbResultToDreamInstance</span><span class="hl-1"><</span><span class="hl-0">typeof</span><span class="hl-1"> </span><span class="hl-4">Dream</span><span class="hl-1">, </span><span class="hl-9">DreamInstance</span><span class="hl-1">>(</span><span class="hl-4">result</span><span class="hl-1">, </span><span class="hl-0">this</span><span class="hl-1">.</span><span class="hl-4">dreamClass</span><span class="hl-1">)</span>
|
|
127
131
|
</code><button type="button">Copy</button></pre>
|
|
128
132
|
|
|
129
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="dbresulttodreaminstancedreamclass"><span class="tsd-kind-type-parameter">DreamClass</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">typeof</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li><li><span id="dbresulttodreaminstancerettype"><span class="tsd-kind-type-parameter">RetType</span> = <span class="tsd-signature-type">InstanceType</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbresulttodreaminstancedreamclass">DreamClass</a><span class="tsd-signature-symbol">></span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">dreamClass</span>: <span class="tsd-signature-keyword">typeof</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbresulttodreaminstancerettype">RetType</a></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dbresulttodreaminstance">dbResultToDreamInstance</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
133
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="dbresulttodreaminstancedreamclass"><span class="tsd-kind-type-parameter">DreamClass</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">typeof</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li><li><span id="dbresulttodreaminstancerettype"><span class="tsd-kind-type-parameter">RetType</span> = <span class="tsd-signature-type">InstanceType</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbresulttodreaminstancedreamclass">DreamClass</a><span class="tsd-signature-symbol">></span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">dreamClass</span>: <span class="tsd-signature-keyword">typeof</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbresulttodreaminstancerettype">RetType</a></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dbresulttodreaminstance">dbResultToDreamInstance</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L548">src/dream/QueryDriver/Kysely.ts:548</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="delete"><span>delete</span><a href="#delete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="delete-1"><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><a href="#delete-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>executes provided query instance as a deletion query.</p>
|
|
130
134
|
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4><p>the number of deleted rows</p>
|
|
131
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#delete">delete</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
132
|
-
|
|
133
|
-
</
|
|
135
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#delete">delete</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1003">src/dream/QueryDriver/Kysely.ts:1003</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="exists"><span>exists</span><a href="#exists" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="exists-1"><span class="tsd-kind-call-signature">exists</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span><a href="#exists-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns true if a record matches the Query, false otherwise</p>
|
|
136
|
+
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">where</span><span class="hl-1">({ </span><span class="hl-4">email:</span><span class="hl-1"> </span><span class="hl-6">'how@yadoin'</span><span class="hl-1"> }).</span><span class="hl-5">exists</span><span class="hl-1">()</span>
|
|
137
|
+
</code><button type="button">Copy</button></pre>
|
|
138
|
+
|
|
139
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4><p>true if any records match the Query, false otherwise</p>
|
|
140
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#exists">exists</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L835">src/dream/QueryDriver/Kysely.ts:835</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="hydrateassociation"><span>hydrate<wbr/>Association</span><a href="#hydrateassociation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="hydrateassociation-1"><span class="tsd-kind-call-signature">hydrateAssociation</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">dreams</span><span class="tsd-signature-symbol">:</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">association</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AssociationStatement</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">preloadedDreamsAndWhatTheyPointTo</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">PreloadedDreamsAndWhatTheyPointTo</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#hydrateassociation-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Used to hydrate dreams with the provided associations</p>
|
|
141
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dreams</span>: <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">[]</span></span></li><li><span><span class="tsd-kind-parameter">association</span>: <span class="tsd-signature-type">AssociationStatement</span></span></li><li><span><span class="tsd-kind-parameter">preloadedDreamsAndWhatTheyPointTo</span>: <span class="tsd-signature-type">PreloadedDreamsAndWhatTheyPointTo</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#hydrateassociation">hydrateAssociation</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1462">src/dream/QueryDriver/Kysely.ts:1462</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="hydratepreload"><span>hydrate<wbr/>Preload</span><a href="#hydratepreload" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="hydratepreload-1"><span class="tsd-kind-call-signature">hydratePreload</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">this</span><span class="tsd-signature-symbol">:</span> <a href="db.KyselyQueryDriver.html" class="tsd-signature-type tsd-kind-class">KyselyQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">dream</span><span class="tsd-signature-symbol">:</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#hydratepreload-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Used by loadBuider</p>
|
|
142
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">this</span>: <a href="db.KyselyQueryDriver.html" class="tsd-signature-type tsd-kind-class">KyselyQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">dream</span>: <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#hydratepreload">hydratePreload</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1512">src/dream/QueryDriver/Kysely.ts:1512</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="joinedrowkeycolumns"><span>joined<wbr/>Row<wbr/>Key<wbr/>Columns</span><a href="#joinedrowkeycolumns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="joinedrowkeycolumns-1"><span class="tsd-kind-call-signature">joinedRowKeyColumns</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#joinedrowkeycolumns-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>The primary key of each table the Query reaches through a HasOne or
|
|
134
143
|
HasMany association (one it joins, one an association it joins goes
|
|
135
144
|
through, or one its association query is built on), namespaced by the
|
|
136
145
|
alias it is read from, in join order. They are read off the same join code
|
|
137
146
|
that emits the joins, by building the select.</p>
|
|
138
147
|
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of namespaced primary key columns</p>
|
|
139
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#joinedrowkeycolumns">joinedRowKeyColumns</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
148
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#joinedrowkeycolumns">joinedRowKeyColumns</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1297">src/dream/QueryDriver/Kysely.ts:1297</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="max"><span>max</span><a href="#max" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="max-1"><span class="tsd-kind-call-signature">max</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">columnName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#max-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the max value of the specified column
|
|
140
149
|
for this Query</p>
|
|
141
150
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">max</span><span class="hl-1">(</span><span class="hl-6">'id'</span><span class="hl-1">)</span><br/><span class="hl-7">// 99</span>
|
|
142
151
|
</code><button type="button">Copy</button></pre>
|
|
143
152
|
|
|
144
153
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">columnName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>a column name on the model</p>
|
|
145
154
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><p>the max value of the specified column for this Query</p>
|
|
146
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#max">max</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
155
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#max">max</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L666">src/dream/QueryDriver/Kysely.ts:666</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="maxby"><span>max<wbr/>By</span><a href="#maxby" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="maxby-1"><span class="tsd-kind-call-signature">maxBy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">groupColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">aggregatedColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><a href="#maxby-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the max value of the specified column within each group,
|
|
147
156
|
keyed by the value of the provided group column.</p>
|
|
148
157
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">CompositionAsset</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">maxBy</span><span class="hl-1">(</span><span class="hl-6">'name'</span><span class="hl-1">, </span><span class="hl-6">'score'</span><span class="hl-1">)</span><br/><span class="hl-7">// Map(2) { 'primary' => 9, 'secondary' => 4 }</span>
|
|
149
158
|
</code><button type="button">Copy</button></pre>
|
|
@@ -151,14 +160,14 @@ keyed by the value of the provided group column.</p>
|
|
|
151
160
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">groupColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to group by (base or joined-association-namespaced)</p>
|
|
152
161
|
</div></li><li><span><span class="tsd-kind-parameter">aggregatedColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to take the max of within each group</p>
|
|
153
162
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><p>A Map from each present group value to the max of the aggregated column in that group</p>
|
|
154
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#maxby">maxBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
163
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#maxby">maxBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L694">src/dream/QueryDriver/Kysely.ts:694</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="min"><span>min</span><a href="#min" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="min-1"><span class="tsd-kind-call-signature">min</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">columnName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#min-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the min value of the specified column
|
|
155
164
|
for this Query</p>
|
|
156
165
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">min</span><span class="hl-1">(</span><span class="hl-6">'id'</span><span class="hl-1">)</span><br/><span class="hl-7">// 1</span>
|
|
157
166
|
</code><button type="button">Copy</button></pre>
|
|
158
167
|
|
|
159
168
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">columnName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>a column name on the model</p>
|
|
160
169
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><p>the min value of the specified column for this Query</p>
|
|
161
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#min">min</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
170
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#min">min</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L712">src/dream/QueryDriver/Kysely.ts:712</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="minby"><span>min<wbr/>By</span><a href="#minby" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="minby-1"><span class="tsd-kind-call-signature">minBy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">groupColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">aggregatedColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><a href="#minby-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the min value of the specified column within each group,
|
|
162
171
|
keyed by the value of the provided group column.</p>
|
|
163
172
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">CompositionAsset</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">minBy</span><span class="hl-1">(</span><span class="hl-6">'name'</span><span class="hl-1">, </span><span class="hl-6">'score'</span><span class="hl-1">)</span><br/><span class="hl-7">// Map(2) { 'primary' => 1, 'secondary' => 4 }</span>
|
|
164
173
|
</code><button type="button">Copy</button></pre>
|
|
@@ -166,16 +175,16 @@ keyed by the value of the provided group column.</p>
|
|
|
166
175
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">groupColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to group by (base or joined-association-namespaced)</p>
|
|
167
176
|
</div></li><li><span><span class="tsd-kind-parameter">aggregatedColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to take the min of within each group</p>
|
|
168
177
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><p>A Map from each present group value to the min of the aggregated column in that group</p>
|
|
169
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#minby">minBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
178
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#minby">minBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L739">src/dream/QueryDriver/Kysely.ts:739</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="nestedselect"><span>nested<wbr/>Select</span><a href="#nestedselect" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="nestedselect-1"><span class="tsd-kind-call-signature">nestedSelect</span><span class="tsd-signature-symbol"><</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#nestedselectsimplefieldtype">SimpleFieldType</a> <span class="tsd-signature-keyword">extends</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">iterator</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toString"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"charAt"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"charCodeAt"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"concat"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"indexOf"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"lastIndexOf"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"localeCompare"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"match"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"replace"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"search"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"slice"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"split"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"substring"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toLowerCase"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toLocaleLowerCase"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toUpperCase"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toLocaleUpperCase"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trim"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"length"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"substr"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"valueOf"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"codePointAt"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"includes"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"endsWith"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"normalize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"repeat"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"startsWith"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"anchor"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"big"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"blink"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"bold"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"fixed"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"fontcolor"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"fontsize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"italics"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"link"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"small"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"strike"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"sub"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"sup"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"padStart"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"padEnd"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trimEnd"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trimStart"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trimLeft"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trimRight"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"matchAll"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"replaceAll"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"at"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toLocaleString"</span><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#nestedselectpluckthroughfieldtype">PluckThroughFieldType</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">this</span><span class="tsd-signature-symbol">:</span> <a href="db.KyselyQueryDriver.html" class="tsd-signature-type tsd-kind-class">KyselyQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">selection</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#nestedselectsimplefieldtype">SimpleFieldType</a> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#nestedselectpluckthroughfieldtype">PluckThroughFieldType</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#nestedselect-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a new Kysely SelectQueryBuilder instance to be used
|
|
170
179
|
in a sub Query</p>
|
|
171
180
|
<pre><code class="ts"><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">records</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">where</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">id:</span><span class="hl-1"> </span><span class="hl-4">Post</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">nestedSelect</span><span class="hl-1">(</span><span class="hl-6">'userId'</span><span class="hl-1">),</span><br/><span class="hl-1">}).</span><span class="hl-5">all</span><span class="hl-1">()</span><br/><span class="hl-7">// [User{id: 1}, ...]</span>
|
|
172
181
|
</code><button type="button">Copy</button></pre>
|
|
173
182
|
|
|
174
183
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="nestedselectsimplefieldtype"><span class="tsd-kind-type-parameter">SimpleFieldType</span> <span class="tsd-signature-keyword">extends</span> <br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">iterator</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toString"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"charAt"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"charCodeAt"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"concat"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"indexOf"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"lastIndexOf"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"localeCompare"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"match"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"replace"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"search"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"slice"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"split"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"substring"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toLowerCase"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toLocaleLowerCase"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toUpperCase"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toLocaleUpperCase"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trim"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"length"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"substr"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"valueOf"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"codePointAt"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"includes"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"endsWith"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"normalize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"repeat"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"startsWith"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"anchor"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"big"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"blink"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"bold"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"fixed"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"fontcolor"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"fontsize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"italics"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"link"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"small"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"strike"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"sub"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"sup"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"padStart"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"padEnd"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trimEnd"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trimStart"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trimLeft"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"trimRight"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"matchAll"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"replaceAll"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"at"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"toLocaleString"</span></span></li><li><span id="nestedselectpluckthroughfieldtype"><span class="tsd-kind-type-parameter">PluckThroughFieldType</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">this</span>: <a href="db.KyselyQueryDriver.html" class="tsd-signature-type tsd-kind-class">KyselyQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">selection</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#nestedselectsimplefieldtype">SimpleFieldType</a> <span class="tsd-signature-symbol">|</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#nestedselectpluckthroughfieldtype">PluckThroughFieldType</a></span><div class="tsd-comment tsd-typography"><p>the column to use for your nested Query</p>
|
|
175
184
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><p>A Kysely SelectQueryBuilder instance</p>
|
|
176
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#nestedselect">nestedSelect</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
185
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#nestedselect">nestedSelect</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L985">src/dream/QueryDriver/Kysely.ts:985</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="orderbydirection"><span>order<wbr/>By<wbr/>Direction</span><a href="#orderbydirection" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="orderbydirection-1"><span class="tsd-kind-call-signature">orderByDirection</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">direction</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">OrderDir</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">OrderByItemBuilder</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">OrderByItemBuilder</span><a href="#orderbydirection-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">direction</span>: <span class="tsd-signature-type">OrderDir</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">obj</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">OrderByItemBuilder</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">OrderByItemBuilder</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#orderbydirection">orderByDirection</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1438">src/dream/QueryDriver/Kysely.ts:1438</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="pluck"><span>pluck</span><a href="#pluck" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="pluck-1"><span class="tsd-kind-call-signature">pluck</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">fields</span><span class="tsd-signature-symbol">:</span> (<br/> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"table"</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-type">string</span><br/> )<span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#pluck-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Runs the query and extracts plucked values</p>
|
|
177
186
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">fields</span>: (<br/> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"table"</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-type">string</span><br/>)<span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><p>An array of plucked values</p>
|
|
178
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#pluck">pluck</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
187
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#pluck">pluck</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L946">src/dream/QueryDriver/Kysely.ts:946</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="pluckdistinctonpage"><span>pluck<wbr/>Distinct<wbr/>On<wbr/>Page</span><a href="#pluckdistinctonpage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="pluckdistinctonpage-1"><span class="tsd-kind-call-signature">pluckDistinctOnPage</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">rowsAfter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><a href="#pluckdistinctonpage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>A page of a select that carries DISTINCT ON (as a Query that calls
|
|
179
188
|
<code>distinct</code>, or an association that declares <code>distinct</code>, produces), or null
|
|
180
189
|
for any other select.</p>
|
|
181
190
|
<p>Such a select keeps the row of each group that sorts first in its ORDER
|
|
@@ -189,7 +198,7 @@ is read out of it under a short alias (as <code>pluck</code> reads them), since
|
|
|
189
198
|
joined table's column cannot be named outside it.</p>
|
|
190
199
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">rowsAfter</span>: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></span><div class="tsd-comment tsd-typography"><p>where statements, any of which a row of the page matches</p>
|
|
191
200
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span></h4><p>The page's rows, each an array of its order statement columns' values, or null</p>
|
|
192
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#pluckdistinctonpage">pluckDistinctOnPage</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
201
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#pluckdistinctonpage">pluckDistinctOnPage</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1330">src/dream/QueryDriver/Kysely.ts:1330</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="pluckdistinctonrowkeys"><span>pluck<wbr/>Distinct<wbr/>On<wbr/>Row<wbr/>Keys</span><a href="#pluckdistinctonrowkeys" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="pluckdistinctonrowkeys-1"><span class="tsd-kind-call-signature">pluckDistinctOnRowKeys</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">rowKeyColumns</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><a href="#pluckdistinctonrowkeys-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>For a select that carries DISTINCT ON (as a Query that calls <code>distinct</code>,
|
|
193
202
|
or an association that declares <code>distinct</code>, produces), the values of
|
|
194
203
|
<code>rowKeyColumns</code> for every row it returns, sorted by those columns,
|
|
195
204
|
ascending; null for any other select.</p>
|
|
@@ -199,19 +208,19 @@ group's row, and is read as a derived table, sorted outside it. Each of
|
|
|
199
208
|
them), since a joined table's column cannot be named outside it.</p>
|
|
200
209
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">rowKeyColumns</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>the namespaced columns that tell the select's rows apart</p>
|
|
201
210
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span></h4><p>The rows' values of <code>rowKeyColumns</code>, or null</p>
|
|
202
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#pluckdistinctonrowkeys">pluckDistinctOnRowKeys</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
211
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#pluckdistinctonrowkeys">pluckDistinctOnRowKeys</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1412">src/dream/QueryDriver/Kysely.ts:1412</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="sql"><span>sql</span><a href="#sql" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="sql-1"><span class="tsd-kind-call-signature">sql</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CompiledQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><a href="#sql-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the sql that would be executed by this Query</p>
|
|
203
212
|
<pre><code class="ts"><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">where</span><span class="hl-1">({ </span><span class="hl-4">email:</span><span class="hl-1"> </span><span class="hl-6">'how@yadoin'</span><span class="hl-1"> }).</span><span class="hl-5">sql</span><span class="hl-1">()</span><br/><span class="hl-7">// {</span><br/><span class="hl-7">// query: {</span><br/><span class="hl-7">// kind: 'SelectQueryNode',</span><br/><span class="hl-7">// from: { kind: 'FromNode', froms: [Array] },</span><br/><span class="hl-7">// selections: [ [Object] ],</span><br/><span class="hl-7">// distinctOn: undefined,</span><br/><span class="hl-7">// joins: undefined,</span><br/><span class="hl-7">// groupBy: undefined,</span><br/><span class="hl-7">// orderBy: undefined,</span><br/><span class="hl-7">// where: { kind: 'WhereNode', where: [Object] },</span><br/><span class="hl-7">// frontModifiers: undefined,</span><br/><span class="hl-7">// endModifiers: undefined,</span><br/><span class="hl-7">// limit: undefined,</span><br/><span class="hl-7">// offset: undefined,</span><br/><span class="hl-7">// with: undefined,</span><br/><span class="hl-7">// having: undefined,</span><br/><span class="hl-7">// explain: undefined,</span><br/><span class="hl-7">// setOperations: undefined</span><br/><span class="hl-7">// },</span><br/><span class="hl-7">// sql: 'select "users".* from "users" where ("users"."email" = $1 and "users"."deleted_at" is null)',</span><br/><span class="hl-7">// parameters: [ 'how@yadoin' ]</span><br/><span class="hl-7">//}</span>
|
|
204
213
|
</code><button type="button">Copy</button></pre>
|
|
205
214
|
|
|
206
215
|
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CompiledQuery</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span></h4><p>An object representing the underlying sql statement</p>
|
|
207
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#sql">sql</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
216
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#sql">sql</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1144">src/dream/QueryDriver/Kysely.ts:1144</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="sum"><span>sum</span><a href="#sum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="sum-1"><span class="tsd-kind-call-signature">sum</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">columnName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#sum-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the sum value of the specified column
|
|
208
217
|
for this Query</p>
|
|
209
218
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">Game</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">sum</span><span class="hl-1">(</span><span class="hl-6">'score'</span><span class="hl-1">)</span><br/><span class="hl-7">// 1</span>
|
|
210
219
|
</code><button type="button">Copy</button></pre>
|
|
211
220
|
|
|
212
221
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">columnName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>a column name on the model</p>
|
|
213
222
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><p>the sum of the values of the specified column for this Query</p>
|
|
214
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#sum">sum</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
223
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#sum">sum</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L757">src/dream/QueryDriver/Kysely.ts:757</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="sumby"><span>sum<wbr/>By</span><a href="#sumby" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="sumby-1"><span class="tsd-kind-call-signature">sumBy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">groupColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">aggregatedColumn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><a href="#sumby-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the sum of the specified column within each group,
|
|
215
224
|
keyed by the value of the provided group column.</p>
|
|
216
225
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">CompositionAsset</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">sumBy</span><span class="hl-1">(</span><span class="hl-6">'name'</span><span class="hl-1">, </span><span class="hl-6">'score'</span><span class="hl-1">)</span><br/><span class="hl-7">// Map(2) { 'primary' => 10, 'secondary' => 4 }</span>
|
|
217
226
|
</code><button type="button">Copy</button></pre>
|
|
@@ -219,7 +228,7 @@ keyed by the value of the provided group column.</p>
|
|
|
219
228
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">groupColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to group by (base or joined-association-namespaced)</p>
|
|
220
229
|
</div></li><li><span><span class="tsd-kind-parameter">aggregatedColumn</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the column to sum within each group</p>
|
|
221
230
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4><p>A Map from each present group value to the sum of the aggregated column in that group</p>
|
|
222
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#sumby">sumBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
231
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#sumby">sumBy</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L783">src/dream/QueryDriver/Kysely.ts:783</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="takeall"><span>take<wbr/>All</span><a href="#takeall" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="takeall-1"><span class="tsd-kind-call-signature">takeAll</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">columns</span><span class="tsd-signature-symbol">?:</span> (<br/> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"table"</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-type">string</span><br/> )<span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">lock</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#takeall-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Retrieves an array containing all records matching the Query.
|
|
223
232
|
Be careful using this, since it will attempt to pull every
|
|
224
233
|
record into memory at once. When querying might return a large
|
|
225
234
|
number of records, consider using <code>.findEach</code>, which will pull
|
|
@@ -228,18 +237,18 @@ the records in batches.</p>
|
|
|
228
237
|
</code><button type="button">Copy</button></pre>
|
|
229
238
|
|
|
230
239
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">columns</span><span class="tsd-signature-symbol">?:</span> (<br/> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"table"</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-type">string</span><br/> )<span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">lock</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><p>an array of dreams</p>
|
|
231
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#takeall">takeAll</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
240
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#takeall">takeAll</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L620">src/dream/QueryDriver/Kysely.ts:620</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="takeone"><span>take<wbr/>One</span><a href="#takeone" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="takeone-1"><span class="tsd-kind-call-signature">takeOne</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">this</span><span class="tsd-signature-symbol">:</span> <a href="db.KyselyQueryDriver.html" class="tsd-signature-type tsd-kind-class">KyselyQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><a href="#takeone-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Used for applying first and last queries</p>
|
|
232
241
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">this</span>: <a href="db.KyselyQueryDriver.html" class="tsd-signature-type tsd-kind-class">KyselyQueryDriver</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span></h4><p>A dream instance or null</p>
|
|
233
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#takeone">takeOne</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
242
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#takeone">takeOne</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L562">src/dream/QueryDriver/Kysely.ts:562</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="tokysely"><span>to<wbr/>Kysely</span><a href="#tokysely" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="tokysely-1"><span class="tsd-kind-call-signature">toKysely</span><span class="tsd-signature-symbol"><</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#tokyselyquerytype">QueryType</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"update"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"select"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"delete"</span><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#tokyselydbtype">DbType</a> <span class="tsd-signature-symbol">=</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">=</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"table"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#tokyselytokyselyreturntype">ToKyselyReturnType</a> <span class="tsd-signature-symbol">=</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselyquerytype">QueryType</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"select"</span><br/> <span class="tsd-signature-symbol">?</span> <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><br/> <span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselyquerytype">QueryType</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"delete"</span><br/> <span class="tsd-signature-symbol">?</span> <span class="tsd-signature-type">DeleteQueryBuilder</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><br/> <span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselyquerytype">QueryType</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"update"</span><br/> <span class="tsd-signature-symbol">?</span> <span class="tsd-signature-type">UpdateQueryBuilder</span><span class="tsd-signature-symbol"><</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><br/> <span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">never</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselyquerytype">QueryType</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytokyselyreturntype">ToKyselyReturnType</a><a href="#tokysely-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Converts the given dream class into a Kysely query, enabling
|
|
234
243
|
you to build custom queries using the Kysely API</p>
|
|
235
244
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">query</span><span class="hl-1">().</span><span class="hl-5">toKysely</span><span class="hl-1">(</span><span class="hl-6">'select'</span><span class="hl-1">).</span><span class="hl-5">where</span><span class="hl-1">(</span><span class="hl-6">'email'</span><span class="hl-1">, </span><span class="hl-6">'='</span><span class="hl-1">, </span><span class="hl-6">'how@yadoin'</span><span class="hl-1">).</span><span class="hl-5">execute</span><span class="hl-1">()</span>
|
|
236
245
|
</code><button type="button">Copy</button></pre>
|
|
237
246
|
|
|
238
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="tokyselyquerytype"><span class="tsd-kind-type-parameter">QueryType</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"update"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"
|
|
247
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="tokyselyquerytype"><span class="tsd-kind-type-parameter">QueryType</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"update"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"select"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"delete"</span></span></li><li><span id="tokyselydbtype"><span class="tsd-kind-type-parameter">DbType</span> = <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span></span></li><li><span id="tokyselytablenames"><span class="tsd-kind-type-parameter">TableNames</span> = <a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"table"</span><span class="tsd-signature-symbol">]</span></span></li><li><span id="tokyselytokyselyreturntype"><span class="tsd-kind-type-parameter">ToKyselyReturnType</span> = <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselyquerytype">QueryType</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"select"</span><br/> <span class="tsd-signature-symbol">?</span> <span class="tsd-signature-type">SelectQueryBuilder</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><br/> <span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselyquerytype">QueryType</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"delete"</span><br/> <span class="tsd-signature-symbol">?</span> <span class="tsd-signature-type">DeleteQueryBuilder</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span><br/> <span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselyquerytype">QueryType</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">"update"</span><br/> <span class="tsd-signature-symbol">?</span> <span class="tsd-signature-type">UpdateQueryBuilder</span><span class="tsd-signature-symbol"><</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytablenames">TableNames</a> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselydbtype">DbType</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><br/> <span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">never</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselyquerytype">QueryType</a></span><div class="tsd-comment tsd-typography"><p>the type of Kysely query builder instance you would like to obtain</p>
|
|
239
248
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#tokyselytokyselyreturntype">ToKyselyReturnType</a></h4><p>A Kysely query. Depending on the type passed, it will return either a SelectQueryBuilder, DeleteQueryBuilder, or an UpdateQueryBuilder</p>
|
|
240
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#tokysely">toKysely</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
249
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#tokysely">toKysely</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L462">src/dream/QueryDriver/Kysely.ts:462</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="update"><span>update</span><a href="#update" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="update-1"><span class="tsd-kind-call-signature">update</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">attributes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DrainOuterGeneric</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">in</span> <span class="tsd-signature-type">string</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">UpdateType</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"table"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><a href="#update-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>executes provided query instance as an update query.</p>
|
|
241
250
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">attributes</span>: <span class="tsd-signature-type">DrainOuterGeneric</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">in</span> <span class="tsd-signature-type">string</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">UpdateType</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dreaminstance">DreamInstance</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"table"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type tsd-kind-type-parameter">K</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4><p>the number of updated rows</p>
|
|
242
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#update">update</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
251
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#update">update</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1013">src/dream/QueryDriver/Kysely.ts:1013</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="acquireadvisorytransactionlocks"><code class="tsd-tag">Static</code><span>acquire<wbr/>Advisory<wbr/>Transaction<wbr/>Locks</span><a href="#acquireadvisorytransactionlocks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="acquireadvisorytransactionlocks-1"><span class="tsd-kind-call-signature">acquireAdvisoryTransactionLocks</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">txn</span><span class="tsd-signature-symbol">:</span> <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">keys</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#acquireadvisorytransactionlocks-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Postgres implementation of the transaction-scoped advisory lock seam.</p>
|
|
243
252
|
<p>Uses the single-<code>bigint</code> form <code>pg_advisory_xact_lock(bigint)</code>, whose lock
|
|
244
253
|
space is distinct from the two-<code>int4</code> form the test-database pool claims
|
|
245
254
|
with (see <a href="#opentestdatabaselocksession" class="tsd-kind-method">openTestDatabaseLockSession</a>), so an application lock can
|
|
@@ -267,9 +276,16 @@ means by it, and is sent as the bound rather than skipped: an application
|
|
|
267
276
|
whose connection carries a <code>lock_timeout</code> of its own would otherwise have
|
|
268
277
|
its acquisition cancelled by that bound, which is neither the unbounded
|
|
269
278
|
wait <code>0</code> asks for nor a cancellation this driver could translate.</p>
|
|
270
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">txn</span>: <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">keys</span>: <span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#acquireadvisorytransactionlocks">acquireAdvisoryTransactionLocks</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
271
|
-
|
|
272
|
-
|
|
279
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">txn</span>: <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">keys</span>: <span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#acquireadvisorytransactionlocks">acquireAdvisoryTransactionLocks</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L508">src/dream/QueryDriver/Postgres.ts:508</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="dataincompatiblewithdatabasefielderror"><code class="tsd-tag">Static</code><span>data<wbr/>Incompatible<wbr/>With<wbr/>Database<wbr/>Field<wbr/>Error</span><a href="#dataincompatiblewithdatabasefielderror" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="dataincompatiblewithdatabasefielderror-1"><span class="tsd-kind-call-signature">dataIncompatibleWithDatabaseFieldError</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span><br/> <span class="tsd-signature-symbol">|</span> <a href="errors.CheckConstraintViolation.html" class="tsd-signature-type tsd-kind-class">CheckConstraintViolation</a><br/> <span class="tsd-signature-symbol">|</span> <a href="errors.ColumnOverflow.html" class="tsd-signature-type tsd-kind-class">ColumnOverflow</a><br/> <span class="tsd-signature-symbol">|</span> <a href="errors.DataTypeColumnTypeMismatch.html" class="tsd-signature-type tsd-kind-class">DataTypeColumnTypeMismatch</a><br/> <span class="tsd-signature-symbol">|</span> <a href="errors.NotNullViolation.html" class="tsd-signature-type tsd-kind-class">NotNullViolation</a><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><a href="#dataincompatiblewithdatabasefielderror-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>The Dream error to raise in place of <code>error</code> when <code>error</code> is the database
|
|
280
|
+
rejecting a value for the column it is written to or compared with: a value
|
|
281
|
+
the column's type cannot represent, a null in a NOT NULL column, or a CHECK
|
|
282
|
+
constraint violation. Saves and reads (selects, aggregates, plucks and
|
|
283
|
+
preloads) raise the returned error; bulk <code>Query#update</code> and <code>Query#delete</code>
|
|
284
|
+
do not consult this. A driver that does not recognize the error returns
|
|
285
|
+
null, and the original error propagates unchanged.</p>
|
|
286
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">unknown</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <br/> <span class="tsd-signature-symbol">|</span> <a href="errors.CheckConstraintViolation.html" class="tsd-signature-type tsd-kind-class">CheckConstraintViolation</a><br/> <span class="tsd-signature-symbol">|</span> <a href="errors.ColumnOverflow.html" class="tsd-signature-type tsd-kind-class">ColumnOverflow</a><br/> <span class="tsd-signature-symbol">|</span> <a href="errors.DataTypeColumnTypeMismatch.html" class="tsd-signature-type tsd-kind-class">DataTypeColumnTypeMismatch</a><br/> <span class="tsd-signature-symbol">|</span> <a href="errors.NotNullViolation.html" class="tsd-signature-type tsd-kind-class">NotNullViolation</a><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dataincompatiblewithdatabasefielderror">dataIncompatibleWithDatabaseFieldError</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L427">src/dream/QueryDriver/Postgres.ts:427</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="dbcreate"><code class="tsd-tag">Static</code><span>db<wbr/>Create</span><a href="#dbcreate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="dbcreate-1"><span class="tsd-kind-call-signature">dbCreate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#dbcreate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>create the database. Must respond to the NODE_ENV value.</p>
|
|
287
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dbcreate">dbCreate</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L91">src/dream/QueryDriver/Postgres.ts:91</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="dbdrop"><code class="tsd-tag">Static</code><span>db<wbr/>Drop</span><a href="#dbdrop" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="dbdrop-1"><span class="tsd-kind-call-signature">dbDrop</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#dbdrop-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>delete the database. Must respond to the NODE_ENV value.</p>
|
|
288
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dbdrop">dbDrop</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L112">src/dream/QueryDriver/Postgres.ts:112</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="dbfor-2"><code class="tsd-tag">Static</code><span>db<wbr/>For</span><a href="#dbfor-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="dbfor-3"><span class="tsd-kind-call-signature">dbFor</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#dbfori">I</a> <span class="tsd-signature-keyword">extends</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">dbConnectionType</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">dreamTransaction</span><span class="tsd-signature-symbol">?:</span> <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbfori">I</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbfori">I</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Kysely</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbfori">I</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbfori">I</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span><a href="#dbfor-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="dbfori"><span class="tsd-kind-type-parameter">I</span> <span class="tsd-signature-keyword">extends</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">dbConnectionType</span>: <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">dreamTransaction</span>: <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbfori">I</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbfori">I</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Kysely</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbfori">I</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#dbfori">I</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"DB"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dbfor-2">dbFor</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L189">src/dream/QueryDriver/Kysely.ts:189</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="destroydream"><code class="tsd-tag">Static</code><span>destroy<wbr/>Dream</span><a href="#destroydream" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="destroydream-1"><span class="tsd-kind-call-signature">destroyDream</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">dream</span><span class="tsd-signature-symbol">:</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">txn</span><span class="tsd-signature-symbol">:</span> <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">reallyDestroy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><a href="#destroydream-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>destroys a dream, possibly implementing soft delete if reallyDestroy is false
|
|
273
289
|
and the record being deleted implements soft delete. Does nothing at all when a
|
|
274
290
|
beforeDestroy hook called <code>preventDeletion</code>.</p>
|
|
275
291
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dream</span>: <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span><div class="tsd-comment tsd-typography"><p>the dream instance you wish to destroy</p>
|
|
@@ -278,33 +294,33 @@ beforeDestroy hook called <code>preventDeletion</code>.</p>
|
|
|
278
294
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4><p>the number of rows removed — zero when a <code>preventDeletion</code> veto
|
|
279
295
|
stopped the write, and zero when the row was already gone, which on the
|
|
280
296
|
soft delete path includes a row that is already soft deleted</p>
|
|
281
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#destroydream">destroyDream</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
297
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#destroydream">destroyDream</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L433">src/dream/QueryDriver/Kysely.ts:433</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="dialectprovider"><code class="tsd-tag">Static</code><span>dialect<wbr/>Provider</span><a href="#dialectprovider" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="dialectprovider-1"><span class="tsd-kind-call-signature">dialectProvider</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">dbConnectionType</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DialectProviderCb</span><a href="#dialectprovider-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">dbConnectionType</span>: <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">DialectProviderCb</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#dialectprovider">dialectProvider</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L202">src/dream/QueryDriver/Kysely.ts:202</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="duplicatedatabase"><code class="tsd-tag">Static</code><span>duplicate<wbr/>Database</span><a href="#duplicatedatabase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="duplicatedatabase-1"><span class="tsd-kind-call-signature">duplicateDatabase</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#duplicatedatabase-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#duplicatedatabase">duplicateDatabase</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L309">src/dream/QueryDriver/Postgres.ts:309</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="ensureallmigrationshavebeenrun"><code class="tsd-tag">Static</code><span>ensure<wbr/>All<wbr/>Migrations<wbr/>Have<wbr/>Been<wbr/>Run</span><a href="#ensureallmigrationshavebeenrun" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="ensureallmigrationshavebeenrun-1"><span class="tsd-kind-call-signature">ensureAllMigrationsHaveBeenRun</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#ensureallmigrationshavebeenrun-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#ensureallmigrationshavebeenrun">ensureAllMigrationsHaveBeenRun</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L238">src/dream/QueryDriver/Kysely.ts:238</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="foreignkeytypefromprimarykey"><code class="tsd-tag">Static</code><span>foreign<wbr/>Key<wbr/>Type<wbr/>From<wbr/>Primary<wbr/>Key</span><a href="#foreignkeytypefromprimarykey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="foreignkeytypefromprimarykey-1"><span class="tsd-kind-call-signature">foreignKeyTypeFromPrimaryKey</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">primaryKey</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">LegacyCompatiblePrimaryKeyType</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"bigint"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"integer"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"uuid"</span><a href="#foreignkeytypefromprimarykey-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>returns the foreign key type based on the primary key received.
|
|
282
298
|
gives the driver the opportunity to switch i.e. bigserial to bigint.</p>
|
|
283
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">primaryKey</span>: <span class="tsd-signature-type">LegacyCompatiblePrimaryKeyType</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">"bigint"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"integer"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"uuid"</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#foreignkeytypefromprimarykey">foreignKeyTypeFromPrimaryKey</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
299
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">primaryKey</span>: <span class="tsd-signature-type">LegacyCompatiblePrimaryKeyType</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">"bigint"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"integer"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"uuid"</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#foreignkeytypefromprimarykey">foreignKeyTypeFromPrimaryKey</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L385">src/dream/QueryDriver/Kysely.ts:385</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="generatemigration"><code class="tsd-tag">Static</code><span>generate<wbr/>Migration</span><a href="#generatemigration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="generatemigration-1"><span class="tsd-kind-call-signature">generateMigration</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">migrationName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">columnsWithTypes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#generatemigration-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>This should build a new migration file in the migrations folder
|
|
284
300
|
of your application. This will then need to be read and run
|
|
285
301
|
whenever the <code>migrate</code> method is called. The filename should
|
|
286
302
|
contain a timestamp at the front of the filename, so that it
|
|
287
303
|
is sorted by date in the file tree, and, more importantly, so
|
|
288
304
|
they can be run in order by your migration runner.</p>
|
|
289
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">migrationName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">columnsWithTypes</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#generatemigration">generateMigration</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
305
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">migrationName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">columnsWithTypes</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#generatemigration">generateMigration</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L295">src/dream/QueryDriver/Kysely.ts:295</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="introspectdatabase"><code class="tsd-tag">Static</code><span>introspect<wbr/>Database</span><a href="#introspectdatabase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="introspectdatabase-1"><span class="tsd-kind-call-signature">introspectDatabase</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/types.IntrospectedDatabase.html" class="tsd-signature-type tsd-kind-interface">IntrospectedDatabase</a><span class="tsd-signature-symbol">></span><a href="#introspectdatabase-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the tables, views, materialized views, and partitioned and foreign
|
|
290
306
|
tables of every schema the connection's user can use, except Postgres's
|
|
291
307
|
own schemas, tables that inherit from another (partitions included) and
|
|
292
308
|
Kysely's migration tables. A domain column reads as the type at the
|
|
293
309
|
bottom of its domains. An enum outside the <code>public</code> schema is named
|
|
294
310
|
<code><schema>.<name></code>.</p>
|
|
295
311
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the connection to read</p>
|
|
296
|
-
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/types.IntrospectedDatabase.html" class="tsd-signature-type tsd-kind-interface">IntrospectedDatabase</a><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#introspectdatabase">introspectDatabase</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
312
|
+
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/types.IntrospectedDatabase.html" class="tsd-signature-type tsd-kind-interface">IntrospectedDatabase</a><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#introspectdatabase">introspectDatabase</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L217">src/dream/QueryDriver/Postgres.ts:217</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="isdeadlock"><code class="tsd-tag">Static</code><span>is<wbr/>Deadlock</span><a href="#isdeadlock" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="isdeadlock-1"><span class="tsd-kind-call-signature">isDeadlock</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#isdeadlock-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Whether <code>error</code> is the database aborting a transaction to break a deadlock
|
|
297
313
|
with another. <code>withConcurrentWriterRetry</code> reruns a transaction of Dream's
|
|
298
314
|
own that was aborted this way. A driver that does not recognize one reports
|
|
299
315
|
false, and nothing is retried.</p>
|
|
300
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">unknown</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#isdeadlock">isDeadlock</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
316
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">unknown</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#isdeadlock">isDeadlock</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L423">src/dream/QueryDriver/Postgres.ts:423</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="isuniqueconstraintviolation"><code class="tsd-tag">Static</code><span>is<wbr/>Unique<wbr/>Constraint<wbr/>Violation</span><a href="#isuniqueconstraintviolation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="isuniqueconstraintviolation-1"><span class="tsd-kind-call-signature">isUniqueConstraintViolation</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#isuniqueconstraintviolation-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Whether <code>error</code> is the database refusing a write for violating a unique
|
|
301
317
|
constraint. <code>withConcurrentWriterRetry</code> asks this of an error raised at
|
|
302
318
|
COMMIT, which is where a <code>DEFERRABLE INITIALLY DEFERRED</code> constraint — the
|
|
303
319
|
one <code>DreamMigrationHelpers.addDeferrableUniqueConstraint</code> declares — reports
|
|
304
320
|
a collision. A driver that does not recognize one reports false, and nothing
|
|
305
321
|
is retried.</p>
|
|
306
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">unknown</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#isuniqueconstraintviolation">isUniqueConstraintViolation</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
307
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#migrate">migrate</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
322
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">unknown</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#isuniqueconstraintviolation">isUniqueConstraintViolation</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L375">src/dream/QueryDriver/Postgres.ts:375</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="migrate"><code class="tsd-tag">Static</code><span>migrate</span><a href="#migrate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="migrate-1"><span class="tsd-kind-call-signature">migrate</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#migrate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>migrate the database. Must respond to the NODE_ENV value.</p>
|
|
323
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#migrate">migrate</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L250">src/dream/QueryDriver/Kysely.ts:250</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="opentestdatabaselocksession"><code class="tsd-tag">Static</code><span>open<wbr/>Test<wbr/>Database<wbr/>Lock<wbr/>Session</span><a href="#opentestdatabaselocksession" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="opentestdatabaselocksession-1"><span class="tsd-kind-call-signature">openTestDatabaseLockSession</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TestDatabaseLockSession</span><span class="tsd-signature-symbol">></span><a href="#opentestdatabaselocksession-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Postgres implementation of the per-worker test-database claim seam (see
|
|
308
324
|
TestDatabaseLockSession and <code>src/db/testDatabasePool.ts</code>).</p>
|
|
309
325
|
<p>Postgres advisory locks are global to the cluster (not scoped to a single
|
|
310
326
|
database), so one dedicated connection — to the <code>postgres</code> maintenance
|
|
@@ -315,10 +331,15 @@ application code typically uses, so a claim can never clash with an
|
|
|
315
331
|
app-level advisory lock. <code>key1</code> folds a hash of the lock namespace (the
|
|
316
332
|
base database name) into a fixed dream-pool constant; <code>key2</code> is the pool
|
|
317
333
|
index. The lock auto-releases when the connection drops on process exit.</p>
|
|
318
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TestDatabaseLockSession</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#opentestdatabaselocksession">openTestDatabaseLockSession</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
334
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TestDatabaseLockSession</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#opentestdatabaselocksession">openTestDatabaseLockSession</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L566">src/dream/QueryDriver/Postgres.ts:566</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="primarykeytype"><code class="tsd-tag">Static</code><span>primary<wbr/>Key<wbr/>Type</span><a href="#primarykeytype" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="primarykeytype-1"><span class="tsd-kind-call-signature">primaryKeyType</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">LegacyCompatiblePrimaryKeyType</span><a href="#primarykeytype-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>used to return the computed primary key type based
|
|
319
335
|
on the primaryKeyType set in the DreamApp class.</p>
|
|
320
|
-
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">LegacyCompatiblePrimaryKeyType</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#primarykeytype">primaryKeyType</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
321
|
-
|
|
336
|
+
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">LegacyCompatiblePrimaryKeyType</span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#primarykeytype">primaryKeyType</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L395">src/dream/QueryDriver/Kysely.ts:395</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="rejectsanyvalueforcolumntype"><code class="tsd-tag">Static</code><span>rejects<wbr/>Any<wbr/>Value<wbr/>For<wbr/>Column<wbr/>Type</span><a href="#rejectsanyvalueforcolumntype" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="rejectsanyvalueforcolumntype-1"><span class="tsd-kind-call-signature">rejectsAnyValueForColumnType</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">dbConnectionType</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">values</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">dbType</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span><a href="#rejectsanyvalueforcolumntype-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Postgres implementation of <a href="db.QueryDriverBase.html#rejectsanyvalueforcolumntype" class="tsd-kind-method">QueryDriverBase.rejectsAnyValueForColumnType</a>.
|
|
337
|
+
One statement casts every value to its type, so Postgres's own input
|
|
338
|
+
function for each type is the judge: a cast it rejects raises <code>22P02</code> or
|
|
339
|
+
<code>22003</code>. Callers never ask inside a transaction, which a rejected cast
|
|
340
|
+
would abort.</p>
|
|
341
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">dbConnectionType</span>: <a href="../types/types.DbConnectionType.html" class="tsd-signature-type tsd-kind-type-alias">DbConnectionType</a></span></li><li><span><span class="tsd-kind-parameter">values</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">dbType</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#rejectsanyvalueforcolumntype">rejectsAnyValueForColumnType</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L454">src/dream/QueryDriver/Postgres.ts:454</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="rollback"><code class="tsd-tag">Static</code><span>rollback</span><a href="#rollback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="rollback-1"><span class="tsd-kind-call-signature">rollback</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">steps</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#rollback-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>rollback the database. Must respond to the NODE_ENV value.</p>
|
|
342
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">opts</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">steps</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#rollback">rollback</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L268">src/dream/QueryDriver/Kysely.ts:268</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="savedream"><code class="tsd-tag">Static</code><span>save<wbr/>Dream</span><a href="#savedream" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="savedream-1"><span class="tsd-kind-call-signature">saveDream</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">dream</span><span class="tsd-signature-symbol">:</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">txn</span><span class="tsd-signature-symbol">?:</span> <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><a href="#savedream-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>persists any unsaved changes to the database. If a transaction
|
|
322
343
|
is provided as a second argument, it will use that transaction
|
|
323
344
|
to encapsulate the persisting of the dream, as well as any
|
|
324
345
|
subsequent model hooks that are fired.</p>
|
|
@@ -340,18 +361,23 @@ Postgres raises <code>cached plan must not change result type</code> (the reason
|
|
|
340
361
|
Rails added <code>enumerate_columns_in_select_statements</code>). If a future
|
|
341
362
|
driver or pooling layer enables named prepared statements, revisit
|
|
342
363
|
every <code>RETURNING *</code> / <code>select *</code> in this driver.</p>
|
|
343
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dream</span>: <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li><li><span><span class="tsd-kind-parameter">txn</span>: <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#savedream">saveDream</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
364
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dream</span>: <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li><li><span><span class="tsd-kind-parameter">txn</span>: <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#savedream">saveDream</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L1048">src/dream/QueryDriver/Kysely.ts:1048</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="setdatabasetypeparsers"><code class="tsd-tag">Static</code><span>set<wbr/>Database<wbr/>Type<wbr/>Parsers</span><a href="#setdatabasetypeparsers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="setdatabasetypeparsers-1"><span class="tsd-kind-call-signature">setDatabaseTypeParsers</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#setdatabasetypeparsers-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>this method is called when dream is initializing, and is used
|
|
344
365
|
to configure the database to utilize custom type parsers for
|
|
345
366
|
a variety of data types.</p>
|
|
346
367
|
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>the name of the connection you are doing this for</p>
|
|
347
368
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><p>void</p>
|
|
348
|
-
<aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#setdatabasetypeparsers">setDatabaseTypeParsers</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
369
|
+
<aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#setdatabasetypeparsers">setDatabaseTypeParsers</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L140">src/dream/QueryDriver/Postgres.ts:140</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="sync"><code class="tsd-tag">Static</code><span>sync</span><a href="#sync" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="sync-1"><span class="tsd-kind-call-signature">sync</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">onSync</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">schemaOnly</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#sync-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>defines the syncing behavior for dream and psychic,
|
|
349
370
|
which is run whenever the <code>sync</code> command is called.</p>
|
|
350
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">onSync</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">schemaOnly</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#sync">sync</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/
|
|
371
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">onSync</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></span></li><li><span><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">schemaOnly</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#sync">sync</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L307">src/dream/QueryDriver/Kysely.ts:307</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="transaction"><code class="tsd-tag">Static</code><span>transaction</span><a href="#transaction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="transaction-1"><span class="tsd-kind-call-signature">transaction</span><span class="tsd-signature-symbol"><</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#transactiondreaminstance">DreamInstance</a> <span class="tsd-signature-keyword">extends</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#transactioncb">CB</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">txn</span><span class="tsd-signature-symbol">:</span> <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#transactiondreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">,</span><br/> <a class="tsd-signature-type tsd-kind-type-parameter" href="#transactionrettype">RetType</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">dreamInstance</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#transactiondreaminstance">DreamInstance</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#transactioncb">CB</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#transactionrettype">RetType</a><span class="tsd-signature-symbol">></span><a href="#transaction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Builds a new DreamTransaction instance, provides
|
|
351
372
|
the instance to the provided callback.</p>
|
|
352
373
|
<pre><code class="ts"><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">ApplicationModel</span><span class="hl-1">.</span><span class="hl-5">transaction</span><span class="hl-1">(</span><span class="hl-0">async</span><span class="hl-1"> </span><span class="hl-4">txn</span><span class="hl-1"> </span><span class="hl-0">=></span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">user</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">User</span><span class="hl-1">.</span><span class="hl-5">txn</span><span class="hl-1">(</span><span class="hl-4">txn</span><span class="hl-1">).</span><span class="hl-5">create</span><span class="hl-1">({ </span><span class="hl-4">email:</span><span class="hl-1"> </span><span class="hl-6">'how@yadoin'</span><span class="hl-1"> })</span><br/><span class="hl-1"> </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">Pet</span><span class="hl-1">.</span><span class="hl-5">txn</span><span class="hl-1">(</span><span class="hl-4">txn</span><span class="hl-1">).</span><span class="hl-5">create</span><span class="hl-1">({ </span><span class="hl-4">user</span><span class="hl-1"> })</span><br/><span class="hl-1">})</span>
|
|
353
374
|
</code><button type="button">Copy</button></pre>
|
|
354
375
|
|
|
355
376
|
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="transactiondreaminstance"><span class="tsd-kind-type-parameter">DreamInstance</span> <span class="tsd-signature-keyword">extends</span> <a href="index.Dream.html" class="tsd-signature-type tsd-kind-class">Dream</a></span></li><li><span id="transactioncb"><span class="tsd-kind-type-parameter">CB</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">txn</span><span class="tsd-signature-symbol">:</span> <a href="index.DreamTransaction.html" class="tsd-signature-type tsd-kind-class">DreamTransaction</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#transactiondreaminstance">DreamInstance</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">unknown</span></span></li><li><span id="transactionrettype"><span class="tsd-kind-type-parameter">RetType</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">unknown</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dreamInstance</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#transactiondreaminstance">DreamInstance</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#transactioncb">CB</a></span><div class="tsd-comment tsd-typography"><p>A callback function to call. The transaction provided to the callback can be passed to subsequent database calls within the transaction callback</p>
|
|
356
377
|
</div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="db.KyselyQueryDriver.html#transactionrettype">RetType</a><span class="tsd-signature-symbol">></span></h4><p>void</p>
|
|
357
|
-
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#transaction">transaction</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/9188c26496ce9478b262674eda3a0a02480c329e/src/dream/QueryDriver/Kysely.ts#L518">src/dream/QueryDriver/Kysely.ts:518</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#connectionoverride" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>connection<wbr/>Override</span></a><a href="#dreamclass" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dream<wbr/>Class</span></a><a href="#dreaminstance-1" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dream<wbr/>Instance</span></a><a href="#dreamtransaction" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dream<wbr/>Transaction</span></a><a href="#innerjoindreamclasses" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>inner<wbr/>Join<wbr/>Dream<wbr/>Classes</span></a><a href="#query" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>query</span></a><a href="#supportsadvisorytransactionlocks"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>supports<wbr/>Advisory<wbr/>Transaction<wbr/>Locks</span></a><a href="#supportsparalleltestdatabases"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>supports<wbr/>Parallel<wbr/>Test<wbr/>Databases</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#applyrowlock"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>apply<wbr/>Row<wbr/>Lock</span></a><a href="#assertmutationpreservesassociationquery" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>assert<wbr/>Mutation<wbr/>Preserves<wbr/>Association<wbr/>Query</span></a><a href="#associationorderstatements" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>association<wbr/>Order<wbr/>Statements</span></a><a href="#avg" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>avg</span></a><a href="#avgby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>avg<wbr/>By</span></a><a href="#count" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>count</span></a><a href="#countby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>count<wbr/>By</span></a><a href="#dbconnectiontype" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Connection<wbr/>Type</span></a><a href="#dbfor" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>For</span></a><a href="#dbresulttodreaminstance" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Result<wbr/>To<wbr/>Dream<wbr/>Instance</span></a><a href="#delete" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete</span></a><a href="#hydrateassociation" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>hydrate<wbr/>Association</span></a><a href="#hydratepreload" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>hydrate<wbr/>Preload</span></a><a href="#joinedrowkeycolumns" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>joined<wbr/>Row<wbr/>Key<wbr/>Columns</span></a><a href="#max" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>max</span></a><a href="#maxby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>max<wbr/>By</span></a><a href="#min" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>min</span></a><a href="#minby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>min<wbr/>By</span></a><a href="#nestedselect" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>nested<wbr/>Select</span></a><a href="#orderbydirection" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>order<wbr/>By<wbr/>Direction</span></a><a href="#pluck" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pluck</span></a><a href="#pluckdistinctonpage" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pluck<wbr/>Distinct<wbr/>On<wbr/>Page</span></a><a href="#pluckdistinctonrowkeys" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pluck<wbr/>Distinct<wbr/>On<wbr/>Row<wbr/>Keys</span></a><a href="#sql" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sql</span></a><a href="#sum" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sum</span></a><a href="#sumby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sum<wbr/>By</span></a><a href="#takeall" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>take<wbr/>All</span></a><a href="#takeone" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>take<wbr/>One</span></a><a href="#tokysely" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Kysely</span></a><a href="#update" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update</span></a><a href="#acquireadvisorytransactionlocks"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>acquire<wbr/>Advisory<wbr/>Transaction<wbr/>Locks</span></a><a href="#dbcreate"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Create</span></a><a href="#dbdrop"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Drop</span></a><a href="#dbfor-2" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>For</span></a><a href="#destroydream" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy<wbr/>Dream</span></a><a href="#dialectprovider" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dialect<wbr/>Provider</span></a><a href="#duplicatedatabase"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>duplicate<wbr/>Database</span></a><a href="#ensureallmigrationshavebeenrun" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ensure<wbr/>All<wbr/>Migrations<wbr/>Have<wbr/>Been<wbr/>Run</span></a><a href="#foreignkeytypefromprimarykey" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>foreign<wbr/>Key<wbr/>Type<wbr/>From<wbr/>Primary<wbr/>Key</span></a><a href="#generatemigration" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate<wbr/>Migration</span></a><a href="#introspectdatabase"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>introspect<wbr/>Database</span></a><a href="#isdeadlock"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Deadlock</span></a><a href="#isuniqueconstraintviolation"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Unique<wbr/>Constraint<wbr/>Violation</span></a><a href="#migrate" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>migrate</span></a><a href="#opentestdatabaselocksession"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>open<wbr/>Test<wbr/>Database<wbr/>Lock<wbr/>Session</span></a><a href="#primarykeytype" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>primary<wbr/>Key<wbr/>Type</span></a><a href="#rollback" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rollback</span></a><a href="#savedream" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Dream</span></a><a href="#setdatabasetypeparsers"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Database<wbr/>Type<wbr/>Parsers</span></a><a href="#sync" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sync</span></a><a href="#transaction" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>transaction</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@rvoh/dream</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
378
|
+
<aside class="tsd-sources"><p>Inherited from <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#transaction">transaction</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Kysely.ts#L510">src/dream/QueryDriver/Kysely.ts:510</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="violateduniqueindexcolumns"><code class="tsd-tag">Static</code><span>violated<wbr/>Unique<wbr/>Index<wbr/>Columns</span><a href="#violateduniqueindexcolumns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="violateduniqueindexcolumns-1"><span class="tsd-kind-call-signature">violatedUniqueIndexColumns</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">connectionName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">table</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span><a href="#violateduniqueindexcolumns-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Internal</code><div class="tsd-comment tsd-typography"><p>Postgres implementation of <a href="db.QueryDriverBase.html#violateduniqueindexcolumns" class="tsd-kind-method">QueryDriverBase.violatedUniqueIndexColumns</a>.
|
|
379
|
+
A unique violation names the index it hit in the error's <code>constraint</code>
|
|
380
|
+
field (a unique constraint's index shares its name), and one catalog query
|
|
381
|
+
reads that index's key columns. <code>INCLUDE</code> columns are not keys and are
|
|
382
|
+
left out.</p>
|
|
383
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">connectionName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">unknown</span></span></li><li><span><span class="tsd-kind-parameter">table</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><p>Overrides <a href="db.KyselyQueryDriver.html">KyselyQueryDriver</a>.<a href="db.KyselyQueryDriver.html#violateduniqueindexcolumns">violatedUniqueIndexColumns</a></p><ul><li>Defined in <a href="https://github.com/rvohealth/dream/blob/27884e011ce1b1a474b136e1f5b806a64fa8f5bc/src/dream/QueryDriver/Postgres.ts#L388">src/dream/QueryDriver/Postgres.ts:388</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#connectionoverride" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>connection<wbr/>Override</span></a><a href="#dreamclass" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dream<wbr/>Class</span></a><a href="#dreaminstance-1" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dream<wbr/>Instance</span></a><a href="#dreamtransaction" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dream<wbr/>Transaction</span></a><a href="#innerjoindreamclasses" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>inner<wbr/>Join<wbr/>Dream<wbr/>Classes</span></a><a href="#query" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>query</span></a><a href="#supportsadvisorytransactionlocks"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>supports<wbr/>Advisory<wbr/>Transaction<wbr/>Locks</span></a><a href="#supportsparalleltestdatabases"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>supports<wbr/>Parallel<wbr/>Test<wbr/>Databases</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#applyrowlock"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>apply<wbr/>Row<wbr/>Lock</span></a><a href="#assertmutationpreservesassociationquery" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>assert<wbr/>Mutation<wbr/>Preserves<wbr/>Association<wbr/>Query</span></a><a href="#associationorderstatements" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>association<wbr/>Order<wbr/>Statements</span></a><a href="#avg" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>avg</span></a><a href="#avgby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>avg<wbr/>By</span></a><a href="#count" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>count</span></a><a href="#countby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>count<wbr/>By</span></a><a href="#dbconnectiontype" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Connection<wbr/>Type</span></a><a href="#dbfor" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>For</span></a><a href="#dbresulttodreaminstance" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Result<wbr/>To<wbr/>Dream<wbr/>Instance</span></a><a href="#delete" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete</span></a><a href="#exists" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>exists</span></a><a href="#hydrateassociation" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>hydrate<wbr/>Association</span></a><a href="#hydratepreload" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>hydrate<wbr/>Preload</span></a><a href="#joinedrowkeycolumns" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>joined<wbr/>Row<wbr/>Key<wbr/>Columns</span></a><a href="#max" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>max</span></a><a href="#maxby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>max<wbr/>By</span></a><a href="#min" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>min</span></a><a href="#minby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>min<wbr/>By</span></a><a href="#nestedselect" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>nested<wbr/>Select</span></a><a href="#orderbydirection" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>order<wbr/>By<wbr/>Direction</span></a><a href="#pluck" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pluck</span></a><a href="#pluckdistinctonpage" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pluck<wbr/>Distinct<wbr/>On<wbr/>Page</span></a><a href="#pluckdistinctonrowkeys" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pluck<wbr/>Distinct<wbr/>On<wbr/>Row<wbr/>Keys</span></a><a href="#sql" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sql</span></a><a href="#sum" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sum</span></a><a href="#sumby" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sum<wbr/>By</span></a><a href="#takeall" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>take<wbr/>All</span></a><a href="#takeone" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>take<wbr/>One</span></a><a href="#tokysely" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Kysely</span></a><a href="#update" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update</span></a><a href="#acquireadvisorytransactionlocks"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>acquire<wbr/>Advisory<wbr/>Transaction<wbr/>Locks</span></a><a href="#dataincompatiblewithdatabasefielderror"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>data<wbr/>Incompatible<wbr/>With<wbr/>Database<wbr/>Field<wbr/>Error</span></a><a href="#dbcreate"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Create</span></a><a href="#dbdrop"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>Drop</span></a><a href="#dbfor-2" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>db<wbr/>For</span></a><a href="#destroydream" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy<wbr/>Dream</span></a><a href="#dialectprovider" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dialect<wbr/>Provider</span></a><a href="#duplicatedatabase"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>duplicate<wbr/>Database</span></a><a href="#ensureallmigrationshavebeenrun" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ensure<wbr/>All<wbr/>Migrations<wbr/>Have<wbr/>Been<wbr/>Run</span></a><a href="#foreignkeytypefromprimarykey" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>foreign<wbr/>Key<wbr/>Type<wbr/>From<wbr/>Primary<wbr/>Key</span></a><a href="#generatemigration" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate<wbr/>Migration</span></a><a href="#introspectdatabase"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>introspect<wbr/>Database</span></a><a href="#isdeadlock"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Deadlock</span></a><a href="#isuniqueconstraintviolation"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Unique<wbr/>Constraint<wbr/>Violation</span></a><a href="#migrate" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>migrate</span></a><a href="#opentestdatabaselocksession"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>open<wbr/>Test<wbr/>Database<wbr/>Lock<wbr/>Session</span></a><a href="#primarykeytype" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>primary<wbr/>Key<wbr/>Type</span></a><a href="#rejectsanyvalueforcolumntype"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rejects<wbr/>Any<wbr/>Value<wbr/>For<wbr/>Column<wbr/>Type</span></a><a href="#rollback" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rollback</span></a><a href="#savedream" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Dream</span></a><a href="#setdatabasetypeparsers"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Database<wbr/>Type<wbr/>Parsers</span></a><a href="#sync" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sync</span></a><a href="#transaction" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>transaction</span></a><a href="#violateduniqueindexcolumns"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>violated<wbr/>Unique<wbr/>Index<wbr/>Columns</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@rvoh/dream</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|