@budibase/server 2.6.8-alpha.1 → 2.6.8-alpha.3
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.
|
@@ -382,7 +382,20 @@ class GoogleSheetsIntegration {
|
|
|
382
382
|
try {
|
|
383
383
|
yield this.connect();
|
|
384
384
|
const sheet = this.client.sheetsByTitle[query.sheet];
|
|
385
|
-
|
|
385
|
+
let rows = [];
|
|
386
|
+
if (query.paginate) {
|
|
387
|
+
const limit = query.paginate.limit || 100;
|
|
388
|
+
let page = typeof query.paginate.page === "number"
|
|
389
|
+
? query.paginate.page
|
|
390
|
+
: parseInt(query.paginate.page || "1");
|
|
391
|
+
rows = yield sheet.getRows({
|
|
392
|
+
limit,
|
|
393
|
+
offset: (page - 1) * limit,
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
rows = yield sheet.getRows();
|
|
398
|
+
}
|
|
386
399
|
const filtered = shared_core_1.dataFilters.runLuceneQuery(rows, query.filters);
|
|
387
400
|
const headerValues = sheet.headerValues;
|
|
388
401
|
let response = [];
|