velocious 1.0.112 → 1.0.114

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 (28) hide show
  1. package/dist/src/database/query/index.d.ts +46 -120
  2. package/dist/src/database/query/index.d.ts.map +1 -1
  3. package/dist/src/database/query/index.js +31 -219
  4. package/dist/src/database/query/join-object.d.ts.map +1 -1
  5. package/dist/src/database/query/join-object.js +7 -2
  6. package/dist/src/database/query/model-class-query.d.ts +77 -0
  7. package/dist/src/database/query/model-class-query.d.ts.map +1 -0
  8. package/dist/src/database/query/model-class-query.js +212 -0
  9. package/dist/src/database/query-parser/select-parser.d.ts.map +1 -1
  10. package/dist/src/database/query-parser/select-parser.js +3 -1
  11. package/dist/src/database/record/index.d.ts +42 -67
  12. package/dist/src/database/record/index.d.ts.map +1 -1
  13. package/dist/src/database/record/index.js +33 -57
  14. package/dist/src/database/record/instance-relationships/base.d.ts +35 -24
  15. package/dist/src/database/record/instance-relationships/base.d.ts.map +1 -1
  16. package/dist/src/database/record/instance-relationships/base.js +24 -11
  17. package/dist/src/database/record/instance-relationships/belongs-to.d.ts +11 -1
  18. package/dist/src/database/record/instance-relationships/belongs-to.d.ts.map +1 -1
  19. package/dist/src/database/record/instance-relationships/belongs-to.js +14 -3
  20. package/dist/src/database/record/instance-relationships/has-many.d.ts +23 -3
  21. package/dist/src/database/record/instance-relationships/has-many.d.ts.map +1 -1
  22. package/dist/src/database/record/instance-relationships/has-many.js +16 -4
  23. package/dist/src/database/record/instance-relationships/has-one.d.ts +21 -4
  24. package/dist/src/database/record/instance-relationships/has-one.d.ts.map +1 -1
  25. package/dist/src/database/record/instance-relationships/has-one.js +19 -8
  26. package/dist/src/environment-handlers/node/cli/commands/generate/base-models.d.ts.map +1 -1
  27. package/dist/src/environment-handlers/node/cli/commands/generate/base-models.js +26 -10
  28. package/package.json +1 -1
@@ -0,0 +1,77 @@
1
+ /**
2
+ * @template {typeof import("../record/index.js").default} MC
3
+ */
4
+ /**
5
+ * @template {typeof import("../record/index.js").default} MC
6
+ * @typedef {import("./index.js").QueryArgsType & {modelClass: MC}} ModelClassQueryArgsType
7
+ */
8
+ /**
9
+ * A generic query over some model type.
10
+ * @template {typeof import("../record/index.js").default} MC
11
+ */
12
+ export default class VelociousDatabaseQueryModelClassQuery<MC extends typeof import("../record/index.js").default> extends DatabaseQuery {
13
+ /** @param {ModelClassQueryArgsType<MC>} args */
14
+ constructor(args: ModelClassQueryArgsType<MC>);
15
+ /** @type {MC} */
16
+ modelClass: MC;
17
+ /** @returns {this} */
18
+ clone(): this;
19
+ /** @returns {Promise<number>} */
20
+ count(): Promise<number>;
21
+ /** @returns {MC} */
22
+ getModelClass(): MC;
23
+ /** @returns {Promise<void>} */
24
+ destroyAll(): Promise<void>;
25
+ /**
26
+ * @param {number|string} recordId
27
+ * @returns {Promise<InstanceType<MC>>}
28
+ */
29
+ find(recordId: number | string): Promise<InstanceType<MC>>;
30
+ /**
31
+ * @param {{[key: string]: any}} conditions
32
+ * @returns {Promise<InstanceType<MC> | null>}
33
+ */
34
+ findBy(conditions: {
35
+ [key: string]: any;
36
+ }): Promise<InstanceType<MC> | null>;
37
+ /**
38
+ * @param {{[key: string]: any}} conditions
39
+ * @param {function(InstanceType<MC>) : void} callback
40
+ * @returns {Promise<InstanceType<MC>>}
41
+ */
42
+ findOrCreateBy(conditions: {
43
+ [key: string]: any;
44
+ }, callback: (arg0: InstanceType<MC>) => void): Promise<InstanceType<MC>>;
45
+ /**
46
+ * @param {{[key: string]: any}} conditions
47
+ * @returns {Promise<InstanceType<MC>>}
48
+ */
49
+ findByOrFail(conditions: {
50
+ [key: string]: any;
51
+ }): Promise<InstanceType<MC>>;
52
+ /**
53
+ * @param {object} conditions
54
+ * @param {function(InstanceType<MC>) : void} callback
55
+ * @returns {Promise<InstanceType<MC>>}
56
+ */
57
+ findOrInitializeBy(conditions: object, callback: (arg0: InstanceType<MC>) => void): Promise<InstanceType<MC>>;
58
+ /** @returns {Promise<InstanceType<MC> | undefined>} */
59
+ first(): Promise<InstanceType<MC> | undefined>;
60
+ /** @returns {Promise<InstanceType<MC> | undefined>} */
61
+ last(): Promise<InstanceType<MC> | undefined>;
62
+ /**
63
+ * @param {import("./index.js").NestedPreloadRecord} data
64
+ * @returns {this}
65
+ */
66
+ preload(data: import("./index.js").NestedPreloadRecord): this;
67
+ /**
68
+ * Converts query results to array of model instances
69
+ * @returns {Promise<Array<InstanceType<MC>>>}
70
+ */
71
+ toArray(): Promise<Array<InstanceType<MC>>>;
72
+ }
73
+ export type ModelClassQueryArgsType<MC extends typeof import("../record/index.js").default> = import("./index.js").QueryArgsType & {
74
+ modelClass: MC;
75
+ };
76
+ import DatabaseQuery from "./index.js";
77
+ //# sourceMappingURL=model-class-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-class-query.d.ts","sourceRoot":"","sources":["../../../../src/database/query/model-class-query.js"],"names":[],"mappings":"AASA;;GAEG;AACH;;;GAGG;AAEH;;;GAGG;AACH,2DAX2D,EAAE,SAAhD,cAAe,oBAAoB,EAAE,OAAQ;IAYxD,gDAAgD;IAChD,kBADY,uBAAuB,CAAC,EAAE,CAAC,EAWtC;IAFC,iBAAiB;IACjB,YADW,EAAE,CACe;IAG9B,sBAAsB;IACtB,SADc,IAAI,CAqBjB;IAED,iCAAiC;IACjC,SADc,OAAO,CAAC,MAAM,CAAC,CAmC5B;IAED,oBAAoB;IACpB,iBADc,EAAE,CAKf;IAED,+BAA+B;IAC/B,cADc,OAAO,CAAC,IAAI,CAAC,CAO1B;IAED;;;OAGG;IACH,eAHW,MAAM,GAAC,MAAM,GACX,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAmBrC;IAED;;;OAGG;IACH,mBAHW;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,GAClB,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAiB5C;IAED;;;;OAIG;IACH,2BAJW;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,YACpB,CAAS,IAAgB,EAAhB,YAAY,CAAC,EAAE,CAAC,KAAI,IAAI,GAC/B,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAUrC;IAED;;;OAGG;IACH,yBAHW;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,GAClB,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAuBrC;IAED;;;;OAIG;IACH,+BAJW,MAAM,YACN,CAAS,IAAgB,EAAhB,YAAY,CAAC,EAAE,CAAC,KAAI,IAAI,GAC/B,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAerC;IAED,uDAAuD;IACvD,SADc,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAMlD;IAED,uDAAuD;IACvD,QADc,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAOlD;IAED;;;OAGG;IACH,cAHW,OAAO,YAAY,EAAE,mBAAmB,GACtC,IAAI,CAKhB;IAED;;;OAGG;IACH,WAFa,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAyB5C;CACF;oCAlQ0D,EAAE,SAAhD,cAAe,oBAAoB,EAAE,OAAQ,IAC7C,OAAO,YAAY,EAAE,aAAa,GAAG;IAAC,UAAU,EAAE,EAAE,CAAA;CAAC;0BARxC,YAAY"}
@@ -0,0 +1,212 @@
1
+ // @ts-check
2
+ import { incorporate } from "incorporator";
3
+ import * as inflection from "inflection";
4
+ import { Logger } from "../../logger.js";
5
+ import Preloader from "./preloader.js";
6
+ import DatabaseQuery from "./index.js";
7
+ import RecordNotFoundError from "../record/record-not-found-error.js";
8
+ /**
9
+ * @template {typeof import("../record/index.js").default} MC
10
+ */
11
+ /**
12
+ * @template {typeof import("../record/index.js").default} MC
13
+ * @typedef {import("./index.js").QueryArgsType & {modelClass: MC}} ModelClassQueryArgsType
14
+ */
15
+ /**
16
+ * A generic query over some model type.
17
+ * @template {typeof import("../record/index.js").default} MC
18
+ */
19
+ export default class VelociousDatabaseQueryModelClassQuery extends DatabaseQuery {
20
+ /** @param {ModelClassQueryArgsType<MC>} args */
21
+ constructor(args) {
22
+ const { modelClass } = args;
23
+ if (!modelClass)
24
+ throw new Error(`No modelClass given in ${Object.keys(args).join(", ")}`);
25
+ super(args);
26
+ this.logger = new Logger(this);
27
+ /** @type {MC} */
28
+ this.modelClass = modelClass;
29
+ }
30
+ /** @returns {this} */
31
+ clone() {
32
+ const newQuery = /** @type {VelociousDatabaseQueryModelClassQuery<MC>} */ (new VelociousDatabaseQueryModelClassQuery({
33
+ driver: this.driver,
34
+ froms: [...this._froms],
35
+ handler: this.handler.clone(),
36
+ groups: [...this._groups],
37
+ joins: [...this._joins],
38
+ limit: this._limit,
39
+ modelClass: this.modelClass,
40
+ offset: this._offset,
41
+ orders: [...this._orders],
42
+ page: this._page,
43
+ perPage: this._perPage,
44
+ preload: { ...this._preload },
45
+ selects: [...this._selects],
46
+ wheres: [...this._wheres]
47
+ }));
48
+ // @ts-expect-error
49
+ return newQuery;
50
+ }
51
+ /** @returns {Promise<number>} */
52
+ async count() {
53
+ // Generate count SQL
54
+ let sql = `COUNT(${this.driver.quoteTable(this.getModelClass().tableName())}.${this.driver.quoteColumn(this.getModelClass().primaryKey())})`;
55
+ if (this.driver.getType() == "pgsql")
56
+ sql += "::int";
57
+ sql += " AS count";
58
+ // Clone query and execute count
59
+ const countQuery = this.clone();
60
+ countQuery._selects = [];
61
+ countQuery.select(sql);
62
+ const results = /** @type {{count: number}[]} */ (await countQuery._executeQuery());
63
+ // The query isn't grouped and a single result has been given
64
+ if (results.length == 1) {
65
+ return results[0].count;
66
+ }
67
+ // The query may be grouped and a lot of different counts a given
68
+ let countResult = 0;
69
+ for (const result of results) {
70
+ if (!("count" in result)) {
71
+ throw new Error("Invalid count result");
72
+ }
73
+ countResult += result.count;
74
+ }
75
+ return countResult;
76
+ }
77
+ /** @returns {MC} */
78
+ getModelClass() {
79
+ if (!this.modelClass)
80
+ throw new Error("modelClass not set");
81
+ return this.modelClass;
82
+ }
83
+ /** @returns {Promise<void>} */
84
+ async destroyAll() {
85
+ const records = await this.toArray();
86
+ for (const record of records) {
87
+ await record.destroy();
88
+ }
89
+ }
90
+ /**
91
+ * @param {number|string} recordId
92
+ * @returns {Promise<InstanceType<MC>>}
93
+ */
94
+ async find(recordId) {
95
+ /** @type {{[key: string]: number | string}} */
96
+ const conditions = {};
97
+ conditions[this.getModelClass().primaryKey()] = recordId;
98
+ const newQuery = /** @type {VelociousDatabaseQueryModelClassQuery<MC>} */ (this.clone());
99
+ newQuery.where(conditions);
100
+ const record = (await newQuery.first());
101
+ if (!record) {
102
+ throw new RecordNotFoundError(`Couldn't find ${this.getModelClass().name} with '${this.getModelClass().primaryKey()}'=${recordId}`);
103
+ }
104
+ return record;
105
+ }
106
+ /**
107
+ * @param {{[key: string]: any}} conditions
108
+ * @returns {Promise<InstanceType<MC> | null>}
109
+ */
110
+ async findBy(conditions) {
111
+ /** @type {{[key: string]: number | string}} */
112
+ const newConditions = {};
113
+ for (const key in conditions) {
114
+ const keyUnderscore = inflection.underscore(key);
115
+ newConditions[keyUnderscore] = conditions[key];
116
+ }
117
+ const newQuery = /** @type {VelociousDatabaseQueryModelClassQuery<MC>} */ (this.clone());
118
+ newQuery.where(newConditions);
119
+ return await newQuery.first();
120
+ }
121
+ /**
122
+ * @param {{[key: string]: any}} conditions
123
+ * @param {function(InstanceType<MC>) : void} callback
124
+ * @returns {Promise<InstanceType<MC>>}
125
+ */
126
+ async findOrCreateBy(conditions, callback) {
127
+ const record = await this.findOrInitializeBy(conditions, callback);
128
+ if (record.isNewRecord()) {
129
+ await record.save();
130
+ }
131
+ return record;
132
+ }
133
+ /**
134
+ * @param {{[key: string]: any}} conditions
135
+ * @returns {Promise<InstanceType<MC>>}
136
+ */
137
+ async findByOrFail(conditions) {
138
+ /** @type {{[key: string]: number | string}} */
139
+ const newConditions = {};
140
+ for (const key in conditions) {
141
+ const keyUnderscore = inflection.underscore(key);
142
+ newConditions[keyUnderscore] = conditions[key];
143
+ }
144
+ const newQuery = /** @type {VelociousDatabaseQueryModelClassQuery<MC>} */ (this.clone());
145
+ newQuery.where(newConditions);
146
+ const model = await newQuery.first();
147
+ if (!model) {
148
+ throw new Error("Record not found");
149
+ }
150
+ return model;
151
+ }
152
+ /**
153
+ * @param {object} conditions
154
+ * @param {function(InstanceType<MC>) : void} callback
155
+ * @returns {Promise<InstanceType<MC>>}
156
+ */
157
+ async findOrInitializeBy(conditions, callback) {
158
+ const record = await this.findBy(conditions);
159
+ if (record)
160
+ return record;
161
+ const ModelClass = this.getModelClass();
162
+ const newRecord = /** @type {InstanceType<MC>} */ (new ModelClass(conditions));
163
+ if (callback) {
164
+ callback(newRecord);
165
+ }
166
+ return newRecord;
167
+ }
168
+ /** @returns {Promise<InstanceType<MC> | undefined>} */
169
+ async first() {
170
+ const newQuery = this.clone().limit(1).reorder(`${this.driver.quoteTable(this.getModelClass().tableName())}.${this.driver.quoteColumn(this.getModelClass().orderableColumn())}`);
171
+ const results = await newQuery.toArray();
172
+ return results[0];
173
+ }
174
+ /** @returns {Promise<InstanceType<MC> | undefined>} */
175
+ async last() {
176
+ const primaryKey = this.getModelClass().primaryKey();
177
+ const tableName = this.getModelClass().tableName();
178
+ const results = await this.clone().reorder(`${this.driver.quoteTable(tableName)}.${this.driver.quoteColumn(primaryKey)} DESC`).limit(1).toArray();
179
+ return results[0];
180
+ }
181
+ /**
182
+ * @param {import("./index.js").NestedPreloadRecord} data
183
+ * @returns {this}
184
+ */
185
+ preload(data) {
186
+ incorporate(this._preload, data);
187
+ return this;
188
+ }
189
+ /**
190
+ * Converts query results to array of model instances
191
+ * @returns {Promise<Array<InstanceType<MC>>>}
192
+ */
193
+ async toArray() {
194
+ const models = [];
195
+ const results = await this.results();
196
+ for (const result of results) {
197
+ const ModelClass = this.getModelClass();
198
+ const model = /** @type {InstanceType<MC>} */ (new ModelClass());
199
+ model.loadExistingRecord(result);
200
+ models.push(model);
201
+ }
202
+ if (Object.keys(this._preload).length > 0 && models.length > 0) {
203
+ const preloader = new Preloader({
204
+ modelClass: this.modelClass,
205
+ models,
206
+ preload: this._preload
207
+ });
208
+ await preloader.run();
209
+ }
210
+ return models;
211
+ }
212
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"select-parser.d.ts","sourceRoot":"","sources":["../../../../src/database/query-parser/select-parser.js"],"names":[],"mappings":"AAIA;IACE;;;;OAIG;IACH,4CAHG;QAAsB,MAAM,EAApB,OAAO;QACmC,KAAK,EAA/C,OAAO,mBAAmB,EAAE,OAAO;KAC7C,EAMA;IAFC,gBAAoB;IACpB,2CAAkB;IAGpB,gBAyCC;CACF"}
1
+ {"version":3,"file":"select-parser.d.ts","sourceRoot":"","sources":["../../../../src/database/query-parser/select-parser.js"],"names":[],"mappings":"AAIA;IACE;;;;OAIG;IACH,4CAHG;QAAsB,MAAM,EAApB,OAAO;QACmC,KAAK,EAA/C,OAAO,mBAAmB,EAAE,OAAO;KAC7C,EAMA;IAFC,gBAAoB;IACpB,2CAAkB;IAGpB,gBA2CC;CACF"}
@@ -37,7 +37,9 @@ export default class VelociousDatabaseQueryParserSelectParser {
37
37
  count++;
38
38
  }
39
39
  if (query.getSelects().length == 0) {
40
- if (query.modelClass) {
40
+ // @ts-expect-error
41
+ if (query.constructor.name == "VelociousDatabaseQueryModelClassQuery" && query.modelClass) {
42
+ // @ts-expect-error
41
43
  sql += `${query.modelClass.connection().quoteTable(query.modelClass.tableName())}.*`;
42
44
  }
43
45
  else {
@@ -10,16 +10,13 @@ export class ValidationError extends Error {
10
10
  getModel(): VelociousDatabaseRecord;
11
11
  /**
12
12
  * @param {VelociousDatabaseRecord} model
13
+ * @returns {void}
13
14
  */
14
15
  setModel(model: VelociousDatabaseRecord): void;
15
16
  _model: VelociousDatabaseRecord;
16
- /**
17
- * @returns {Record<string, ValidationErrorObjectType[]>}
18
- */
17
+ /** @returns {Record<string, ValidationErrorObjectType[]>} */
19
18
  getValidationErrors(): Record<string, ValidationErrorObjectType[]>;
20
- /**
21
- * @param {Record<string, ValidationErrorObjectType[]>} validationErrors
22
- */
19
+ /** @param {Record<string, ValidationErrorObjectType[]>} validationErrors */
23
20
  setValidationErrors(validationErrors: Record<string, ValidationErrorObjectType[]>): void;
24
21
  _validationErrors: Record<string, ValidationErrorObjectType[]>;
25
22
  }
@@ -206,21 +203,13 @@ declare class VelociousDatabaseRecord {
206
203
  * @param {Record<string, boolean | Record<string, any>>} validators The validators to add. Key is the validator name, value is the validator arguments.
207
204
  */
208
205
  static validates(attributeName: string, validators: Record<string, boolean | Record<string, any>>): Promise<void>;
209
- /**
210
- * @returns {Query}
211
- */
212
- static _newQuery(): Query;
213
- /**
214
- * @returns {string}
215
- */
206
+ /** @returns {ModelClassQuery<typeof this>} */
207
+ static _newQuery(): ModelClassQuery<typeof this>;
208
+ /** @returns {string} */
216
209
  static orderableColumn(): string;
217
- /**
218
- * @returns {Query}
219
- */
220
- static all(): Query;
221
- /**
222
- * @returns {Promise<number>}
223
- */
210
+ /** @returns {ModelClassQuery<typeof this>} */
211
+ static all(): ModelClassQuery<typeof this>;
212
+ /** @returns {Promise<number>} */
224
213
  static count(): Promise<number>;
225
214
  static destroyAll(): Promise<void>;
226
215
  /**
@@ -244,62 +233,58 @@ declare class VelociousDatabaseRecord {
244
233
  }): Promise<InstanceType<typeof this>>;
245
234
  /**
246
235
  * @param {{[key: string]: any}} conditions
247
- * @param {function() : void} callback
236
+ * @param {function() : void} [callback]
248
237
  * @returns {Promise<InstanceType<typeof this>>}
249
238
  */
250
239
  static findOrCreateBy(conditions: {
251
240
  [key: string]: any;
252
- }, callback: () => void): Promise<InstanceType<typeof this>>;
241
+ }, callback?: () => void): Promise<InstanceType<typeof this>>;
253
242
  /**
254
243
  * @param {object} conditions
255
- * @param {function(import("../record/index.js").default) : void} callback
256
- * @returns {Promise<InstanceType<typeof this>>}
257
- */
258
- static findOrInitializeBy(conditions: object, callback: (arg0: import("../record/index.js").default) => void): Promise<InstanceType<typeof this>>;
259
- /**
244
+ * @param {function(InstanceType<typeof this>) : void} [callback]
260
245
  * @returns {Promise<InstanceType<typeof this>>}
261
246
  */
247
+ static findOrInitializeBy(conditions: object, callback?: (arg0: InstanceType<typeof this>) => void): Promise<InstanceType<typeof this>>;
248
+ /** @returns {Promise<InstanceType<typeof this>>} */
262
249
  static first(): Promise<InstanceType<typeof this>>;
263
250
  /**
264
251
  * @param {string|{[key: string]: any}} join
265
- * @returns {Query}
252
+ * @returns {ModelClassQuery<typeof this>}
266
253
  */
267
254
  static joins(join: string | {
268
255
  [key: string]: any;
269
- }): Query;
270
- /**
271
- * @returns {Promise<InstanceType<typeof this>>}
272
- */
256
+ }): ModelClassQuery<typeof this>;
257
+ /** @returns {Promise<InstanceType<typeof this>>} */
273
258
  static last(): Promise<InstanceType<typeof this>>;
274
259
  /**
275
260
  * @param {number} value
276
- * @returns {Query}
261
+ * @returns {ModelClassQuery<typeof this>}
277
262
  */
278
- static limit(value: number): Query;
263
+ static limit(value: number): ModelClassQuery<typeof this>;
279
264
  /**
280
265
  * @param {string | number} order
281
- * @returns {Query}
266
+ * @returns {ModelClassQuery<typeof this>}
282
267
  */
283
- static order(order: string | number): Query;
268
+ static order(order: string | number): ModelClassQuery<typeof this>;
284
269
  /**
285
270
  * @param {import("../query/index.js").NestedPreloadRecord} preload
286
- * @returns {Query}
271
+ * @returns {ModelClassQuery<typeof this>}
287
272
  */
288
- static preload(preload: import("../query/index.js").NestedPreloadRecord): Query;
273
+ static preload(preload: import("../query/index.js").NestedPreloadRecord): ModelClassQuery<typeof this>;
289
274
  /**
290
275
  * @param {import("../query/index.js").SelectArgumentType} select
291
- * @returns {Query}
276
+ * @returns {ModelClassQuery<typeof this>}
292
277
  */
293
- static select(select: import("../query/index.js").SelectArgumentType): Query;
278
+ static select(select: import("../query/index.js").SelectArgumentType): ModelClassQuery<typeof this>;
294
279
  /**
295
- * @returns {Promise<VelociousDatabaseRecord[]>}
280
+ * @returns {Promise<InstanceType<typeof this>[]>}
296
281
  */
297
- static toArray(): Promise<VelociousDatabaseRecord[]>;
282
+ static toArray(): Promise<InstanceType<typeof this>[]>;
298
283
  /**
299
284
  * @param {import("../query/index.js").WhereArgumentType} where
300
- * @returns {Query}
285
+ * @returns {ModelClassQuery<typeof this>}
301
286
  */
302
- static where(where: import("../query/index.js").WhereArgumentType): Query;
287
+ static where(where: import("../query/index.js").WhereArgumentType): ModelClassQuery<typeof this>;
303
288
  /**
304
289
  * @param {Record<string, any>} changes
305
290
  */
@@ -313,7 +298,7 @@ declare class VelociousDatabaseRecord {
313
298
  /** @type {import("../drivers/base.js").default | undefined} */
314
299
  __connection: import("../drivers/base.js").default | undefined;
315
300
  /** @type {Record<string, import("./instance-relationships/base.js").default>} */
316
- _instanceRelationships: Record<string, import("./instance-relationships/base.js").default>;
301
+ _instanceRelationships: Record<string, import("./instance-relationships/base.js").default<any, any>>;
317
302
  /** @type {string | undefined} */
318
303
  __tableName: string | undefined;
319
304
  /** @type {Record<string, ValidationErrorObjectType[]>} */
@@ -322,7 +307,7 @@ declare class VelociousDatabaseRecord {
322
307
  * @param {string} relationshipName
323
308
  * @returns {import("./instance-relationships/base.js").default}
324
309
  */
325
- getRelationshipByName(relationshipName: string): import("./instance-relationships/base.js").default;
310
+ getRelationshipByName(relationshipName: string): import("./instance-relationships/base.js").default<any, any>;
326
311
  /**
327
312
  * @returns {import("../../configuration.js").default}
328
313
  */
@@ -357,7 +342,7 @@ declare class VelociousDatabaseRecord {
357
342
  _autoSaveBelongsToRelationships(): Promise<{
358
343
  savedCount: number;
359
344
  }>;
360
- _autoSaveHasManyAndHasOneRelationshipsToSave(): import("./instance-relationships/base.js").default[];
345
+ _autoSaveHasManyAndHasOneRelationshipsToSave(): import("./instance-relationships/base.js").default<any, any>[];
361
346
  /**
362
347
  * @param {object} args
363
348
  * @param {boolean} args.isNewRecord
@@ -440,25 +425,15 @@ declare class VelociousDatabaseRecord {
440
425
  */
441
426
  readColumn(attributeName: string): any;
442
427
  _belongsToChanges(): Record<string, any>;
443
- /**
444
- * @returns {Promise<void>}
445
- */
428
+ /** @returns {Promise<void>} */
446
429
  _createNewRecord(): Promise<void>;
447
- /**
448
- * @returns {Promise<void>}
449
- */
430
+ /** @returns {Promise<void>} */
450
431
  _updateRecordWithChanges(): Promise<void>;
451
- /**
452
- * @returns {number|string}
453
- */
432
+ /** @returns {number|string} */
454
433
  id(): number | string;
455
- /**
456
- * @returns {boolean}
457
- */
434
+ /** @returns {boolean} */
458
435
  isPersisted(): boolean;
459
- /**
460
- * @returns {boolean}
461
- */
436
+ /** @returns {boolean} */
462
437
  isNewRecord(): boolean;
463
438
  /**
464
439
  * @param {boolean} newIsNewRecord
@@ -466,17 +441,17 @@ declare class VelociousDatabaseRecord {
466
441
  */
467
442
  setIsNewRecord(newIsNewRecord: boolean): void;
468
443
  /**
444
+ * @template {typeof VelociousDatabaseRecord} MC
469
445
  * @param {string | number} id
446
+ * @returns {Promise<void>}
470
447
  */
471
- _reloadWithId(id: string | number): Promise<void>;
448
+ _reloadWithId<MC extends typeof VelociousDatabaseRecord>(id: string | number): Promise<void>;
472
449
  /**
473
450
  * @returns {Promise<void>}
474
451
  */
475
452
  reload(): Promise<void>;
476
453
  _runValidations(): Promise<void>;
477
- /**
478
- * @returns {string[]}
479
- */
454
+ /** @returns {string[]} */
480
455
  fullErrorMessages(): string[];
481
456
  /**
482
457
  * Assigns the attributes to the record and saves it.
@@ -491,5 +466,5 @@ declare class TranslationBase extends VelociousDatabaseRecord {
491
466
  */
492
467
  locale(): string;
493
468
  }
494
- import Query from "../query/index.js";
469
+ import ModelClassQuery from "../query/model-class-query.js";
495
470
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/database/record/index.js"],"names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qBhB;IAED,yCAuBC;IAED;;OAEG;IACH,oBAFa,OAAO,CAAC,IAAI,CAAC,CA6CzB;IAED;;OAEG;IACH,4BAFa,OAAO,CAAC,IAAI,CAAC,CAuBzB;IAED;;OAEG;IACH,MAFa,MAAM,GAAC,MAAM,CAezB;IAED;;OAEG;IACH,eAFa,OAAO,CAEuB;IAE3C;;OAEG;IACH,eAFa,OAAO,CAEsB;IAE1C;;;OAGG;IACH,+BAHW,OAAO,GACL,IAAI,CAIhB;IAED;;OAEG;IACH,kBAFW,MAAM,GAAG,MAAM,iBAiBzB;IAED;;OAEG;IACH,UAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;IAED,iCAwBC;IAED;;OAEG;IACH,qBAFa,MAAM,EAAE,CAiBpB;IAED;;;OAGG;IACH,2BAFW,MAAM,iBAMhB;CACF;AAED;IACE;;;OAGG;IACH,UAFa,MAAM,CAIlB;CACF;kBA3nDiB,mBAAmB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/database/record/index.js"],"names":[],"mappings":";wCAGa;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC;AAkB5C;IACE;;OAEG;IACH,YAFa,uBAAuB,CAMnC;IAED;;;OAGG;IACH,gBAHW,uBAAuB,GACrB,IAAI,CAIhB;IADC,gCAAmB;IAGrB,6DAA6D;IAC7D,uBADc,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAKxD;IAED,4EAA4E;IAC5E,sCADY,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,QAGtD;IADC,+DAAyC;CAE5C;AAED;IACE,iEAOC;IAED,iEAOC;IAED,iDAOC;IAED,oFAOC;IAED,6FAOC;IAuBD,uFAEC;IAED;;;OAGG;IACH,mCAHW,MAAM,kBACN,cAAc,sBAAsB,EAAE,OAAO,QAIvD;IAED;;;OAGG;IACH,uCAHW,MAAM,GACJ,cAAc,sBAAsB,EAAE,OAA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