@rvoh/dream 0.44.7 → 0.44.8

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.
Files changed (191) hide show
  1. package/dist/cjs/src/bin/index.js +7 -87
  2. package/dist/cjs/src/dream/LeftJoinLoadBuilder.js +1 -1
  3. package/dist/cjs/src/dream/LoadBuilder.js +1 -1
  4. package/dist/cjs/src/dream/Query.js +46 -1417
  5. package/dist/cjs/src/dream/QueryDriver/Base.js +311 -0
  6. package/dist/cjs/src/dream/QueryDriver/Kysely.js +1771 -0
  7. package/dist/cjs/src/dream/QueryDriver/Postgres.js +6 -0
  8. package/dist/cjs/src/dream/internal/saveDream.js +4 -17
  9. package/dist/esm/src/bin/index.js +7 -87
  10. package/dist/esm/src/dream/LeftJoinLoadBuilder.js +1 -1
  11. package/dist/esm/src/dream/LoadBuilder.js +1 -1
  12. package/dist/esm/src/dream/Query.js +46 -1417
  13. package/dist/esm/src/dream/QueryDriver/Base.js +308 -0
  14. package/dist/esm/src/dream/QueryDriver/Kysely.js +1768 -0
  15. package/dist/esm/src/dream/QueryDriver/Postgres.js +3 -0
  16. package/dist/esm/src/dream/internal/saveDream.js +4 -17
  17. package/dist/types/src/bin/index.d.ts +0 -2
  18. package/dist/types/src/dream/Query.d.ts +27 -155
  19. package/dist/types/src/dream/QueryDriver/Base.d.ts +242 -0
  20. package/dist/types/src/dream/QueryDriver/Kysely.d.ts +354 -0
  21. package/dist/types/src/dream/QueryDriver/Postgres.d.ts +4 -0
  22. package/dist/types/src/dream/internal/executeDatabaseQuery.d.ts +2 -1
  23. package/docs/assets/search.js +1 -1
  24. package/docs/classes/Benchmark.html +2 -2
  25. package/docs/classes/CalendarDate.html +2 -2
  26. package/docs/classes/CreateOrFindByFailedToCreateAndFind.html +3 -3
  27. package/docs/classes/Decorators.html +19 -19
  28. package/docs/classes/Dream.html +131 -131
  29. package/docs/classes/DreamApp.html +4 -4
  30. package/docs/classes/DreamBin.html +3 -4
  31. package/docs/classes/DreamCLI.html +4 -4
  32. package/docs/classes/DreamImporter.html +2 -2
  33. package/docs/classes/DreamLogos.html +2 -2
  34. package/docs/classes/DreamMigrationHelpers.html +7 -7
  35. package/docs/classes/DreamSerializerBuilder.html +2 -2
  36. package/docs/classes/DreamTransaction.html +2 -2
  37. package/docs/classes/Encrypt.html +2 -2
  38. package/docs/classes/Env.html +2 -2
  39. package/docs/classes/GlobalNameNotSet.html +3 -3
  40. package/docs/classes/NonLoadedAssociation.html +3 -3
  41. package/docs/classes/ObjectSerializerBuilder.html +2 -2
  42. package/docs/classes/Query.html +86 -57
  43. package/docs/classes/Range.html +2 -2
  44. package/docs/classes/RecordNotFound.html +3 -3
  45. package/docs/classes/ValidationError.html +3 -3
  46. package/docs/functions/DreamSerializer.html +1 -1
  47. package/docs/functions/ObjectSerializer.html +1 -1
  48. package/docs/functions/ReplicaSafe.html +1 -1
  49. package/docs/functions/STI.html +1 -1
  50. package/docs/functions/SoftDelete.html +1 -1
  51. package/docs/functions/camelize.html +1 -1
  52. package/docs/functions/capitalize.html +1 -1
  53. package/docs/functions/cloneDeepSafe.html +1 -1
  54. package/docs/functions/closeAllDbConnections.html +1 -1
  55. package/docs/functions/compact.html +1 -1
  56. package/docs/functions/dreamDbConnections.html +1 -1
  57. package/docs/functions/dreamPath.html +1 -1
  58. package/docs/functions/expandStiClasses.html +1 -1
  59. package/docs/functions/generateDream.html +1 -1
  60. package/docs/functions/globalClassNameFromFullyQualifiedModelName.html +1 -1
  61. package/docs/functions/groupBy.html +1 -1
  62. package/docs/functions/hyphenize.html +1 -1
  63. package/docs/functions/inferSerializerFromDreamOrViewModel.html +1 -1
  64. package/docs/functions/inferSerializersFromDreamClassOrViewModelClass.html +1 -1
  65. package/docs/functions/intersection.html +1 -1
  66. package/docs/functions/isDreamSerializer.html +1 -1
  67. package/docs/functions/isEmpty.html +1 -1
  68. package/docs/functions/loadRepl.html +1 -1
  69. package/docs/functions/lookupClassByGlobalName.html +1 -1
  70. package/docs/functions/normalizeUnicode.html +1 -1
  71. package/docs/functions/pascalize.html +1 -1
  72. package/docs/functions/pgErrorType.html +1 -1
  73. package/docs/functions/range-1.html +1 -1
  74. package/docs/functions/relativeDreamPath.html +1 -1
  75. package/docs/functions/round.html +1 -1
  76. package/docs/functions/serializerNameFromFullyQualifiedModelName.html +1 -1
  77. package/docs/functions/sharedPathPrefix.html +1 -1
  78. package/docs/functions/snakeify.html +1 -1
  79. package/docs/functions/sort.html +1 -1
  80. package/docs/functions/sortBy.html +1 -1
  81. package/docs/functions/sortObjectByKey.html +1 -1
  82. package/docs/functions/sortObjectByValue.html +1 -1
  83. package/docs/functions/standardizeFullyQualifiedModelName.html +1 -1
  84. package/docs/functions/uncapitalize.html +1 -1
  85. package/docs/functions/uniq.html +1 -1
  86. package/docs/functions/untypedDb.html +1 -1
  87. package/docs/functions/validateColumn.html +1 -1
  88. package/docs/functions/validateTable.html +1 -1
  89. package/docs/interfaces/BelongsToStatement.html +2 -2
  90. package/docs/interfaces/DecoratorContext.html +2 -2
  91. package/docs/interfaces/DreamAppInitOptions.html +2 -2
  92. package/docs/interfaces/DreamAppOpts.html +2 -2
  93. package/docs/interfaces/EncryptOptions.html +2 -2
  94. package/docs/interfaces/InternalAnyTypedSerializerRendersMany.html +2 -2
  95. package/docs/interfaces/InternalAnyTypedSerializerRendersOne.html +2 -2
  96. package/docs/interfaces/OpenapiDescription.html +2 -2
  97. package/docs/interfaces/OpenapiSchemaProperties.html +1 -1
  98. package/docs/interfaces/OpenapiSchemaPropertiesShorthand.html +1 -1
  99. package/docs/interfaces/OpenapiTypeFieldObject.html +1 -1
  100. package/docs/interfaces/SerializerRendererOpts.html +2 -2
  101. package/docs/types/Camelized.html +1 -1
  102. package/docs/types/CommonOpenapiSchemaObjectFields.html +1 -1
  103. package/docs/types/DateTime.html +1 -1
  104. package/docs/types/DbConnectionType.html +1 -1
  105. package/docs/types/DbTypes.html +1 -1
  106. package/docs/types/DreamAssociationMetadata.html +1 -1
  107. package/docs/types/DreamAttributes.html +1 -1
  108. package/docs/types/DreamClassColumn.html +1 -1
  109. package/docs/types/DreamColumn.html +1 -1
  110. package/docs/types/DreamColumnNames.html +1 -1
  111. package/docs/types/DreamLogLevel.html +1 -1
  112. package/docs/types/DreamLogger.html +1 -1
  113. package/docs/types/DreamModelSerializerType.html +1 -1
  114. package/docs/types/DreamOrViewModelClassSerializerKey.html +1 -1
  115. package/docs/types/DreamOrViewModelSerializerKey.html +1 -1
  116. package/docs/types/DreamParamSafeAttributes.html +1 -1
  117. package/docs/types/DreamParamSafeColumnNames.html +1 -1
  118. package/docs/types/DreamSerializable.html +1 -1
  119. package/docs/types/DreamSerializableArray.html +1 -1
  120. package/docs/types/DreamSerializerKey.html +1 -1
  121. package/docs/types/DreamSerializers.html +1 -1
  122. package/docs/types/DreamTableSchema.html +1 -1
  123. package/docs/types/DreamVirtualColumns.html +1 -1
  124. package/docs/types/EncryptAlgorithm.html +1 -1
  125. package/docs/types/HasManyStatement.html +1 -1
  126. package/docs/types/HasOneStatement.html +1 -1
  127. package/docs/types/Hyphenized.html +1 -1
  128. package/docs/types/IdType.html +1 -1
  129. package/docs/types/OpenapiAllTypes.html +1 -1
  130. package/docs/types/OpenapiFormats.html +1 -1
  131. package/docs/types/OpenapiNumberFormats.html +1 -1
  132. package/docs/types/OpenapiPrimitiveBaseTypes.html +1 -1
  133. package/docs/types/OpenapiPrimitiveTypes.html +1 -1
  134. package/docs/types/OpenapiSchemaArray.html +1 -1
  135. package/docs/types/OpenapiSchemaArrayShorthand.html +1 -1
  136. package/docs/types/OpenapiSchemaBase.html +1 -1
  137. package/docs/types/OpenapiSchemaBody.html +1 -1
  138. package/docs/types/OpenapiSchemaBodyShorthand.html +1 -1
  139. package/docs/types/OpenapiSchemaCommonFields.html +1 -1
  140. package/docs/types/OpenapiSchemaExpressionAllOf.html +1 -1
  141. package/docs/types/OpenapiSchemaExpressionAnyOf.html +1 -1
  142. package/docs/types/OpenapiSchemaExpressionOneOf.html +1 -1
  143. package/docs/types/OpenapiSchemaExpressionRef.html +1 -1
  144. package/docs/types/OpenapiSchemaExpressionRefSchemaShorthand.html +1 -1
  145. package/docs/types/OpenapiSchemaInteger.html +1 -1
  146. package/docs/types/OpenapiSchemaNull.html +1 -1
  147. package/docs/types/OpenapiSchemaNumber.html +1 -1
  148. package/docs/types/OpenapiSchemaObject.html +1 -1
  149. package/docs/types/OpenapiSchemaObjectAllOf.html +1 -1
  150. package/docs/types/OpenapiSchemaObjectAllOfShorthand.html +1 -1
  151. package/docs/types/OpenapiSchemaObjectAnyOf.html +1 -1
  152. package/docs/types/OpenapiSchemaObjectAnyOfShorthand.html +1 -1
  153. package/docs/types/OpenapiSchemaObjectBase.html +1 -1
  154. package/docs/types/OpenapiSchemaObjectBaseShorthand.html +1 -1
  155. package/docs/types/OpenapiSchemaObjectOneOf.html +1 -1
  156. package/docs/types/OpenapiSchemaObjectOneOfShorthand.html +1 -1
  157. package/docs/types/OpenapiSchemaObjectShorthand.html +1 -1
  158. package/docs/types/OpenapiSchemaPrimitiveGeneric.html +1 -1
  159. package/docs/types/OpenapiSchemaShorthandExpressionAllOf.html +1 -1
  160. package/docs/types/OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
  161. package/docs/types/OpenapiSchemaShorthandExpressionOneOf.html +1 -1
  162. package/docs/types/OpenapiSchemaShorthandExpressionSerializableRef.html +1 -1
  163. package/docs/types/OpenapiSchemaShorthandExpressionSerializerRef.html +1 -1
  164. package/docs/types/OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
  165. package/docs/types/OpenapiSchemaString.html +1 -1
  166. package/docs/types/OpenapiShorthandAllTypes.html +1 -1
  167. package/docs/types/OpenapiShorthandPrimitiveBaseTypes.html +1 -1
  168. package/docs/types/OpenapiShorthandPrimitiveTypes.html +1 -1
  169. package/docs/types/OpenapiTypeField.html +1 -1
  170. package/docs/types/Pascalized.html +1 -1
  171. package/docs/types/PrimaryKeyType.html +1 -1
  172. package/docs/types/RoundingPrecision.html +1 -1
  173. package/docs/types/SerializerCasing.html +1 -1
  174. package/docs/types/SimpleObjectSerializerType.html +1 -1
  175. package/docs/types/Snakeified.html +1 -1
  176. package/docs/types/Timestamp.html +1 -1
  177. package/docs/types/UpdateableAssociationProperties.html +1 -1
  178. package/docs/types/UpdateableProperties.html +1 -1
  179. package/docs/types/ValidationType.html +1 -1
  180. package/docs/types/ViewModel.html +1 -1
  181. package/docs/types/ViewModelClass.html +1 -1
  182. package/docs/types/WhereStatementForDream.html +1 -1
  183. package/docs/types/WhereStatementForDreamClass.html +1 -1
  184. package/docs/variables/DateTime-1.html +1 -1
  185. package/docs/variables/DreamConst.html +1 -1
  186. package/docs/variables/TRIGRAM_OPERATORS.html +1 -1
  187. package/docs/variables/openapiPrimitiveTypes-1.html +1 -1
  188. package/docs/variables/openapiShorthandPrimitiveTypes-1.html +1 -1
  189. package/docs/variables/ops.html +1 -1
  190. package/docs/variables/primaryKeyTypes.html +1 -1
  191. package/package.json +2 -2
@@ -0,0 +1,308 @@
1
+ export default class QueryDriverBase {
2
+ query;
3
+ dreamClass;
4
+ dreamInstance;
5
+ dreamTransaction = null;
6
+ connectionOverride;
7
+ /**
8
+ * @internal
9
+ *
10
+ * stores the Dream models joined in this Query instance
11
+ */
12
+ innerJoinDreamClasses = Object.freeze([]);
13
+ constructor(query) {
14
+ this.query = query;
15
+ this.dreamInstance = query.dreamInstance;
16
+ this.dreamClass = query.dreamInstance.constructor;
17
+ this.dreamTransaction = query['originalOpts'].transaction || null;
18
+ this.connectionOverride = query['originalOpts'].connection;
19
+ this.innerJoinDreamClasses = Object.freeze(query['originalOpts'].innerJoinDreamClasses || []);
20
+ }
21
+ /**
22
+ * migrate the database. Must respond to the NODE_ENV value.
23
+ */
24
+ // eslint-disable-next-line @typescript-eslint/require-await
25
+ static async migrate() {
26
+ throw new Error('override migrate in child class');
27
+ }
28
+ /**
29
+ * rollback the database. Must respond to the NODE_ENV value.
30
+ */
31
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
32
+ static async rollback(_) {
33
+ throw new Error('override rollback in child class');
34
+ }
35
+ /**
36
+ * create the database. Must respond to the NODE_ENV value.
37
+ */
38
+ // eslint-disable-next-line @typescript-eslint/require-await
39
+ static async dbCreate() {
40
+ throw new Error('override dbCreate on child class');
41
+ }
42
+ /**
43
+ * delete the database. Must respond to the NODE_ENV value.
44
+ */
45
+ // eslint-disable-next-line @typescript-eslint/require-await
46
+ static async dbDrop() {
47
+ throw new Error('override dbDrop on child class');
48
+ }
49
+ /**
50
+ * This should build a new migration file in the migrations folder
51
+ * of your application. This will then need to be read and run
52
+ * whenever the `migrate` method is called. The filename should
53
+ * contain a timestamp at the front of the filename, so that it
54
+ * is sorted by date in the file tree, and, more importantly, so
55
+ * they can be run in order by your migration runner.
56
+ */
57
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
58
+ static async generateMigration(migrationName, columnsWithTypes) {
59
+ throw new Error('override generateMigration in child class');
60
+ }
61
+ /**
62
+ * defines the syncing behavior for dream and psychic,
63
+ * which is run whenever the `sync` command is called.
64
+ * This is an important step, and will be incredibly
65
+ * comlpex to override. You will need to do the following
66
+ * when overriding this method:
67
+ *
68
+ * 1. introspect the db and use it to generate a db.ts file in the
69
+ * same shape as the existing one. Currently, the process for generating
70
+ * this file is extremely complex and messy, and will be difficult
71
+ * to achieve.
72
+ * 2. generate a types/dream.ts file in the same shape as the existing
73
+ * one. This is normally done using `await new SchemaBuilder().build()`,
74
+ * but this will likely need to be overridden to tailor to your custom
75
+ * database engine.
76
+ */
77
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
78
+ static async sync(_) {
79
+ throw new Error('override sync on child class');
80
+ }
81
+ /**
82
+ * Converts the given dream class into a Kysely query, enabling
83
+ * you to build custom queries using the Kysely API
84
+ *
85
+ * ```ts
86
+ * await User.query().toKysely('select').where('email', '=', 'how@yadoin').execute()
87
+ * ```
88
+ *
89
+ * @param type - the type of Kysely query builder instance you would like to obtain
90
+ * @returns A Kysely query. Depending on the type passed, it will return either a SelectQueryBuilder, DeleteQueryBuilder, or an UpdateQueryBuilder
91
+ */
92
+ toKysely(type) {
93
+ throw new Error('implement toKysely in child class (if it makes sense)');
94
+ }
95
+ /**
96
+ * @internal
97
+ *
98
+ * This method is used internally by a Query driver to
99
+ * take the result of a single row in a database, and
100
+ * turn that row into the provided dream instance.
101
+ *
102
+ * If needed, the return type can be overriden to
103
+ * explicitly define the resulting dream instance,
104
+ * in cases where a proper type for the dream class
105
+ * cannot be inferred, i.e.
106
+ *
107
+ * ```ts
108
+ * this.dbResultToDreamInstance<typeof Dream, DreamInstance>(result, this.dreamClass)
109
+ * ```
110
+ */
111
+ dbResultToDreamInstance(
112
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
113
+ result,
114
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
115
+ dreamClass) {
116
+ throw new Error('Implement this in your child driver class');
117
+ }
118
+ /**
119
+ * @internal
120
+ *
121
+ * Used for applying first and last queries
122
+ *
123
+ * @returns A dream instance or null
124
+ */
125
+ // eslint-disable-next-line @typescript-eslint/require-await
126
+ async takeOne() {
127
+ throw new Error('implement takeOne in child class');
128
+ }
129
+ /**
130
+ * Retrieves an array containing all records matching the Query.
131
+ * Be careful using this, since it will attempt to pull every
132
+ * record into memory at once. When querying might return a large
133
+ * number of records, consider using `.findEach`, which will pull
134
+ * the records in batches.
135
+ *
136
+ * ```ts
137
+ * await User.query().all()
138
+ * ```
139
+ *
140
+ * @returns an array of dreams
141
+ */
142
+ // eslint-disable-next-line @typescript-eslint/require-await
143
+ async takeAll(
144
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
145
+ options = {}) {
146
+ throw new Error('implement takeAll in child class');
147
+ }
148
+ /**
149
+ * Retrieves the max value of the specified column
150
+ * for this Query
151
+ *
152
+ * ```ts
153
+ * await User.query().max('id')
154
+ * // 99
155
+ * ```
156
+ *
157
+ * @param columnName - a column name on the model
158
+ * @returns the max value of the specified column for this Query
159
+ *
160
+ */
161
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
162
+ async max(columnName) {
163
+ throw new Error('implement max in child class');
164
+ }
165
+ /**
166
+ * Retrieves the min value of the specified column
167
+ * for this Query
168
+ *
169
+ * ```ts
170
+ * await User.query().min('id')
171
+ * // 1
172
+ * ```
173
+ *
174
+ * @param columnName - a column name on the model
175
+ * @returns the min value of the specified column for this Query
176
+ */
177
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
178
+ async min(columnName) {
179
+ throw new Error('implement min in child class');
180
+ }
181
+ /**
182
+ * Retrieves the number of records in the database
183
+ *
184
+ * ```ts
185
+ * await User.query().count()
186
+ * ```
187
+ *
188
+ * @returns The number of records in the database
189
+ */
190
+ // eslint-disable-next-line @typescript-eslint/require-await
191
+ async count() {
192
+ throw new Error('implement count in child class');
193
+ }
194
+ /**
195
+ * @internal
196
+ *
197
+ * Runs the query and extracts plucked values
198
+ *
199
+ * @returns An array of plucked values
200
+ */
201
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
202
+ async pluck(...fields) {
203
+ throw new Error('implement pluck in child class');
204
+ }
205
+ /**
206
+ * Returns a new Kysely SelectQueryBuilder instance to be used
207
+ * in a sub Query
208
+ *
209
+ * ```ts
210
+ * const records = await User.where({
211
+ * id: Post.query().nestedSelect('userId'),
212
+ * }).all()
213
+ * // [User{id: 1}, ...]
214
+ * ```
215
+ *
216
+ * @param selection - the column to use for your nested Query
217
+ * @returns A Kysely SelectQueryBuilder instance
218
+ */
219
+ nestedSelect(
220
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
221
+ selection) {
222
+ throw new Error('implement nestedSelect in child class');
223
+ }
224
+ /**
225
+ * executes provided query instance as a deletion query.
226
+ * @returns the number of deleted rows
227
+ */
228
+ // eslint-disable-next-line @typescript-eslint/require-await
229
+ async delete() {
230
+ throw new Error('implement delete in child class');
231
+ }
232
+ /**
233
+ * executes provided query instance as an update query.
234
+ * @returns the number of updated rows
235
+ */
236
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
237
+ async update(attributes) {
238
+ throw new Error('implement update in child class');
239
+ }
240
+ /**
241
+ * persists any unsaved changes to the database. If a transaction
242
+ * is provided as a second argument, it will use that transaction
243
+ * to encapsulate the persisting of the dream, as well as any
244
+ * subsequent model hooks that are fired.
245
+ */
246
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
247
+ static async saveDream(dream, txn = null) {
248
+ throw new Error('implement saveDream in child class');
249
+ }
250
+ /**
251
+ * Returns the sql that would be executed by this Query
252
+ *
253
+ * ```ts
254
+ * User.where({ email: 'how@yadoin' }).sql()
255
+ * // {
256
+ * // query: {
257
+ * // kind: 'SelectQueryNode',
258
+ * // from: { kind: 'FromNode', froms: [Array] },
259
+ * // selections: [ [Object] ],
260
+ * // distinctOn: undefined,
261
+ * // joins: undefined,
262
+ * // groupBy: undefined,
263
+ * // orderBy: undefined,
264
+ * // where: { kind: 'WhereNode', where: [Object] },
265
+ * // frontModifiers: undefined,
266
+ * // endModifiers: undefined,
267
+ * // limit: undefined,
268
+ * // offset: undefined,
269
+ * // with: undefined,
270
+ * // having: undefined,
271
+ * // explain: undefined,
272
+ * // setOperations: undefined
273
+ * // },
274
+ * // sql: 'select "users".* from "users" where ("users"."email" = $1 and "users"."deleted_at" is null)',
275
+ * // parameters: [ 'how@yadoin' ]
276
+ * //}
277
+ * ```
278
+ *
279
+ * @returns An object representing the underlying sql statement
280
+ *
281
+ */
282
+ sql() {
283
+ throw new Error('implement sql in child class');
284
+ }
285
+ /**
286
+ * @internal
287
+ *
288
+ * Used to hydrate dreams with the provided associations
289
+ */
290
+ hydrateAssociation(
291
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
292
+ dreams,
293
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
294
+ association,
295
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
296
+ preloadedDreamsAndWhatTheyPointTo) {
297
+ throw new Error('define hydrateAssociation on child class');
298
+ }
299
+ /**
300
+ * @internal
301
+ *
302
+ * Used by loadBuider
303
+ */
304
+ // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-unused-vars
305
+ async hydratePreload(dream) {
306
+ throw new Error('define hydratePreload on child class');
307
+ }
308
+ }