@iamkirbki/database-handler-core 4.3.1 → 4.4.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 (131) hide show
  1. package/dist/abstract/Controller.d.ts +17 -0
  2. package/dist/abstract/Controller.d.ts.map +1 -0
  3. package/dist/abstract/Controller.js +47 -0
  4. package/dist/abstract/Model.d.ts +33 -19
  5. package/dist/abstract/Model.d.ts.map +1 -1
  6. package/dist/abstract/Model.js +177 -119
  7. package/dist/abstract/SchemaTableBuilder.d.ts +1 -1
  8. package/dist/abstract/SchemaTableBuilder.d.ts.map +1 -1
  9. package/dist/abstract/model/ModelRelation.d.ts +23 -0
  10. package/dist/abstract/model/ModelRelation.d.ts.map +1 -0
  11. package/dist/abstract/model/ModelRelation.js +130 -0
  12. package/dist/base/Query.d.ts +6 -4
  13. package/dist/base/Query.d.ts.map +1 -1
  14. package/dist/base/Query.js +62 -21
  15. package/dist/base/Record.d.ts.map +1 -1
  16. package/dist/base/Record.js +7 -5
  17. package/dist/base/Table.d.ts +5 -4
  18. package/dist/base/Table.d.ts.map +1 -1
  19. package/dist/base/Table.js +56 -31
  20. package/dist/helpers/Errors/AdapterErrors/AdapterNotFoundError.d.ts +4 -0
  21. package/dist/helpers/Errors/AdapterErrors/AdapterNotFoundError.d.ts.map +1 -0
  22. package/dist/helpers/Errors/AdapterErrors/AdapterNotFoundError.js +6 -0
  23. package/dist/helpers/Errors/AdapterErrors/ConnectionFailedError.d.ts +4 -0
  24. package/dist/helpers/Errors/AdapterErrors/ConnectionFailedError.d.ts.map +1 -0
  25. package/dist/helpers/Errors/AdapterErrors/ConnectionFailedError.js +6 -0
  26. package/dist/helpers/Errors/AdapterErrors/NoDefaultAdapterError.d.ts +4 -0
  27. package/dist/helpers/Errors/AdapterErrors/NoDefaultAdapterError.d.ts.map +1 -0
  28. package/dist/helpers/Errors/AdapterErrors/NoDefaultAdapterError.js +6 -0
  29. package/dist/helpers/Errors/ExpressionErrors/InvalidExpressionParametersError.d.ts +4 -0
  30. package/dist/helpers/Errors/ExpressionErrors/InvalidExpressionParametersError.d.ts.map +1 -0
  31. package/dist/helpers/Errors/ExpressionErrors/InvalidExpressionParametersError.js +6 -0
  32. package/dist/helpers/Errors/ExpressionErrors/UnknownExpressionTypeError.d.ts +4 -0
  33. package/dist/helpers/Errors/ExpressionErrors/UnknownExpressionTypeError.d.ts.map +1 -0
  34. package/dist/helpers/Errors/ExpressionErrors/UnknownExpressionTypeError.js +6 -0
  35. package/dist/helpers/Errors/ExpressionErrors/UnsupportedQueryPhaseError.d.ts +4 -0
  36. package/dist/helpers/Errors/ExpressionErrors/UnsupportedQueryPhaseError.d.ts.map +1 -0
  37. package/dist/helpers/Errors/ExpressionErrors/UnsupportedQueryPhaseError.js +6 -0
  38. package/dist/helpers/Errors/QueryErrors/UnexpectedEmptyQueryError.d.ts +4 -0
  39. package/dist/helpers/Errors/QueryErrors/UnexpectedEmptyQueryError.d.ts.map +1 -0
  40. package/dist/helpers/Errors/QueryErrors/UnexpectedEmptyQueryError.js +6 -0
  41. package/dist/helpers/Errors/TableErrors/UnknownTableError.d.ts +4 -0
  42. package/dist/helpers/Errors/TableErrors/UnknownTableError.d.ts.map +1 -0
  43. package/dist/helpers/Errors/TableErrors/UnknownTableError.js +6 -0
  44. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseDeleteQueryBuilder.d.ts +1 -0
  45. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseDeleteQueryBuilder.d.ts.map +1 -0
  46. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseDeleteQueryBuilder.js +1 -0
  47. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseInsertQueryBuilder.d.ts +1 -0
  48. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseInsertQueryBuilder.d.ts.map +1 -0
  49. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseInsertQueryBuilder.js +11 -0
  50. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseSelectQueryBuilder.d.ts +11 -0
  51. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseSelectQueryBuilder.d.ts.map +1 -0
  52. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseSelectQueryBuilder.js +27 -0
  53. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseUpdateQueryBuilder.d.ts +1 -0
  54. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseUpdateQueryBuilder.d.ts.map +1 -0
  55. package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseUpdateQueryBuilder.js +1 -0
  56. package/dist/helpers/QueryBuilders/ExpressionBuilders/JsonAggregateExpression.d.ts +9 -0
  57. package/dist/helpers/QueryBuilders/ExpressionBuilders/JsonAggregateExpression.d.ts.map +1 -0
  58. package/dist/helpers/QueryBuilders/ExpressionBuilders/JsonAggregateExpression.js +102 -0
  59. package/dist/helpers/QueryBuilders/ExpressionBuilders/SpatialDistanceExpression.d.ts +8 -0
  60. package/dist/helpers/QueryBuilders/ExpressionBuilders/SpatialDistanceExpression.d.ts.map +1 -0
  61. package/dist/helpers/QueryBuilders/ExpressionBuilders/SpatialDistanceExpression.js +63 -0
  62. package/dist/helpers/QueryBuilders/ExpressionBuilders/TextRelevanceExpression.d.ts +8 -0
  63. package/dist/helpers/QueryBuilders/ExpressionBuilders/TextRelevanceExpression.d.ts.map +1 -0
  64. package/dist/helpers/QueryBuilders/ExpressionBuilders/TextRelevanceExpression.js +49 -0
  65. package/dist/helpers/QueryBuilders/QueryDecorators/ExpressionDecorator.d.ts +19 -0
  66. package/dist/helpers/QueryBuilders/QueryDecorators/ExpressionDecorator.d.ts.map +1 -0
  67. package/dist/helpers/QueryBuilders/QueryDecorators/ExpressionDecorator.js +60 -0
  68. package/dist/helpers/QueryBuilders/QueryDecorators/GroupByDecorator.d.ts +9 -0
  69. package/dist/helpers/QueryBuilders/QueryDecorators/GroupByDecorator.d.ts.map +1 -0
  70. package/dist/helpers/QueryBuilders/QueryDecorators/GroupByDecorator.js +27 -0
  71. package/dist/helpers/QueryBuilders/QueryDecorators/JoinDecorator.d.ts +15 -0
  72. package/dist/helpers/QueryBuilders/QueryDecorators/JoinDecorator.d.ts.map +1 -0
  73. package/dist/helpers/QueryBuilders/QueryDecorators/JoinDecorator.js +74 -0
  74. package/dist/helpers/QueryBuilders/QueryDecorators/LimitDecorator.d.ts +10 -0
  75. package/dist/helpers/QueryBuilders/QueryDecorators/LimitDecorator.d.ts.map +1 -0
  76. package/dist/helpers/QueryBuilders/QueryDecorators/LimitDecorator.js +29 -0
  77. package/dist/helpers/QueryBuilders/QueryDecorators/OrderByDecorator.d.ts +9 -0
  78. package/dist/helpers/QueryBuilders/QueryDecorators/OrderByDecorator.d.ts.map +1 -0
  79. package/dist/helpers/QueryBuilders/QueryDecorators/OrderByDecorator.js +27 -0
  80. package/dist/helpers/QueryBuilders/QueryDecorators/QueryDecorator.d.ts +8 -0
  81. package/dist/helpers/QueryBuilders/QueryDecorators/QueryDecorator.d.ts.map +1 -0
  82. package/dist/helpers/QueryBuilders/QueryDecorators/QueryDecorator.js +5 -0
  83. package/dist/helpers/QueryBuilders/QueryDecorators/ValuesDecorator.d.ts +1 -0
  84. package/dist/helpers/QueryBuilders/QueryDecorators/ValuesDecorator.d.ts.map +1 -0
  85. package/dist/helpers/QueryBuilders/QueryDecorators/ValuesDecorator.js +17 -0
  86. package/dist/helpers/QueryBuilders/QueryDecorators/WhereDecorator.d.ts +9 -0
  87. package/dist/helpers/QueryBuilders/QueryDecorators/WhereDecorator.d.ts.map +1 -0
  88. package/dist/helpers/QueryBuilders/QueryDecorators/WhereDecorator.js +29 -0
  89. package/dist/helpers/QueryBuilders/QueryExpressionBuilder.d.ts +54 -0
  90. package/dist/helpers/QueryBuilders/QueryExpressionBuilder.d.ts.map +1 -0
  91. package/dist/helpers/QueryBuilders/QueryExpressionBuilder.js +102 -0
  92. package/dist/helpers/QueryBuilders/QueryStatementBuilder.d.ts +16 -0
  93. package/dist/helpers/QueryBuilders/QueryStatementBuilder.d.ts.map +1 -0
  94. package/dist/helpers/QueryBuilders/QueryStatementBuilder.js +169 -0
  95. package/dist/helpers/QueryBuilders/SqlRenderer.d.ts +15 -0
  96. package/dist/helpers/QueryBuilders/SqlRenderer.d.ts.map +1 -0
  97. package/dist/helpers/QueryBuilders/SqlRenderer.js +79 -0
  98. package/dist/helpers/QueryBuilders/oldQueryStatementBuilder.d.ts +160 -0
  99. package/dist/helpers/QueryBuilders/oldQueryStatementBuilder.d.ts.map +1 -0
  100. package/dist/helpers/QueryBuilders/oldQueryStatementBuilder.js +217 -0
  101. package/dist/interfaces/IExpressionBuilder.d.ts +7 -0
  102. package/dist/interfaces/IExpressionBuilder.d.ts.map +1 -0
  103. package/dist/interfaces/IExpressionBuilder.js +1 -0
  104. package/dist/interfaces/IQueryBuilder.d.ts +5 -0
  105. package/dist/interfaces/IQueryBuilder.d.ts.map +1 -0
  106. package/dist/interfaces/IQueryBuilder.js +1 -0
  107. package/dist/runtime/Container.d.ts +1 -0
  108. package/dist/runtime/Container.d.ts.map +1 -1
  109. package/dist/runtime/Container.js +5 -2
  110. package/dist/runtime/QueryCache.d.ts +12 -0
  111. package/dist/runtime/QueryCache.d.ts.map +1 -0
  112. package/dist/runtime/QueryCache.js +26 -0
  113. package/dist/runtime/Repository.d.ts +6 -4
  114. package/dist/runtime/Repository.d.ts.map +1 -1
  115. package/dist/runtime/Repository.js +95 -60
  116. package/dist/types/expressions.d.ts +154 -0
  117. package/dist/types/expressions.d.ts.map +1 -0
  118. package/dist/types/expressions.js +6 -0
  119. package/dist/types/factories.d.ts +3 -2
  120. package/dist/types/factories.d.ts.map +1 -1
  121. package/dist/types/index.d.ts +1 -0
  122. package/dist/types/index.d.ts.map +1 -1
  123. package/dist/types/index.js +1 -0
  124. package/dist/types/model.d.ts +8 -8
  125. package/dist/types/model.d.ts.map +1 -1
  126. package/dist/types/query.d.ts +56 -2
  127. package/dist/types/query.d.ts.map +1 -1
  128. package/package.json +11 -3
  129. package/dist/helpers/QueryStatementBuilder.d.ts +0 -305
  130. package/dist/helpers/QueryStatementBuilder.d.ts.map +0 -1
  131. package/dist/helpers/QueryStatementBuilder.js +0 -416
@@ -1,305 +0,0 @@
1
- import { Query } from "../index.js";
2
- import { DefaultQueryParameters, ExtraQueryParameters, QueryWhereCondition, Join, QueryIsEqualParameter } from "../types/index.js";
3
- /** Utility class for building SQL query strings */
4
- export default class QueryStatementBuilder {
5
- /**
6
- * Build a SELECT SQL statement with optional filtering, ordering, and pagination
7
- *
8
- * @param table - The table to select from
9
- * @param options - Query options including select columns, where conditions, orderBy, limit, offset
10
- * @returns Complete SELECT SQL statement string
11
- *
12
- * @example
13
- * ```typescript
14
- * // Select all columns
15
- * const query = QueryStatementBuilder.BuildSelect(usersTable);
16
- * // "SELECT * FROM users"
17
- *
18
- * // Select specific columns with filtering
19
- * const query = QueryStatementBuilder.BuildSelect(usersTable, {
20
- * select: 'id, name, email',
21
- * where: { status: 'active', age: 25 },
22
- * orderBy: 'created_at DESC',
23
- * limit: 10,
24
- * offset: 20
25
- * });
26
- * // "SELECT id, name, email FROM users WHERE status = @status AND age = @age ORDER BY created_at DESC LIMIT 10 OFFSET 20"
27
- * ```
28
- */
29
- static BuildSelect(tableName: string, options?: DefaultQueryParameters & ExtraQueryParameters): string;
30
- /**
31
- * Build an INSERT SQL statement with named parameter placeholders
32
- *
33
- * @param table - The table to insert into
34
- * @param record - Object containing column names and their placeholder values
35
- * @returns Complete INSERT SQL statement string with @fieldName placeholders
36
- *
37
- * @example
38
- * ```typescript
39
- * const query = QueryStatementBuilder.BuildInsert(usersTable, {
40
- * name: 'John',
41
- * email: 'john@example.com',
42
- * age: 30
43
- * });
44
- * // "INSERT INTO users (name, email, age) VALUES (@name, @email, @age)"
45
- *
46
- * // Note: The actual values will be bound separately using the Parameters object
47
- * ```
48
- */
49
- static BuildInsert(tableName: string, record: QueryIsEqualParameter): string;
50
- /**
51
- * Build an UPDATE SQL statement with SET clause and WHERE conditions
52
- *
53
- * @param table - The table to update
54
- * @param record - Object containing columns to update with their placeholder values
55
- * @param where - Object containing WHERE conditions for targeting specific rows
56
- * @returns Complete UPDATE SQL statement string with @fieldName placeholders
57
- *
58
- * @example
59
- * ```typescript
60
- * const query = QueryStatementBuilder.BuildUpdate(
61
- * usersTable,
62
- * { name: 'John Doe', age: 31 },
63
- * { id: 1 }
64
- * );
65
- * // "UPDATE users SET name = @name, age = @age WHERE id = @id"
66
- *
67
- * // Multiple WHERE conditions
68
- * const query = QueryStatementBuilder.BuildUpdate(
69
- * usersTable,
70
- * { status: 'inactive' },
71
- * { status: 'active', last_login: '2023-01-01' }
72
- * );
73
- * // "UPDATE users SET status = @status WHERE status = @status AND last_login = @last_login"
74
- * ```
75
- */
76
- static BuildUpdate(tableName: string, record: QueryWhereCondition, where: QueryWhereCondition): string;
77
- /**
78
- * Build a DELETE SQL statement with WHERE conditions
79
- *
80
- * @param table - The table to delete from
81
- * @param where - Object containing WHERE conditions for targeting specific rows to delete
82
- * @returns Complete DELETE SQL statement string with @fieldName placeholders
83
- *
84
- * @example
85
- * ```typescript
86
- * const query = QueryStatementBuilder.BuildDelete(usersTable, { id: 1 });
87
- * // "DELETE FROM users WHERE id = @id"
88
- *
89
- * // Multiple WHERE conditions
90
- * const query = QueryStatementBuilder.BuildDelete(usersTable, {
91
- * status: 'deleted',
92
- * last_login: '2020-01-01'
93
- * });
94
- * // "DELETE FROM users WHERE status = @status AND last_login = @last_login"
95
- * ```
96
- */
97
- static BuildDelete(tableName: string, where: QueryWhereCondition): string;
98
- /**
99
- * Build a COUNT SQL statement to count rows, optionally with WHERE conditions
100
- *
101
- * @param table - The table to count rows from
102
- * @param where - Optional object containing WHERE conditions to filter counted rows
103
- * @returns Complete COUNT SQL statement string with @fieldName placeholders
104
- *
105
- * @example
106
- * ```typescript
107
- * // Count all rows
108
- * const query = QueryStatementBuilder.BuildCount(usersTable);
109
- * // "SELECT COUNT(*) as count FROM users"
110
- *
111
- * // Count with conditions
112
- * const query = QueryStatementBuilder.BuildCount(usersTable, {
113
- * status: 'active',
114
- * age: 25
115
- * });
116
- * // "SELECT COUNT(*) as count FROM users WHERE status = @status AND age = @age"
117
- * ```
118
- */
119
- static BuildCount(tableName: string, where?: QueryWhereCondition): string;
120
- /**
121
- * Build a WHERE clause from parameter conditions (helper method)
122
- *
123
- * Joins multiple conditions with AND operator.
124
- * Returns empty string if no conditions are provided.
125
- *
126
- * @param where - Optional object containing WHERE conditions
127
- * @returns WHERE clause string with @fieldName placeholders, or empty string if no conditions
128
- *
129
- * @example
130
- * ```typescript
131
- * // Single condition
132
- * const whereClause = QueryStatementBuilder.BuildWhere({ id: 1 });
133
- * // "WHERE id = @id"
134
- *
135
- * // Multiple conditions (joined with AND)
136
- * const whereClause = QueryStatementBuilder.BuildWhere({
137
- * status: 'active',
138
- * age: 25,
139
- * role: 'admin'
140
- * });
141
- * // "WHERE status = @status AND age = @age AND role = @role"
142
- *
143
- * // No conditions
144
- * const whereClause = QueryStatementBuilder.BuildWhere();
145
- * // ""
146
- * ```
147
- */
148
- static BuildWhere(where?: QueryWhereCondition): string;
149
- private static buildWhereWithOperators;
150
- private static buildWhereSimple;
151
- /**
152
- * Build a SELECT statement with JOIN operations (INNER, LEFT, RIGHT, FULL)
153
- *
154
- * Supports single or multiple joins, including nested joins.
155
- * Combines the base SELECT with JOIN clauses and query options.
156
- * The join type (INNER, LEFT, RIGHT, FULL) is specified in each Join object.
157
- *
158
- * @param fromTable - The primary table to select from
159
- * @param joins - Single Join object or array of Join objects defining the join operations
160
- * @param options - Query options including select columns, orderBy, limit, offset
161
- * @returns Complete SELECT statement with JOIN clauses
162
- *
163
- * @example
164
- * ```typescript
165
- * // Single INNER JOIN
166
- * const query = QueryStatementBuilder.BuildJoin(
167
- * usersTable,
168
- * { fromTable: ordersTable, joinType: 'INNER', on: { user_id: 'id' } },
169
- * { select: 'users.*, orders.total' }
170
- * );
171
- * // "SELECT users.*, orders.total FROM users INNER JOIN orders ON users.id = orders.user_id"
172
- *
173
- * // Multiple joins with different types
174
- * const query = QueryStatementBuilder.BuildJoin(
175
- * usersTable,
176
- * [
177
- * { fromTable: ordersTable, joinType: 'INNER', on: { user_id: 'id' } },
178
- * { fromTable: addressesTable, joinType: 'LEFT', on: { address_id: 'id' } }
179
- * ],
180
- * { orderBy: 'users.created_at DESC', limit: 10 }
181
- * );
182
- *
183
- * // Nested JOIN
184
- * const query = QueryStatementBuilder.BuildJoin(
185
- * usersTable,
186
- * {
187
- * fromTable: ordersTable,
188
- * joinType: 'INNER',
189
- * on: { user_id: 'id' },
190
- * join: { fromTable: productsTable, joinType: 'INNER', on: { product_id: 'id' } }
191
- * }
192
- * );
193
- * ```
194
- */
195
- static BuildJoin(fromTableName: string, joins: Join | Join[], query: Query, options?: DefaultQueryParameters & ExtraQueryParameters): Promise<string>;
196
- static BuildJoinSelect(fromTableName: string, joins: Join | Join[], query: Query): Promise<string>;
197
- /**
198
- * Build JOIN clause(s) recursively (helper method)
199
- *
200
- * Processes single or multiple join definitions and handles nested joins.
201
- * Each join includes the JOIN clause (INNER, LEFT, RIGHT, FULL) and ON conditions.
202
- *
203
- * @param fromTable - The table being joined from (for ON clause context)
204
- * @param joins - Single Join object or array of Join objects
205
- * @returns JOIN clause(s) as a string
206
- *
207
- * @example
208
- * ```typescript
209
- * // Single INNER JOIN
210
- * const joinClause = QueryStatementBuilder.BuildJoinPart(
211
- * usersTable,
212
- * { fromTable: ordersTable, joinType: 'INNER', on: { user_id: 'id' } }
213
- * );
214
- * // "INNER JOIN orders ON users.id = orders.user_id"
215
- *
216
- * // LEFT JOIN
217
- * const joinClause = QueryStatementBuilder.BuildJoinPart(
218
- * usersTable,
219
- * { fromTable: profilesTable, joinType: 'LEFT', on: { profile_id: 'id' } }
220
- * );
221
- * // "LEFT JOIN profiles ON users.id = profiles.profile_id"
222
- *
223
- * // Nested join
224
- * const joinClause = QueryStatementBuilder.BuildJoinPart(
225
- * usersTable,
226
- * {
227
- * fromTable: ordersTable,
228
- * joinType: 'INNER',
229
- * on: { user_id: 'id' },
230
- * join: { fromTable: productsTable, joinType: 'INNER', on: { product_id: 'id' } }
231
- * }
232
- * );
233
- * // "INNER JOIN orders ON users.id = orders.user_id INNER JOIN products ON orders.id = products.product_id"
234
- * ```
235
- */
236
- static BuildJoinPart(fromTableName: string, joins: Join | Join[]): string;
237
- /**
238
- * Build ON clause for JOIN operations (helper method)
239
- *
240
- * Creates ON conditions for join operations.
241
- * Compares the foreign key column in the joined table with the primary key in the source table.
242
- * Multiple conditions are joined with AND operator.
243
- *
244
- * @param table - The source table (left side of the join)
245
- * @param joinTable - The table being joined (right side of the join)
246
- * @param on - QueryCondition object where key is the foreign key in joinTable and value is the primary key in table
247
- * @returns ON clause string for JOIN operations
248
- *
249
- * @example
250
- * ```typescript
251
- * // Single ON condition
252
- * // Key: column in joinTable (orders), Value: column in table (users)
253
- * const onClause = QueryStatementBuilder.BuildJoinOnPart(
254
- * usersTable,
255
- * ordersTable,
256
- * { user_id: 'id' }
257
- * );
258
- * // "ON users.id = orders.user_id"
259
- *
260
- * // Multiple ON conditions
261
- * const onClause = QueryStatementBuilder.BuildJoinOnPart(
262
- * usersTable,
263
- * ordersTable,
264
- * [{ user_id: 'id' }, { company_id: 'company_id' }]
265
- * );
266
- * // "ON users.id = orders.user_id AND users.company_id = orders.company_id"
267
- * ```
268
- */
269
- static BuildJoinOnPart(tableName: string, joinTableName: string, on: QueryIsEqualParameter | QueryIsEqualParameter[]): string;
270
- /**
271
- * Build query options clause (ORDER BY, LIMIT, OFFSET) (helper method)
272
- *
273
- * Processes query options and builds the corresponding SQL clauses.
274
- * Returns empty string if no options are provided.
275
- *
276
- * @param options - Object containing orderBy, limit, and/or offset options
277
- * @returns Query options clause as a string
278
- *
279
- * @example
280
- * ```typescript
281
- * // All options
282
- * const optionsClause = QueryStatementBuilder.BuildQueryOptions({
283
- * orderBy: 'created_at DESC',
284
- * limit: 10,
285
- * offset: 20
286
- * });
287
- * // "ORDER BY created_at DESC LIMIT 10 OFFSET 20"
288
- *
289
- * // Just ordering
290
- * const optionsClause = QueryStatementBuilder.BuildQueryOptions({
291
- * orderBy: 'name ASC'
292
- * });
293
- * // "ORDER BY name ASC"
294
- *
295
- * // Pagination only
296
- * const optionsClause = QueryStatementBuilder.BuildQueryOptions({
297
- * limit: 25,
298
- * offset: 50
299
- * });
300
- * // "LIMIT 25 OFFSET 50"
301
- * ```
302
- */
303
- static BuildQueryOptions(options: ExtraQueryParameters): string;
304
- }
305
- //# sourceMappingURL=QueryStatementBuilder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryStatementBuilder.d.ts","sourceRoot":"","sources":["../../src/helpers/QueryStatementBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,IAAI,EAA6B,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAEjK,mDAAmD;AACnD,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACtC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;WACW,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,oBAAoB,GAAG,MAAM;IAW7G;;;;;;;;;;;;;;;;;;OAkBG;WACW,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,MAAM;IAYnF;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;WACW,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,GAAG,MAAM;IAW7G;;;;;;;;;;;;;;;;;;;OAmBG;WACW,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAG,MAAM;IAShF;;;;;;;;;;;;;;;;;;;;OAoBG;WACW,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,MAAM;IAQhF;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACW,UAAU,CAAC,KAAK,CAAC,EAAE,mBAAmB,GAAG,MAAM;IAgB7D,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAStC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAK/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;WACiB,SAAS,CACzB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,sBAAsB,GAAG,oBAAoB,GACxD,OAAO,CAAC,MAAM,CAAC;WAaE,eAAe,CAC/B,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,EACpB,KAAK,EAAE,KAAK,GACb,OAAO,CAAC,MAAM,CAAC;IAmBlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;WACW,aAAa,CACvB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,GACrB,MAAM;IAaT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;WACW,eAAe,CACzB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,EAAE,EAAE,qBAAqB,GAAG,qBAAqB,EAAE,GACpD,MAAM;IAWT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;WACW,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM;CAiBzE"}