This commit is contained in:
Benjamin Toby 2024-12-28 13:20:14 +01:00
parent e7fafc1bb6
commit c4e65a34db
4 changed files with 5 additions and 1 deletions

View File

@ -200,7 +200,9 @@ function sqlGenerator({ tableName, genObject }) {
? `${tableName}.${genObject.order.field}`
: genObject.order.field
} ${genObject.order.strategy}`;
if (genObject.limit) queryString += ` LIMIT ${genObject.limit}`;
if (genObject.offset) queryString += ` OFFSET ${genObject.offset}`;
return {
string: queryString,

View File

@ -912,6 +912,7 @@ export type ServerQueryParam = {
selectFields?: string[];
query?: ServerQueryQueryObject;
limit?: number;
offset?: number;
order?: {
field: string;
strategy: "ASC" | "DESC";

View File

@ -1090,6 +1090,7 @@ export type ServerQueryParam = {
selectFields?: string[];
query?: ServerQueryQueryObject;
limit?: number;
offset?: number;
order?: {
field: string;
strategy: "ASC" | "DESC";

View File

@ -1,6 +1,6 @@
{
"name": "@moduletrace/datasquirel",
"version": "3.2.3",
"version": "3.2.4",
"description": "Cloud-based SQL data management tool",
"main": "index.js",
"bin": {