forge-sql-orm 2.0.20 → 2.0.21

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.
@@ -267,6 +267,15 @@ function processNullBranches(obj) {
267
267
  }
268
268
  return allNull ? null : result;
269
269
  }
270
+ function formatLimitOffset(limitOrOffset) {
271
+ if (typeof limitOrOffset !== "number" || isNaN(limitOrOffset)) {
272
+ throw new Error("limitOrOffset must be a valid number");
273
+ }
274
+ return sql.raw(`${limitOrOffset}`);
275
+ }
276
+ function nextVal(sequenceName) {
277
+ return sql`SELECT NEXT VALUE FOR ${sequenceName} AS id`;
278
+ }
270
279
  class ForgeSQLCrudOperations {
271
280
  forgeOperations;
272
281
  options;
@@ -1337,6 +1346,7 @@ export {
1337
1346
  forgeSystemTables,
1338
1347
  forgeTimeString,
1339
1348
  forgeTimestampString,
1349
+ formatLimitOffset,
1340
1350
  generateDropTableStatements,
1341
1351
  getHttpResponse,
1342
1352
  getPrimaryKeys,
@@ -1345,6 +1355,7 @@ export {
1345
1355
  mapSelectAllFieldsToAlias,
1346
1356
  mapSelectFieldsWithAlias,
1347
1357
  migrations,
1358
+ nextVal,
1348
1359
  parseDateTime,
1349
1360
  patchDbWithSelectAliased
1350
1361
  };