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}` ? `${tableName}.${genObject.order.field}`
: genObject.order.field : genObject.order.field
} ${genObject.order.strategy}`; } ${genObject.order.strategy}`;
if (genObject.limit) queryString += ` LIMIT ${genObject.limit}`; if (genObject.limit) queryString += ` LIMIT ${genObject.limit}`;
if (genObject.offset) queryString += ` OFFSET ${genObject.offset}`;
return { return {
string: queryString, string: queryString,

View File

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

View File

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

View File

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