@budibase/server 2.6.8-alpha.2 → 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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.6.8-alpha.
|
|
4
|
+
"version": "2.6.8-alpha.3",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"license": "GPL-3.0",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
48
|
-
"@budibase/backend-core": "2.6.8-alpha.
|
|
49
|
-
"@budibase/client": "2.6.8-alpha.
|
|
50
|
-
"@budibase/pro": "2.6.8-alpha.
|
|
51
|
-
"@budibase/shared-core": "2.6.8-alpha.
|
|
52
|
-
"@budibase/string-templates": "2.6.8-alpha.
|
|
53
|
-
"@budibase/types": "2.6.8-alpha.
|
|
48
|
+
"@budibase/backend-core": "2.6.8-alpha.3",
|
|
49
|
+
"@budibase/client": "2.6.8-alpha.3",
|
|
50
|
+
"@budibase/pro": "2.6.8-alpha.3",
|
|
51
|
+
"@budibase/shared-core": "2.6.8-alpha.3",
|
|
52
|
+
"@budibase/string-templates": "2.6.8-alpha.3",
|
|
53
|
+
"@budibase/types": "2.6.8-alpha.3",
|
|
54
54
|
"@bull-board/api": "3.7.0",
|
|
55
55
|
"@bull-board/koa": "3.9.4",
|
|
56
56
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -176,5 +176,5 @@
|
|
|
176
176
|
"optionalDependencies": {
|
|
177
177
|
"oracledb": "5.3.0"
|
|
178
178
|
},
|
|
179
|
-
"gitHead": "
|
|
179
|
+
"gitHead": "d3b449898b08d94ed9e286d1670292846f5c80d1"
|
|
180
180
|
}
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "@budibase/types"
|
|
16
16
|
import { OAuth2Client } from "google-auth-library"
|
|
17
17
|
import { buildExternalTableId, finaliseExternalTables } from "./utils"
|
|
18
|
-
import { GoogleSpreadsheet } from "google-spreadsheet"
|
|
18
|
+
import { GoogleSpreadsheet, GoogleSpreadsheetRow } from "google-spreadsheet"
|
|
19
19
|
import fetch from "node-fetch"
|
|
20
20
|
import { configs, HTTPError } from "@budibase/backend-core"
|
|
21
21
|
import { dataFilters } from "@budibase/shared-core"
|
|
@@ -434,7 +434,20 @@ class GoogleSheetsIntegration implements DatasourcePlus {
|
|
|
434
434
|
try {
|
|
435
435
|
await this.connect()
|
|
436
436
|
const sheet = this.client.sheetsByTitle[query.sheet]
|
|
437
|
-
|
|
437
|
+
let rows: GoogleSpreadsheetRow[] = []
|
|
438
|
+
if (query.paginate) {
|
|
439
|
+
const limit = query.paginate.limit || 100
|
|
440
|
+
let page: number =
|
|
441
|
+
typeof query.paginate.page === "number"
|
|
442
|
+
? query.paginate.page
|
|
443
|
+
: parseInt(query.paginate.page || "1")
|
|
444
|
+
rows = await sheet.getRows({
|
|
445
|
+
limit,
|
|
446
|
+
offset: (page - 1) * limit,
|
|
447
|
+
})
|
|
448
|
+
} else {
|
|
449
|
+
rows = await sheet.getRows()
|
|
450
|
+
}
|
|
438
451
|
const filtered = dataFilters.runLuceneQuery(rows, query.filters)
|
|
439
452
|
const headerValues = sheet.headerValues
|
|
440
453
|
let response = []
|