@iamkirbki/database-handler-core 3.0.2 → 3.1.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.
Files changed (45) hide show
  1. package/dist/Database.d.ts +4 -4
  2. package/dist/Database.d.ts.map +1 -1
  3. package/dist/Database.js +2 -2
  4. package/dist/Query.d.ts +4 -4
  5. package/dist/Query.d.ts.map +1 -1
  6. package/dist/Query.js +1 -1
  7. package/dist/Record.d.ts +2 -2
  8. package/dist/Record.d.ts.map +1 -1
  9. package/dist/Record.js +4 -2
  10. package/dist/Table.d.ts +3 -3
  11. package/dist/Table.d.ts.map +1 -1
  12. package/dist/Table.js +2 -2
  13. package/dist/abstract/Controller.d.ts +13 -0
  14. package/dist/abstract/Controller.d.ts.map +1 -0
  15. package/dist/abstract/Controller.js +6 -0
  16. package/dist/abstract/Migration.d.ts +6 -0
  17. package/dist/abstract/Migration.d.ts.map +1 -0
  18. package/dist/abstract/Migration.js +2 -0
  19. package/dist/abstract/Model.d.ts +5 -500
  20. package/dist/abstract/Model.d.ts.map +1 -1
  21. package/dist/abstract/Model.js +1 -486
  22. package/dist/abstract/Schema.d.ts +20 -0
  23. package/dist/abstract/Schema.d.ts.map +1 -0
  24. package/dist/abstract/Schema.js +24 -0
  25. package/dist/abstract/User.d.ts +1 -1
  26. package/dist/abstract/User.d.ts.map +1 -1
  27. package/dist/abstract/User.js +1 -1
  28. package/dist/helpers/QueryStatementBuilder.d.ts +1 -1
  29. package/dist/helpers/QueryStatementBuilder.d.ts.map +1 -1
  30. package/dist/helpers/Validator.d.ts +1 -1
  31. package/dist/helpers/Validator.d.ts.map +1 -1
  32. package/dist/index.d.ts +12 -9
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +10 -7
  35. package/dist/interfaces/IDatabaseAdapter.d.ts +2 -2
  36. package/dist/interfaces/IDatabaseAdapter.d.ts.map +1 -1
  37. package/dist/types/index.d.ts +6 -2
  38. package/dist/types/index.d.ts.map +1 -1
  39. package/dist/types/index.js +2 -2
  40. package/dist/types/table.d.ts +7 -1
  41. package/dist/types/table.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/Schema.d.ts +0 -14
  44. package/dist/Schema.d.ts.map +0 -1
  45. package/dist/Schema.js +0 -13
@@ -1,513 +1,18 @@
1
- import IDatabaseAdapter from "@core/interfaces/IDatabaseAdapter";
2
- import { QueryParameters } from "../types/query";
3
- import Table from "@core/Table";
4
- import Record from "@core/Record";
5
- /**
6
- * **Model** - Abstract base class for database models providing a fluent ORM-like interface.
7
- *
8
- * This abstract class serves as the foundation for all database models in the application,
9
- * providing a complete CRUD (Create, Read, Update, Delete) interface with a chainable query
10
- * builder pattern. It abstracts away the complexity of direct database operations while
11
- * maintaining type safety through TypeScript generics.
12
- *
13
- * ### Key Features:
14
- * - **Type-Safe Operations**: Fully typed CRUD operations using TypeScript generics
15
- * - **Fluent Interface**: Chainable query methods for intuitive query building
16
- * - **Automatic Table Mapping**: Table name derived from class name
17
- * - **Zero Configuration**: Minimal setup required for basic operations
18
- * - **Consistent API**: Uniform interface across all models
19
- *
20
- * ### Architecture:
21
- * The Model class acts as a bridge between your application code and the underlying
22
- * Table/Record infrastructure. It maintains internal state for query parameters and
23
- * provides a clean, high-level API that feels natural for application developers.
24
- *
25
- * ### Type Parameter:
26
- * @template T - The shape of your model data. Must extend `{ id: string }` to ensure
27
- * all models have a primary key. This generic type flows through all
28
- * operations, providing compile-time type checking.
29
- *
30
- * @example Basic Model Definition
31
- * ```typescript
32
- * import Model from './abstract/Model';
33
- *
34
- * interface UserData {
35
- * id: string;
36
- * name: string;
37
- * email: string;
38
- * createdAt: string;
39
- * }
40
- *
41
- * export default class User extends Model<UserData> {
42
- * // Add custom methods here if needed
43
- * public findByEmail(email: string): UserData | undefined {
44
- * return this.where({ email }).get();
45
- * }
46
- * }
47
- * ```
48
- *
49
- * @example CRUD Operations
50
- * ```typescript
51
- * const db = new Database('./app.db');
52
- * const user = new User(db);
53
- *
54
- * // CREATE - Insert new record
55
- * const newUser = user.create({
56
- * id: '1',
57
- * name: 'John Doe',
58
- * email: 'john@example.com',
59
- * createdAt: new Date().toISOString()
60
- * });
61
- *
62
- * // READ - Fetch single record
63
- * const foundUser = user.where({ id: '1' }).get();
64
- * console.log(foundUser?.name); // "John Doe"
65
- *
66
- * // READ - Fetch all records
67
- * const allUsers = user.all();
68
- * console.log(allUsers.length); // Number of users
69
- *
70
- * // UPDATE - Modify existing record
71
- * user.where({ id: '1' }).update({
72
- * id: '1',
73
- * name: 'John Updated',
74
- * email: 'john@example.com',
75
- * createdAt: new Date().toISOString()
76
- * });
77
- *
78
- * // DELETE - Remove record
79
- * user.where({ id: '1' }).delete();
80
- * ```
81
- *
82
- * @example Advanced Query Patterns
83
- * ```typescript
84
- * // Find user by email
85
- * const user = userModel.where({ email: 'jane@example.com' }).get();
86
- *
87
- * // Update user by email
88
- * userModel
89
- * .where({ email: 'jane@example.com' })
90
- * .update({ id: '2', name: 'Jane Smith', email: 'jane@example.com', createdAt: '...' });
91
- *
92
- * // Delete user by name
93
- * userModel.where({ name: 'Bob Wilson' }).delete();
94
- *
95
- * // Check if user exists
96
- * const exists = userModel.where({ id: '123' }).get() !== undefined;
97
- * ```
98
- *
99
- * @example Custom Model Methods
100
- * ```typescript
101
- * export default class User extends Model<UserData> {
102
- * // Find active users
103
- * public findActive(): UserData[] {
104
- * return this.all().filter(user => user.status === 'active');
105
- * }
106
- *
107
- * // Soft delete by setting status
108
- * public softDelete(id: string): void {
109
- * const user = this.where({ id }).get();
110
- * if (user) {
111
- * this.where({ id }).update({ ...user, status: 'deleted' });
112
- * }
113
- * }
114
- *
115
- * // Count total users
116
- * public count(): number {
117
- * return this.all().length;
118
- * }
119
- * }
120
- * ```
121
- *
122
- * ### Best Practices:
123
- * 1. **Always extend Model**: Never instantiate Model directly - it's abstract
124
- * 2. **Define clear interfaces**: Create TypeScript interfaces for your data shapes
125
- * 3. **Use where() before mutations**: Always call where() before update() or delete()
126
- * 4. **Handle undefined**: get() can return undefined - check before using
127
- * 5. **Keep models focused**: Add domain logic, but avoid bloated models
128
- * 6. **Reset state**: Model maintains query state - create new instances for independent queries
129
- *
130
- * ### Limitations:
131
- * - Query parameters persist between operations on the same instance
132
- * - Complex queries (joins, aggregations) may require custom methods
133
- * - Batch operations should be implemented in subclasses if needed
134
- * - No built-in validation - implement in subclasses or use separate validators
135
- *
136
- * @abstract
137
- * @since 1.0.0
138
- * @see Table - Underlying table management class
139
- * @see Record - Individual record manipulation class
140
- */
1
+ import IDatabaseAdapter from "../interfaces/IDatabaseAdapter.js";
2
+ import { QueryParameters } from "../types/query.js";
3
+ import Table from "../Table.js";
4
+ import Record from "../Record.js";
141
5
  export default abstract class Model<T extends object> {
142
- /**
143
- * Internal Table instance managing database operations.
144
- *
145
- * This property holds a reference to the Table class that performs the actual
146
- * database operations. The table name is automatically derived from the class name
147
- * (e.g., a `User` model will interact with a `User` table).
148
- *
149
- * @private
150
- * @readonly
151
- */
152
6
  private Table;
153
- /**
154
- * Current query parameters for filtering operations.
155
- *
156
- * This object stores the WHERE clause conditions set via the where() method.
157
- * It persists across method calls on the same instance, allowing for chainable
158
- * query building. Reset by calling where() with new parameters or creating
159
- * a new model instance.
160
- *
161
- * @private
162
- * @example
163
- * ```typescript
164
- * // Internal state after: user.where({ id: '1' })
165
- * // QueryParams = { id: '1' }
166
- * ```
167
- */
168
7
  private QueryParams;
169
- /**
170
- * Protected constructor - use static create() factory instead
171
- *
172
- * @param table - Table instance for database operations
173
- */
174
- protected constructor(table: Table);
175
- /**
176
- * Create a new Model instance (async factory method).
177
- *
178
- * Creates a new model connected to the specified database. The table name is
179
- * automatically derived from the class name (via this.constructor.name), so a
180
- * class named `User` will interact with a table named `User`.
181
- *
182
- * **Important**: Ensure the table exists in the database before creating a model
183
- * instance. The Model class does not create tables automatically.
184
- *
185
- * @param adapter - Database adapter instance to use for all operations
186
- * @returns Promise resolving to the model instance
187
- *
188
- * @example
189
- * ```typescript
190
- * import { createDatabase } from '@handler/better-sqlite3';
191
- * import User from './models/User';
192
- *
193
- * const db = createDatabase('./app.db');
194
- * await db.exec(`CREATE TABLE IF NOT EXISTS User (
195
- * id TEXT PRIMARY KEY,
196
- * name TEXT NOT NULL,
197
- * email TEXT UNIQUE
198
- * )`);
199
- *
200
- * const userModel = await User.connect(db);
201
- * ```
202
- */
8
+ constructor(table: Table);
203
9
  static connect<M extends Model<object>>(this: new (table: Table) => M, adapter: IDatabaseAdapter): Promise<M>;
204
- /**
205
- * Get the Record instance for the current query parameters.
206
- *
207
- * This method provides access to the Record instance matching the current
208
- * QueryParams. It's used internally by get(), update(), and delete() methods.
209
- * Returns undefined if no matching record exists.
210
- *
211
- * @private
212
- * @returns Promise resolving to the matching Record instance or undefined
213
- */
214
10
  private RecordGet;
215
- /**
216
- * Retrieve a single record matching the current query parameters.
217
- *
218
- * Returns the data for the first record that matches the WHERE conditions set
219
- * by where(). If no where() was called, behavior is undefined (typically returns
220
- * the first record, but this is not guaranteed). Returns undefined if no matching
221
- * record exists.
222
- *
223
- * **Best Practice**: Always call where() before get() to ensure predictable results.
224
- *
225
- * @returns Promise resolving to the matching record's data, or undefined if not found
226
- *
227
- * @example
228
- * ```typescript
229
- * // Find user by ID
230
- * const user = await userModel.where({ id: '123' }).get();
231
- * if (user) {
232
- * console.log(user.name);
233
- * } else {
234
- * console.log('User not found');
235
- * }
236
- *
237
- * // Find user by email
238
- * const user = await userModel.where({ email: 'john@example.com' }).get();
239
- *
240
- * // Check existence
241
- * const exists = await userModel.where({ id: '456' }).get() !== undefined;
242
- * ```
243
- */
244
11
  get(): Promise<T | undefined>;
245
- /**
246
- * Retrieve all records from the table.
247
- *
248
- * Returns an array containing the data for every record in the table. This method
249
- * ignores any where() conditions - it always returns the complete table contents.
250
- * The array will be empty if the table has no records.
251
- *
252
- * **Performance Note**: For large tables, consider implementing pagination or
253
- * filtering in a custom method to avoid loading excessive data into memory.
254
- *
255
- * @returns Promise resolving to array of all records in the table
256
- *
257
- * @example
258
- * ```typescript
259
- * // Get all users
260
- * const allUsers = await userModel.all();
261
- * console.log(`Total users: ${allUsers.length}`);
262
- *
263
- * // Iterate over all records
264
- * allUsers.forEach(user => {
265
- * console.log(`${user.name} - ${user.email}`);
266
- * });
267
- *
268
- * // Filter in memory
269
- * const activeUsers = (await userModel.all()).filter(u => u.status === 'active');
270
- *
271
- * // Map to simpler structure
272
- * const userNames = (await userModel.all()).map(u => u.name);
273
- * ```
274
- */
275
12
  all(): Promise<T[]>;
276
- /**
277
- * Set WHERE clause conditions for subsequent operations.
278
- *
279
- * This method configures the query parameters that will be used by get(), update(),
280
- * and delete() operations. It follows a fluent interface pattern, returning the
281
- * model instance to allow method chaining.
282
- *
283
- * The parameters are stored internally and persist until where() is called again
284
- * with different parameters or a new model instance is created.
285
- *
286
- * **Important**: Calling where() replaces any previous query parameters - it does
287
- * not merge them. For AND conditions with multiple fields, pass all conditions in
288
- * a single where() call.
289
- *
290
- * @param QueryParameters - Object mapping column names to their expected values.
291
- * All conditions are combined with AND logic.
292
- * @returns The model instance for method chaining
293
- *
294
- * @example Basic Usage
295
- * ```typescript
296
- * // Single condition
297
- * const user = userModel.where({ id: '123' }).get();
298
- *
299
- * // Multiple conditions (AND logic)
300
- * const user = userModel.where({
301
- * email: 'john@example.com',
302
- * status: 'active'
303
- * }).get();
304
- * ```
305
- *
306
- * @example Chaining Pattern
307
- * ```typescript
308
- * // Chain where() with other operations
309
- * userModel
310
- * .where({ id: '123' })
311
- * .update({ id: '123', name: 'Updated Name', email: 'new@email.com' });
312
- *
313
- * userModel
314
- * .where({ status: 'inactive' })
315
- * .delete();
316
- * ```
317
- *
318
- * @example State Persistence
319
- * ```typescript
320
- * // Query parameters persist
321
- * const model = new User(db);
322
- * model.where({ id: '123' });
323
- * const user1 = model.get(); // Uses id: '123'
324
- * const user2 = model.get(); // Still uses id: '123'
325
- *
326
- * // Reset with new where() call
327
- * model.where({ id: '456' });
328
- * const user3 = model.get(); // Now uses id: '456'
329
- * ```
330
- */
331
13
  where(QueryParameters: QueryParameters): this;
332
- /**
333
- * Insert a new record into the table.
334
- *
335
- * Creates a new database record with the provided data. The data object must
336
- * include all required fields as defined by your table schema. Returns a Record
337
- * instance wrapping the newly created data, or undefined if the insert fails.
338
- *
339
- * **Note**: This method does not use the where() query parameters - it always
340
- * inserts a new record. Duplicate IDs or constraint violations will throw errors.
341
- *
342
- * @param data - Complete record data to insert. Must satisfy type T constraints.
343
- * @returns Promise resolving to Record instance wrapping the created data, or undefined on failure
344
- * @throws Database errors on constraint violations (duplicate IDs, etc.)
345
- *
346
- * @example Basic Insert
347
- * ```typescript
348
- * const newUser = await userModel.create({
349
- * id: '123',
350
- * name: 'John Doe',
351
- * email: 'john@example.com',
352
- * createdAt: new Date().toISOString()
353
- * });
354
- *
355
- * if (newUser) {
356
- * console.log('User created:', newUser.values);
357
- * }
358
- * ```
359
- *
360
- * @example Handling Duplicates
361
- * ```typescript
362
- * try {
363
- * const user = await userModel.create({
364
- * id: 'existing-id',
365
- * name: 'Test',
366
- * email: 'test@example.com'
367
- * });
368
- * } catch (error) {
369
- * console.error('Failed to create user:', error.message);
370
- * // Handle duplicate ID or constraint violation
371
- * }
372
- * ```
373
- *
374
- * @example Batch Insert
375
- * ```typescript
376
- * const usersData = [
377
- * { id: '1', name: 'User 1', email: 'user1@example.com' },
378
- * { id: '2', name: 'User 2', email: 'user2@example.com' },
379
- * { id: '3', name: 'User 3', email: 'user3@example.com' }
380
- * ];
381
- *
382
- * const createdUsers = await Promise.all(usersData.map(data => userModel.create(data)));
383
- * console.log(`Created ${createdUsers.filter(u => u).length} users`);
384
- * ```
385
- */
386
14
  create(data: T): Promise<Record<T> | undefined>;
387
- /**
388
- * Update the record matching the current query parameters.
389
- *
390
- * Modifies the database record that matches the WHERE conditions set by where().
391
- * The entire record is replaced with the new data - this is not a partial update.
392
- * If no record matches the query parameters, this method does nothing silently.
393
- *
394
- * **Important**: Always call where() before update() to specify which record to modify.
395
- * Without where(), the behavior is undefined and may update an arbitrary record.
396
- *
397
- * @param data - Complete replacement data for the record. Must satisfy type T.
398
- * @returns void - No return value. Check with get() if you need confirmation.
399
- *
400
- * @example Basic Update
401
- * ```typescript
402
- * // Update user by ID
403
- * userModel.where({ id: '123' }).update({
404
- * id: '123',
405
- * name: 'Updated Name',
406
- * email: 'updated@example.com',
407
- * createdAt: '2024-01-01T00:00:00Z'
408
- * });
409
- * ```
410
- *
411
- * @example Update with Verification
412
- * ```typescript
413
- * // Get current data
414
- * const user = userModel.where({ id: '123' }).get();
415
- *
416
- * if (user) {
417
- * // Modify specific field
418
- * userModel.where({ id: '123' }).update({
419
- * ...user,
420
- * name: 'New Name'
421
- * });
422
- *
423
- * // Verify update
424
- * const updated = userModel.where({ id: '123' }).get();
425
- * console.log('Updated successfully:', updated?.name === 'New Name');
426
- * }
427
- * ```
428
- *
429
- * @example Conditional Update
430
- * ```typescript
431
- * // Update by email instead of ID
432
- * const user = userModel.where({ email: 'old@example.com' }).get();
433
- *
434
- * if (user) {
435
- * userModel.where({ email: 'old@example.com' }).update({
436
- * ...user,
437
- * email: 'new@example.com'
438
- * });
439
- * }
440
- * ```
441
- */
442
15
  update(data: T): Promise<void>;
443
- /**
444
- * Delete the record matching the current query parameters.
445
- *
446
- * Permanently removes the database record that matches the WHERE conditions set
447
- * by where(). This operation cannot be undone. If no record matches the query
448
- * parameters, this method does nothing silently.
449
- *
450
- * **Important**: Always call where() before delete() to specify which record to remove.
451
- * Without where(), the behavior is undefined and may delete an arbitrary record.
452
- *
453
- * **Warning**: This is a permanent deletion. Consider implementing soft deletes
454
- * (status flags) in your models if you need to recover deleted records.
455
- *
456
- * @returns Promise that resolves when deletion is complete
457
- *
458
- * @example Basic Deletion
459
- * ```typescript
460
- * // Delete user by ID
461
- * await userModel.where({ id: '123' }).delete();
462
- *
463
- * // Verify deletion
464
- * const deleted = await userModel.where({ id: '123' }).get();
465
- * console.log('Deleted:', deleted === undefined); // true
466
- * ```
467
- *
468
- * @example Safe Deletion with Confirmation
469
- * ```typescript
470
- * // Check before deleting
471
- * const user = await userModel.where({ id: '123' }).get();
472
- *
473
- * if (user) {
474
- * console.log(`Deleting user: ${user.name}`);
475
- * await userModel.where({ id: '123' }).delete();
476
- * console.log('User deleted successfully');
477
- * } else {
478
- * console.log('User not found');
479
- * }
480
- * ```
481
- *
482
- * @example Batch Deletion
483
- * ```typescript
484
- * // Delete all inactive users
485
- * const inactiveUsers = (await userModel.all()).filter(u => u.status === 'inactive');
486
- *
487
- * for (const user of inactiveUsers) {
488
- * await userModel.where({ id: user.id }).delete();
489
- * }
490
- *
491
- * console.log(`Deleted ${inactiveUsers.length} inactive users`);
492
- * ```
493
- *
494
- * @example Soft Delete Alternative
495
- * ```typescript
496
- * // Instead of permanent deletion, mark as deleted
497
- * export default class User extends Model<UserData> {
498
- * public async softDelete(id: string): Promise<void> {
499
- * const user = await this.where({ id }).get();
500
- * if (user) {
501
- * await this.where({ id }).update({
502
- * ...user,
503
- * status: 'deleted',
504
- * deletedAt: new Date().toISOString()
505
- * });
506
- * }
507
- * }
508
- * }
509
- * ```
510
- */
511
16
  delete(): Promise<void>;
512
17
  }
513
18
  //# sourceMappingURL=Model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../src/abstract/Model.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuIG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,KAAK,CAAC,CA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