forge-sql-orm 1.0.31 → 2.0.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 (37) hide show
  1. package/README.md +216 -695
  2. package/dist/ForgeSQLORM.js +526 -564
  3. package/dist/ForgeSQLORM.js.map +1 -1
  4. package/dist/ForgeSQLORM.mjs +527 -554
  5. package/dist/ForgeSQLORM.mjs.map +1 -1
  6. package/dist/core/ForgeSQLCrudOperations.d.ts +101 -130
  7. package/dist/core/ForgeSQLCrudOperations.d.ts.map +1 -1
  8. package/dist/core/ForgeSQLORM.d.ts +11 -10
  9. package/dist/core/ForgeSQLORM.d.ts.map +1 -1
  10. package/dist/core/ForgeSQLQueryBuilder.d.ts +275 -111
  11. package/dist/core/ForgeSQLQueryBuilder.d.ts.map +1 -1
  12. package/dist/core/ForgeSQLSelectOperations.d.ts +65 -22
  13. package/dist/core/ForgeSQLSelectOperations.d.ts.map +1 -1
  14. package/dist/core/SystemTables.d.ts +59 -0
  15. package/dist/core/SystemTables.d.ts.map +1 -0
  16. package/dist/index.d.ts +1 -2
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/utils/sqlUtils.d.ts +53 -6
  19. package/dist/utils/sqlUtils.d.ts.map +1 -1
  20. package/dist-cli/cli.js +461 -397
  21. package/dist-cli/cli.js.map +1 -1
  22. package/dist-cli/cli.mjs +461 -397
  23. package/dist-cli/cli.mjs.map +1 -1
  24. package/package.json +21 -27
  25. package/src/core/ForgeSQLCrudOperations.ts +360 -473
  26. package/src/core/ForgeSQLORM.ts +38 -79
  27. package/src/core/ForgeSQLQueryBuilder.ts +255 -132
  28. package/src/core/ForgeSQLSelectOperations.ts +185 -72
  29. package/src/core/SystemTables.ts +7 -0
  30. package/src/index.ts +1 -2
  31. package/src/utils/sqlUtils.ts +164 -22
  32. package/dist/core/ComplexQuerySchemaBuilder.d.ts +0 -38
  33. package/dist/core/ComplexQuerySchemaBuilder.d.ts.map +0 -1
  34. package/dist/knex/index.d.ts +0 -4
  35. package/dist/knex/index.d.ts.map +0 -1
  36. package/src/core/ComplexQuerySchemaBuilder.ts +0 -63
  37. package/src/knex/index.ts +0 -4
@@ -1,164 +1,328 @@
1
1
  import { UpdateQueryResponse } from "@forge/sql";
2
- import type { EntityName, LoggingOptions, QBFilterQuery } from "..";
3
- import type { EntitySchema } from "@mikro-orm/core/metadata/EntitySchema";
4
- import type { QueryBuilder } from "@mikro-orm/knex/query";
5
- import type { Knex } from "knex";
6
- import { EntityKey, EntityProperty } from "@mikro-orm/core";
7
2
  import { SqlParameters } from "@forge/sql/out/sql-statement";
8
- import { DynamicEntity } from "./ComplexQuerySchemaBuilder";
3
+ import { MySql2Database } from "drizzle-orm/mysql2/driver";
4
+ import { AnyMySqlSelectQueryBuilder, AnyMySqlTable } from "drizzle-orm/mysql-core";
5
+ import { MySqlSelectDynamic } from "drizzle-orm/mysql-core/query-builders/select.types";
6
+ import { InferInsertModel, SQL } from "drizzle-orm";
9
7
  /**
10
8
  * Interface representing the main ForgeSQL operations.
9
+ * Provides access to CRUD operations and schema-level SQL operations.
11
10
  */
12
11
  export interface ForgeSqlOperation extends QueryBuilderForgeSql {
13
12
  /**
14
- * Provides CRUD operations.
13
+ * Provides CRUD (Create, Read, Update, Delete) operations.
14
+ * @returns {CRUDForgeSQL} Interface for performing CRUD operations
15
15
  */
16
16
  crud(): CRUDForgeSQL;
17
17
  /**
18
18
  * Provides schema-level SQL fetch operations.
19
+ * @returns {SchemaSqlForgeSql} Interface for executing schema-bound SQL queries
19
20
  */
20
21
  fetch(): SchemaSqlForgeSql;
21
22
  }
22
23
  /**
23
- * Options for configuring ForgeSQL ORM behavior.
24
+ * Interface for Query Builder operations.
25
+ * Provides access to the underlying Drizzle ORM query builder.
24
26
  */
25
- export interface ForgeSqlOrmOptions {
26
- /**
27
- * Enables logging of raw SQL queries in the Atlassian Forge Developer Console.
28
- */
29
- logRawSqlQuery?: boolean;
27
+ export interface QueryBuilderForgeSql {
30
28
  /**
31
- * Disable optimistic locking
29
+ * Creates a new query builder for the given entity.
30
+ * @returns {MySql2Database<Record<string, unknown>>} The Drizzle database instance for building queries
32
31
  */
33
- disableOptimisticLocking?: boolean;
32
+ getDrizzleQueryBuilder(): MySql2Database<Record<string, unknown>>;
34
33
  }
35
34
  /**
36
- * Interface for schema-level SQL operations.
35
+ * Interface for CRUD (Create, Read, Update, Delete) operations.
36
+ * Provides methods for basic database operations with support for optimistic locking.
37
37
  */
38
- export interface SchemaSqlForgeSql {
39
- /**
40
- * Executes a schema-bound SQL query and maps the result to the specified entity schema.
41
- * @param query - The SQL query to execute.
42
- * @param schema - The entity schema.
43
- * @returns A list of mapped entity objects.
44
- */
45
- executeSchemaSQL<T extends object>(query: string, schema: EntitySchema<T>): Promise<T[]>;
38
+ export interface CRUDForgeSQL {
46
39
  /**
47
- * Executes a schema-bound SQL query and maps the only one result to the specified entity schema.
48
- * @param query - The SQL query to execute.
49
- * @param schema - The entity schema.
50
- * @returns A list of mapped entity objects.
40
+ * Inserts multiple records into the database.
41
+ * @template T - The type of the table schema
42
+ * @param {T} schema - The entity schema
43
+ * @param {Partial<InferInsertModel<T>>[]} models - The list of entities to insert
44
+ * @param {boolean} [updateIfExists] - Whether to update the row if it already exists (default: false)
45
+ * @returns {Promise<number>} The number of inserted rows
46
+ * @throws {Error} If the insert operation fails
51
47
  */
52
- executeSchemaSQLOnlyOne<T extends object>(query: string, schema: EntitySchema<T>): Promise<T | undefined>;
48
+ insert<T extends AnyMySqlTable>(schema: T, models: Partial<InferInsertModel<T>>[], updateIfExists?: boolean): Promise<number>;
53
49
  /**
54
- * Executes a raw SQL query and returns the results.
55
- * @param query - The raw SQL query.
56
- * @returns A list of results as objects.
50
+ * Deletes a record by its ID.
51
+ * @template T - The type of the table schema
52
+ * @param {unknown} id - The ID of the record to delete
53
+ * @param {T} schema - The entity schema
54
+ * @returns {Promise<number>} The number of rows affected
55
+ * @throws {Error} If the delete operation fails
57
56
  */
58
- executeRawSQL<T extends object | unknown>(query: string): Promise<T[]>;
57
+ deleteById<T extends AnyMySqlTable>(id: unknown, schema: T): Promise<number>;
59
58
  /**
60
- * Executes a raw SQL update query.
61
- * @param query - The raw SQL update query.
62
- * @param params - Sql parameters.
63
- * @returns The update response containing affected rows.
59
+ * Updates a record by its ID with optimistic locking support.
60
+ * If a version field is defined in the schema, versioning is applied:
61
+ * - the current record version is retrieved
62
+ * - checked for concurrent modifications
63
+ * - and then incremented
64
+ *
65
+ * @template T - The type of the table schema
66
+ * @param {Partial<InferInsertModel<T>>} entity - The entity with updated values
67
+ * @param {T} schema - The entity schema
68
+ * @returns {Promise<number>} The number of rows affected
69
+ * @throws {Error} If the primary key is not included in the update fields
70
+ * @throws {Error} If optimistic locking check fails
64
71
  */
65
- executeRawUpdateSQL(query: string, params?: SqlParameters[]): Promise<UpdateQueryResponse>;
72
+ updateById<T extends AnyMySqlTable>(entity: Partial<InferInsertModel<T>>, schema: T): Promise<number>;
66
73
  /**
67
- * Creates a builder for constructing complex query schemas dynamically.
68
- * This method is useful when working with dynamic entity structures where fields
69
- * may not be known at compile time.
70
- * @returns An instance of ComplexQuerySchemaBuilder configured for dynamic entities.
74
+ * Updates specified fields of records based on provided conditions.
75
+ * If the "where" parameter is not provided, the WHERE clause is built from the entity fields
76
+ * that are not included in the list of fields to update.
77
+ *
78
+ * @template T - The type of the table schema
79
+ * @param {Partial<InferInsertModel<T>>} updateData - The object containing values to update
80
+ * @param {T} schema - The entity schema
81
+ * @param {SQL<unknown>} [where] - Optional filtering conditions for the WHERE clause
82
+ * @returns {Promise<number>} The number of affected rows
83
+ * @throws {Error} If no filtering criteria are provided
84
+ * @throws {Error} If the update operation fails
71
85
  */
72
- createComplexQuerySchema(): ComplexQuerySchemaBuilder<DynamicEntity>;
86
+ updateFields<T extends AnyMySqlTable>(updateData: Partial<InferInsertModel<T>>, schema: T, where?: SQL<unknown>): Promise<number>;
73
87
  }
74
88
  /**
75
- * Interface for CRUD (Create, Read, Update, Delete) operations.
89
+ * Interface for schema-level SQL operations.
90
+ * Provides methods for executing SQL queries with schema binding and type safety.
76
91
  */
77
- export interface CRUDForgeSQL {
92
+ export interface SchemaSqlForgeSql {
78
93
  /**
79
- * Inserts multiple records into the database.
80
- * @param schema - The entity schema.
81
- * @param models - The list of entities to insert.
82
- * @param updateIfExists - Whether to update the row if it already exists.
83
- * @returns The number of inserted rows.
94
+ * Executes a Drizzle query and returns the result.
95
+ * @template T - The type of the query builder
96
+ * @param {T} query - The Drizzle query to execute
97
+ * @returns {Promise<Awaited<T>>} The query result
98
+ * @throws {Error} If the query execution fails
84
99
  */
85
- insert<T extends object>(schema: EntitySchema<T>, models: T[], updateIfExists?: boolean): Promise<number>;
100
+ executeQuery<T extends MySqlSelectDynamic<AnyMySqlSelectQueryBuilder>>(query: T): Promise<Awaited<T>>;
86
101
  /**
87
- * Deletes a record by its ID.
88
- * @param id - The ID of the record to delete.
89
- * @param schema - The entity schema.
90
- * @returns The number of rows affected.
102
+ * Executes a Drizzle query and returns a single result.
103
+ * @template T - The type of the query builder
104
+ * @param {T} query - The Drizzle query to execute
105
+ * @returns {Promise<Awaited<T> extends Array<any> ? Awaited<T>[number] | undefined : Awaited<T> | undefined>} A single result object or undefined
106
+ * @throws {Error} If more than one record is returned
107
+ * @throws {Error} If the query execution fails
91
108
  */
92
- deleteById<T extends object>(id: unknown, schema: EntitySchema<T>): Promise<number>;
109
+ executeQueryOnlyOne<T extends MySqlSelectDynamic<AnyMySqlSelectQueryBuilder>>(query: T): Promise<Awaited<T> extends Array<any> ? Awaited<T>[number] | undefined : Awaited<T> | undefined>;
93
110
  /**
94
- * Updates a record by its ID.
95
- * * If a version field is defined in the schema, versioning is applied:
96
- * * the current record version is retrieved, checked for concurrent modifications,
97
- * * and then incremented.
98
- * *
99
- * * @param entity - The entity with updated values.
100
- * * @param schema - The entity schema.
101
- * * @throws If the primary key is not included in the update fields.
102
- * */
103
- updateById<T extends object>(entity: Partial<T>, schema: EntitySchema<T>): Promise<void>;
104
- /**
105
- * Updates specified fields of records based on provided conditions.
106
- * If the "where" parameter is not provided, the WHERE clause is built from the entity fields
107
- * that are not included in the list of fields to update.
108
- *
109
- * @param entity - The object containing values to update and potential criteria for filtering.
110
- * @param fields - Array of field names to update.
111
- * @param schema - The entity schema.
112
- * @param where - Optional filtering conditions for the WHERE clause.
113
- * @returns The number of affected rows.
114
- * @throws If no filtering criteria are provided (either via "where" or from the remaining entity fields).
111
+ * Executes a raw SQL query and returns the results.
112
+ * @template T - The type of the result objects
113
+ * @param {string} query - The raw SQL query
114
+ * @param {SqlParameters[]} [params] - Optional SQL parameters
115
+ * @returns {Promise<T[]>} A list of results as objects
116
+ * @throws {Error} If the query execution fails
115
117
  */
116
- updateFields<T extends object>(entity: Partial<T>, fields: EntityKey<T>[], schema: EntitySchema<T>, where?: QBFilterQuery<T>): Promise<number>;
118
+ executeRawSQL<T extends object | unknown>(query: string, params?: SqlParameters[]): Promise<T[]>;
117
119
  /**
118
- * Updates specific fields of a record identified by its primary key.
119
- *
120
- * If a version field is defined in the schema, versioning is applied:
121
- * the current record version is retrieved, checked for concurrent modifications,
122
- * and then incremented.
123
- *
124
- * @param entity - The entity with updated values.
125
- * @param fields - The list of field names to update.
126
- * @param schema - The entity schema.
127
- * @throws If the primary key is not included in the update fields.
120
+ * Executes a raw SQL update query.
121
+ * @param {string} query - The raw SQL update query
122
+ * @param {SqlParameters[]} [params] - Optional SQL parameters
123
+ * @returns {Promise<UpdateQueryResponse>} The update response containing affected rows
124
+ * @throws {Error} If the update operation fails
128
125
  */
129
- updateFieldById<T extends object>(entity: T, fields: EntityKey<T>[], schema: EntitySchema<T>): Promise<void>;
126
+ executeRawUpdateSQL(query: string, params?: unknown[]): Promise<UpdateQueryResponse>;
130
127
  }
131
128
  /**
132
- * Interface for Query Builder operations.
129
+ * Interface for version field metadata.
130
+ * Defines the configuration for optimistic locking version fields.
133
131
  */
134
- export interface QueryBuilderForgeSql {
132
+ export interface VersionFieldMetadata {
133
+ /** Name of the version field */
134
+ fieldName: string;
135
+ }
136
+ /**
137
+ * Interface for table metadata.
138
+ * Defines the configuration for a specific table.
139
+ */
140
+ export interface TableMetadata {
141
+ /** Name of the table */
142
+ tableName: string;
143
+ /** Version field configuration for optimistic locking */
144
+ versionField: VersionFieldMetadata;
145
+ }
146
+ /**
147
+ * Type for additional metadata configuration.
148
+ * Maps table names to their metadata configuration.
149
+ */
150
+ export type AdditionalMetadata = Record<string, TableMetadata>;
151
+ /**
152
+ * Options for configuring ForgeSQL ORM behavior.
153
+ */
154
+ export interface ForgeSqlOrmOptions {
135
155
  /**
136
- * Creates a new query builder for the given entity.
137
- * @param entityName - The entity name or an existing query builder.
138
- * @param alias - The alias for the entity.
139
- * @param loggerContext - Logging options.
140
- * @returns The query builder instance.
156
+ * Enables logging of raw SQL queries in the Atlassian Forge Developer Console.
157
+ * Useful for debugging and monitoring SQL operations.
158
+ * @default false
141
159
  */
142
- createQueryBuilder<Entity extends object, RootAlias extends string = never>(entityName: EntityName<Entity> | QueryBuilder<Entity>, alias?: RootAlias, loggerContext?: LoggingOptions): QueryBuilder<Entity, RootAlias>;
160
+ logRawSqlQuery?: boolean;
143
161
  /**
144
- * Provides access to the underlying Knex instance for building complex query parts.
145
- * enabling advanced query customization and performance tuning.
146
- * @returns The Knex instance, which can be used for query building.
162
+ * Enables logging of raw SQL queries in the Atlassian Forge Developer Console.
163
+ * Useful for debugging and monitoring SQL operations.
164
+ * @default false
147
165
  */
148
- getKnex(): Knex<any, any[]>;
149
- }
150
- export interface ComplexQuerySchemaBuilder<T> {
166
+ logRawSqlQueryParams?: boolean;
151
167
  /**
152
- * Adds a field from an entity schema to the builder.
153
- * @param field - The entity property to be added.
154
- * @param alias - (Optional) Alias for the field name.
155
- * @returns The updated instance of the builder.
168
+ * Disables optimistic locking for all operations.
169
+ * When enabled, version checks are skipped during updates.
170
+ * @default false
156
171
  */
157
- addField<K>(field: Partial<EntityProperty<K>>, alias?: string): this;
172
+ disableOptimisticLocking?: boolean;
158
173
  /**
159
- * Creates and returns a new entity schema based on the added fields.
160
- * @returns A new EntitySchema<T> instance.
174
+ * Additional metadata for table configuration.
175
+ * Allows specifying table-specific settings and behaviors.
176
+ * @example
177
+ * ```typescript
178
+ * {
179
+ * users: {
180
+ * tableName: "users",
181
+ * versionField: {
182
+ * fieldName: "updatedAt",
183
+ * type: "datetime",
184
+ * nullable: false
185
+ * }
186
+ * }
187
+ * }
188
+ * ```
161
189
  */
162
- createSchema(): EntitySchema<T>;
190
+ additionalMetadata?: AdditionalMetadata;
163
191
  }
192
+ /**
193
+ * Custom type for MySQL datetime fields.
194
+ * Handles conversion between JavaScript Date objects and MySQL datetime strings.
195
+ */
196
+ export declare const mySqlDateTimeString: {
197
+ (): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
198
+ name: "";
199
+ dataType: "custom";
200
+ columnType: "MySqlCustomColumn";
201
+ data: Date;
202
+ driverParam: unknown;
203
+ enumValues: undefined;
204
+ }>;
205
+ <TConfig extends Record<string, any> & {
206
+ format?: string;
207
+ }>(fieldConfig?: TConfig | undefined): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
208
+ name: "";
209
+ dataType: "custom";
210
+ columnType: "MySqlCustomColumn";
211
+ data: Date;
212
+ driverParam: unknown;
213
+ enumValues: undefined;
214
+ }>;
215
+ <TName extends string>(dbName: TName, fieldConfig?: {
216
+ format?: string;
217
+ } | undefined): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
218
+ name: TName;
219
+ dataType: "custom";
220
+ columnType: "MySqlCustomColumn";
221
+ data: Date;
222
+ driverParam: unknown;
223
+ enumValues: undefined;
224
+ }>;
225
+ };
226
+ /**
227
+ * Custom type for MySQL timestamp fields.
228
+ * Handles conversion between JavaScript Date objects and MySQL timestamp strings.
229
+ */
230
+ export declare const mySqlTimestampString: {
231
+ (): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
232
+ name: "";
233
+ dataType: "custom";
234
+ columnType: "MySqlCustomColumn";
235
+ data: Date;
236
+ driverParam: unknown;
237
+ enumValues: undefined;
238
+ }>;
239
+ <TConfig extends Record<string, any> & {
240
+ format?: string;
241
+ }>(fieldConfig?: TConfig | undefined): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
242
+ name: "";
243
+ dataType: "custom";
244
+ columnType: "MySqlCustomColumn";
245
+ data: Date;
246
+ driverParam: unknown;
247
+ enumValues: undefined;
248
+ }>;
249
+ <TName extends string>(dbName: TName, fieldConfig?: {
250
+ format?: string;
251
+ } | undefined): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
252
+ name: TName;
253
+ dataType: "custom";
254
+ columnType: "MySqlCustomColumn";
255
+ data: Date;
256
+ driverParam: unknown;
257
+ enumValues: undefined;
258
+ }>;
259
+ };
260
+ /**
261
+ * Custom type for MySQL date fields.
262
+ * Handles conversion between JavaScript Date objects and MySQL date strings.
263
+ */
264
+ export declare const mySqlDateString: {
265
+ (): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
266
+ name: "";
267
+ dataType: "custom";
268
+ columnType: "MySqlCustomColumn";
269
+ data: Date;
270
+ driverParam: unknown;
271
+ enumValues: undefined;
272
+ }>;
273
+ <TConfig extends Record<string, any> & {
274
+ format?: string;
275
+ }>(fieldConfig?: TConfig | undefined): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
276
+ name: "";
277
+ dataType: "custom";
278
+ columnType: "MySqlCustomColumn";
279
+ data: Date;
280
+ driverParam: unknown;
281
+ enumValues: undefined;
282
+ }>;
283
+ <TName extends string>(dbName: TName, fieldConfig?: {
284
+ format?: string;
285
+ } | undefined): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
286
+ name: TName;
287
+ dataType: "custom";
288
+ columnType: "MySqlCustomColumn";
289
+ data: Date;
290
+ driverParam: unknown;
291
+ enumValues: undefined;
292
+ }>;
293
+ };
294
+ /**
295
+ * Custom type for MySQL time fields.
296
+ * Handles conversion between JavaScript Date objects and MySQL time strings.
297
+ */
298
+ export declare const mySqlTimeString: {
299
+ (): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
300
+ name: "";
301
+ dataType: "custom";
302
+ columnType: "MySqlCustomColumn";
303
+ data: Date;
304
+ driverParam: unknown;
305
+ enumValues: undefined;
306
+ }>;
307
+ <TConfig extends Record<string, any> & {
308
+ format?: string;
309
+ }>(fieldConfig?: TConfig | undefined): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
310
+ name: "";
311
+ dataType: "custom";
312
+ columnType: "MySqlCustomColumn";
313
+ data: Date;
314
+ driverParam: unknown;
315
+ enumValues: undefined;
316
+ }>;
317
+ <TName extends string>(dbName: TName, fieldConfig?: {
318
+ format?: string;
319
+ } | undefined): import("drizzle-orm/mysql-core").MySqlCustomColumnBuilder<{
320
+ name: TName;
321
+ dataType: "custom";
322
+ columnType: "MySqlCustomColumn";
323
+ data: Date;
324
+ driverParam: unknown;
325
+ enumValues: undefined;
326
+ }>;
327
+ };
164
328
  //# sourceMappingURL=ForgeSQLQueryBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ForgeSQLQueryBuilder.d.ts","sourceRoot":"","sources":["../../src/core/ForgeSQLQueryBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAC,MAAM,6B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EntitySchema";
3
- import { ComplexQuerySchemaBuilder, ForgeSqlOrmOptions, SchemaSqlForgeSql } from "./ForgeSQLQueryBuilder";
4
- import { SqlParameters } from "@forge/sql/out/sql-statement";
5
- import { DynamicEntity } from "./ComplexQuerySchemaBuilder";
2
+ import { ForgeSqlOrmOptions, SchemaSqlForgeSql } from "./ForgeSQLQueryBuilder";
3
+ import { AnyMySqlSelectQueryBuilder, MySqlSelectDynamic } from "drizzle-orm/mysql-core/query-builders/select.types";
4
+ /**
5
+ * Class implementing SQL select operations for ForgeSQL ORM.
6
+ * Provides methods for executing queries and mapping results to entity types.
7
+ */
6
8
  export declare class ForgeSQLSelectOperations implements SchemaSqlForgeSql {
7
9
  private readonly options;
10
+ /**
11
+ * Creates a new instance of ForgeSQLSelectOperations.
12
+ * @param {ForgeSqlOrmOptions} options - Configuration options for the ORM
13
+ */
8
14
  constructor(options: ForgeSqlOrmOptions);
9
15
  /**
10
- * Creates a builder for constructing complex query schemas dynamically.
11
- * This method is useful when working with dynamic entity structures where fields
12
- * may not be known at compile time.
13
- * @returns An instance of ComplexQuerySchemaBuilder configured for dynamic entities.
16
+ * Executes a Drizzle query and returns the results.
17
+ * Maps the raw database results to the appropriate entity types.
18
+ *
19
+ * @template T - The type of the query builder
20
+ * @param {T} query - The Drizzle query to execute
21
+ * @returns {Promise<Awaited<T>>} The query results mapped to entity types
22
+ */
23
+ executeQuery<T extends MySqlSelectDynamic<AnyMySqlSelectQueryBuilder>>(query: T): Promise<Awaited<T>>;
24
+ /**
25
+ * Extracts column information and alias name from a column definition.
26
+ * @param {any} column - The column definition from Drizzle
27
+ * @returns {Object} Object containing the real column and its alias name
28
+ */
29
+ private extractColumnInfo;
30
+ /**
31
+ * Finds the alias chunk in SQL query chunks.
32
+ * @param {SQL} realColumnSql - The SQL query chunks
33
+ * @returns {StringChunk | undefined} The string chunk containing the alias or undefined
34
+ */
35
+ private findAliasChunk;
36
+ /**
37
+ * Resolves the alias name from the string chunk or column.
38
+ * @param {StringChunk | undefined} stringChunk - The string chunk containing the alias
39
+ * @param {Column | undefined} realColumn - The real column definition
40
+ * @param {boolean} withoutAlias - Whether the column has no alias
41
+ * @returns {string} The resolved alias name
42
+ */
43
+ private resolveAliasName;
44
+ /**
45
+ * Parses a column value based on its SQL type.
46
+ * Handles datetime, date, and time types with appropriate formatting.
47
+ *
48
+ * @param {Column} column - The column definition
49
+ * @param {unknown} value - The raw value to parse
50
+ * @returns {unknown} The parsed value
14
51
  */
15
- createComplexQuerySchema(): ComplexQuerySchemaBuilder<DynamicEntity>;
16
- executeSchemaSQLOnlyOne<T extends object>(query: string, schema: EntitySchema<T>): Promise<T | undefined>;
52
+ private parseColumnValue;
17
53
  /**
18
- * Executes a schema-based SQL query and maps the result to the entity schema.
19
- * @param query - The SQL query to execute.
20
- * @param schema - The entity schema defining the structure.
21
- * @returns A list of mapped entity objects.
54
+ * Executes a Drizzle query and returns a single result.
55
+ * Throws an error if more than one record is returned.
56
+ *
57
+ * @template T - The type of the query builder
58
+ * @param {T} query - The Drizzle query to execute
59
+ * @returns {Promise<Awaited<T> extends Array<any> ? Awaited<T>[number] | undefined : Awaited<T> | undefined>} A single result object or undefined
60
+ * @throws {Error} If more than one record is returned
22
61
  */
23
- executeSchemaSQL<T extends object>(query: string, schema: EntitySchema<T>): Promise<T[]>;
62
+ executeQueryOnlyOne<T extends MySqlSelectDynamic<AnyMySqlSelectQueryBuilder>>(query: T): Promise<Awaited<T> extends Array<any> ? Awaited<T>[number] | undefined : Awaited<T> | undefined>;
24
63
  /**
25
64
  * Executes a raw SQL query and returns the results.
26
- * @param query - The raw SQL query to execute.
27
- * @returns A list of results as objects.
65
+ * Logs the query if logging is enabled.
66
+ *
67
+ * @template T - The type of the result objects
68
+ * @param {string} query - The raw SQL query to execute
69
+ * @param {SqlParameters[]} [params] - Optional SQL parameters
70
+ * @returns {Promise<T[]>} A list of results as objects
28
71
  */
29
- executeRawSQL<T extends object | unknown>(query: string): Promise<T[]>;
72
+ executeRawSQL<T extends object | unknown>(query: string, params?: unknown[]): Promise<T[]>;
30
73
  /**
31
74
  * Executes a raw SQL update query.
32
- * @param query - The raw SQL update query.
33
- * @param params - sql parameters.
34
- * @returns The update response containing affected rows.
75
+ * @param {string} query - The raw SQL update query
76
+ * @param {SqlParameters[]} [params] - Optional SQL parameters
77
+ * @returns {Promise<UpdateQueryResponse>} The update response containing affected rows
35
78
  */
36
- executeRawUpdateSQL(query: string, params?: SqlParameters[]): Promise<UpdateQueryResponse>;
79
+ executeRawUpdateSQL(query: string, params?: unknown[]): Promise<UpdateQueryResponse>;
37
80
  }
38
81
  //# sourceMappingURL=ForgeSQLSelectOperations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ForgeSQLSelectOperations.d.ts","sourceRoot":"","sources":["../../src/core/ForgeSQLSelectOperations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzG,OAAO,EAAC,aAAa,EAAC,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,aAAa,EAA6B,MAAM,6BAA6B,CAAC;AAGtF,qBAAa,wBAAyB,YAAW,iBAAiB;IAC9D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;gBAEjC,OAAO,EAAE,kBAAkB;IAIvC;;;;;OAKG;IACH,wBAAwB,IAAI,yBAAyB,CAAC,aAAa,CAAC;IAIhE,uBAAuB,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAC,SAAS,CAAC;IAW7G;;;;;OAKG;IACG,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MA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AAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CACxF;IAaD;;;;;;;;OAQG;IACG,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAehG;;;;;OAKG;IACG,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAQ3F"}
@@ -0,0 +1,59 @@
1
+ export declare const migrations: import("drizzle-orm/mysql-core/table").MySqlTableWithColumns<{
2
+ name: "__migrations";
3
+ schema: undefined;
4
+ columns: {
5
+ id: import("drizzle-orm/mysql-core/index").MySqlColumn<{
6
+ name: "id";
7
+ tableName: "__migrations";
8
+ dataType: "number";
9
+ columnType: "MySqlInt";
10
+ data: number;
11
+ driverParam: string | number;
12
+ notNull: true;
13
+ hasDefault: true;
14
+ isPrimaryKey: true;
15
+ isAutoincrement: true;
16
+ hasRuntimeDefault: false;
17
+ enumValues: undefined;
18
+ baseColumn: never;
19
+ identity: undefined;
20
+ generated: undefined;
21
+ }, {}, {}>;
22
+ name: import("drizzle-orm/mysql-core/index").MySqlColumn<{
23
+ name: "name";
24
+ tableName: "__migrations";
25
+ dataType: "string";
26
+ columnType: "MySqlVarChar";
27
+ data: string;
28
+ driverParam: string | number;
29
+ notNull: true;
30
+ hasDefault: false;
31
+ isPrimaryKey: false;
32
+ isAutoincrement: false;
33
+ hasRuntimeDefault: false;
34
+ enumValues: [string, ...string[]];
35
+ baseColumn: never;
36
+ identity: undefined;
37
+ generated: undefined;
38
+ }, {}, {}>;
39
+ created_at: import("drizzle-orm/mysql-core/index").MySqlColumn<{
40
+ name: "created_at";
41
+ tableName: "__migrations";
42
+ dataType: "date";
43
+ columnType: "MySqlTimestamp";
44
+ data: Date;
45
+ driverParam: string | number;
46
+ notNull: true;
47
+ hasDefault: true;
48
+ isPrimaryKey: false;
49
+ isAutoincrement: false;
50
+ hasRuntimeDefault: false;
51
+ enumValues: undefined;
52
+ baseColumn: never;
53
+ identity: undefined;
54
+ generated: undefined;
55
+ }, {}, {}>;
56
+ };
57
+ dialect: "mysql";
58
+ }>;
59
+ //# sourceMappingURL=SystemTables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemTables.d.ts","sourceRoot":"","sources":["../../src/core/SystemTables.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIrB,CAAC"}