Updates
This commit is contained in:
parent
e7fafc1bb6
commit
c4e65a34db
@ -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,
|
||||||
|
1
package-shared/types/index.d.ts
vendored
1
package-shared/types/index.d.ts
vendored
@ -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";
|
||||||
|
@ -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";
|
||||||
|
@ -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": {
|
||||||
|
Loading…
Reference in New Issue
Block a user