@budibase/server 1.0.49-alpha.8 → 1.0.50
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/builder/assets/{index.83c0944f.css → index.c0cc369d.css} +6 -1
- package/builder/assets/{index.94a9250f.js → index.ee035348.js} +190 -190
- package/builder/assets/{vendor.d526bfe8.js → vendor.5ad9695a.js} +202 -106
- package/builder/index.html +3 -3
- package/coverage/clover.xml +140 -144
- package/coverage/coverage-final.json +3 -3
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +4 -4
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +14 -14
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +41 -35
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/application.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/row.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/static.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/automations/utils.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/client.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +22 -22
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/authorized.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +14 -14
- package/coverage/lcov-report/threads/index.js.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +10 -31
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +225 -231
- package/dist/api/controllers/row/ExternalRequest.js +14 -4
- package/dist/api/controllers/static/index.js +4 -7
- package/dist/api/controllers/user.js +27 -25
- package/dist/integrations/base/sql.js +49 -15
- package/dist/package.json +4 -4
- package/dist/threads/query.js +2 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/scripts/integrations/mssql/data/Dockerfile +1 -1
- package/scripts/integrations/mssql/data/setup.sql +17 -4
- package/scripts/integrations/postgres/init.sql +11 -6
- package/src/api/controllers/row/ExternalRequest.ts +14 -1
- package/src/api/controllers/static/index.js +4 -6
- package/src/api/controllers/user.js +29 -27
- package/src/integrations/base/sql.ts +61 -22
- package/src/threads/query.js +2 -9
package/coverage/lcov.info
CHANGED
|
@@ -825,15 +825,15 @@ DA:13,1
|
|
|
825
825
|
DA:19,1
|
|
826
826
|
DA:20,1
|
|
827
827
|
DA:21,1
|
|
828
|
-
DA:22,
|
|
828
|
+
DA:22,51
|
|
829
829
|
DA:23,1
|
|
830
|
-
DA:25,
|
|
831
|
-
DA:26,
|
|
830
|
+
DA:25,50
|
|
831
|
+
DA:26,50
|
|
832
832
|
DA:33,1
|
|
833
833
|
LF:17
|
|
834
834
|
LH:17
|
|
835
835
|
BRDA:22,0,0,1
|
|
836
|
-
BRDA:22,0,1,
|
|
836
|
+
BRDA:22,0,1,50
|
|
837
837
|
BRF:2
|
|
838
838
|
BRH:2
|
|
839
839
|
end_of_record
|
|
@@ -1741,15 +1741,16 @@ FN:58,(anonymous_4)
|
|
|
1741
1741
|
FN:72,(anonymous_5)
|
|
1742
1742
|
FN:98,(anonymous_6)
|
|
1743
1743
|
FN:99,(anonymous_7)
|
|
1744
|
-
FN:
|
|
1745
|
-
FN:
|
|
1746
|
-
FN:
|
|
1747
|
-
FN:
|
|
1748
|
-
FN:
|
|
1749
|
-
FN:
|
|
1750
|
-
FN:
|
|
1751
|
-
FN:
|
|
1752
|
-
|
|
1744
|
+
FN:108,(anonymous_8)
|
|
1745
|
+
FN:145,(anonymous_9)
|
|
1746
|
+
FN:152,(anonymous_10)
|
|
1747
|
+
FN:165,(anonymous_11)
|
|
1748
|
+
FN:175,(anonymous_12)
|
|
1749
|
+
FN:187,(anonymous_13)
|
|
1750
|
+
FN:200,(anonymous_14)
|
|
1751
|
+
FN:204,(anonymous_15)
|
|
1752
|
+
FN:223,(anonymous_16)
|
|
1753
|
+
FNF:17
|
|
1753
1754
|
FNH:5
|
|
1754
1755
|
FNDA:2,rawMetadata
|
|
1755
1756
|
FNDA:0,(anonymous_1)
|
|
@@ -1759,14 +1760,15 @@ FNDA:0,(anonymous_4)
|
|
|
1759
1760
|
FNDA:0,(anonymous_5)
|
|
1760
1761
|
FNDA:0,(anonymous_6)
|
|
1761
1762
|
FNDA:0,(anonymous_7)
|
|
1762
|
-
FNDA:
|
|
1763
|
-
FNDA:
|
|
1763
|
+
FNDA:0,(anonymous_8)
|
|
1764
|
+
FNDA:2,(anonymous_9)
|
|
1764
1765
|
FNDA:0,(anonymous_10)
|
|
1765
|
-
FNDA:
|
|
1766
|
+
FNDA:0,(anonymous_11)
|
|
1766
1767
|
FNDA:1,(anonymous_12)
|
|
1767
1768
|
FNDA:1,(anonymous_13)
|
|
1768
|
-
FNDA:
|
|
1769
|
+
FNDA:1,(anonymous_14)
|
|
1769
1770
|
FNDA:0,(anonymous_15)
|
|
1771
|
+
FNDA:0,(anonymous_16)
|
|
1770
1772
|
DA:5,39
|
|
1771
1773
|
DA:6,39
|
|
1772
1774
|
DA:7,39
|
|
@@ -1826,67 +1828,68 @@ DA:105,0
|
|
|
1826
1828
|
DA:106,0
|
|
1827
1829
|
DA:108,0
|
|
1828
1830
|
DA:109,0
|
|
1829
|
-
DA:
|
|
1831
|
+
DA:110,0
|
|
1830
1832
|
DA:112,0
|
|
1831
|
-
DA:
|
|
1833
|
+
DA:113,0
|
|
1832
1834
|
DA:115,0
|
|
1833
|
-
DA:
|
|
1834
|
-
DA:
|
|
1835
|
+
DA:116,0
|
|
1836
|
+
DA:118,0
|
|
1835
1837
|
DA:123,0
|
|
1836
|
-
DA:
|
|
1837
|
-
DA:
|
|
1838
|
+
DA:124,0
|
|
1839
|
+
DA:126,0
|
|
1838
1840
|
DA:134,0
|
|
1839
|
-
DA:
|
|
1840
|
-
DA:
|
|
1841
|
-
DA:
|
|
1842
|
-
DA:145,2
|
|
1841
|
+
DA:135,0
|
|
1842
|
+
DA:140,0
|
|
1843
|
+
DA:145,39
|
|
1843
1844
|
DA:146,2
|
|
1844
1845
|
DA:147,2
|
|
1845
1846
|
DA:148,2
|
|
1846
|
-
DA:
|
|
1847
|
+
DA:149,2
|
|
1848
|
+
DA:150,2
|
|
1847
1849
|
DA:152,7
|
|
1848
|
-
DA:
|
|
1849
|
-
DA:
|
|
1850
|
-
DA:165,
|
|
1850
|
+
DA:154,7
|
|
1851
|
+
DA:162,2
|
|
1852
|
+
DA:165,39
|
|
1851
1853
|
DA:167,0
|
|
1852
1854
|
DA:169,0
|
|
1853
|
-
DA:
|
|
1854
|
-
DA:
|
|
1855
|
-
DA:
|
|
1856
|
-
DA:
|
|
1855
|
+
DA:171,0
|
|
1856
|
+
DA:172,0
|
|
1857
|
+
DA:175,39
|
|
1858
|
+
DA:176,1
|
|
1857
1859
|
DA:177,1
|
|
1858
|
-
DA:
|
|
1859
|
-
DA:
|
|
1860
|
-
DA:
|
|
1861
|
-
DA:
|
|
1862
|
-
DA:187,1
|
|
1860
|
+
DA:179,1
|
|
1861
|
+
DA:180,1
|
|
1862
|
+
DA:184,1
|
|
1863
|
+
DA:187,39
|
|
1863
1864
|
DA:188,1
|
|
1864
|
-
DA:189,
|
|
1865
|
-
DA:
|
|
1866
|
-
DA:
|
|
1867
|
-
DA:
|
|
1868
|
-
DA:
|
|
1869
|
-
DA:
|
|
1870
|
-
DA:204,
|
|
1865
|
+
DA:189,1
|
|
1866
|
+
DA:190,1
|
|
1867
|
+
DA:191,0
|
|
1868
|
+
DA:195,1
|
|
1869
|
+
DA:200,39
|
|
1870
|
+
DA:201,1
|
|
1871
|
+
DA:204,39
|
|
1871
1872
|
DA:205,0
|
|
1872
1873
|
DA:206,0
|
|
1874
|
+
DA:207,0
|
|
1873
1875
|
DA:208,0
|
|
1874
|
-
DA:
|
|
1876
|
+
DA:210,0
|
|
1875
1877
|
DA:211,0
|
|
1876
|
-
DA:
|
|
1878
|
+
DA:213,0
|
|
1877
1879
|
DA:214,0
|
|
1878
1880
|
DA:216,0
|
|
1879
|
-
DA:217,0
|
|
1880
1881
|
DA:218,0
|
|
1881
|
-
DA:
|
|
1882
|
-
DA:
|
|
1883
|
-
DA:223,
|
|
1882
|
+
DA:219,0
|
|
1883
|
+
DA:220,0
|
|
1884
|
+
DA:223,39
|
|
1884
1885
|
DA:224,0
|
|
1886
|
+
DA:225,0
|
|
1885
1887
|
DA:226,0
|
|
1886
|
-
DA:
|
|
1888
|
+
DA:228,0
|
|
1887
1889
|
DA:229,0
|
|
1888
1890
|
DA:231,0
|
|
1889
|
-
|
|
1891
|
+
DA:233,0
|
|
1892
|
+
LF:120
|
|
1890
1893
|
LH:38
|
|
1891
1894
|
BRDA:32,0,0,0
|
|
1892
1895
|
BRDA:32,0,1,0
|
|
@@ -1913,18 +1916,18 @@ BRDA:94,10,1,0
|
|
|
1913
1916
|
BRDA:94,10,2,0
|
|
1914
1917
|
BRDA:105,11,0,0
|
|
1915
1918
|
BRDA:105,11,1,0
|
|
1916
|
-
BRDA:
|
|
1917
|
-
BRDA:
|
|
1918
|
-
BRDA:
|
|
1919
|
-
BRDA:
|
|
1920
|
-
BRDA:
|
|
1921
|
-
BRDA:
|
|
1922
|
-
BRDA:
|
|
1923
|
-
BRDA:
|
|
1924
|
-
BRDA:
|
|
1925
|
-
BRDA:
|
|
1926
|
-
BRDA:
|
|
1927
|
-
BRDA:
|
|
1919
|
+
BRDA:115,12,0,0
|
|
1920
|
+
BRDA:115,12,1,0
|
|
1921
|
+
BRDA:123,13,0,0
|
|
1922
|
+
BRDA:123,13,1,0
|
|
1923
|
+
BRDA:126,14,0,0
|
|
1924
|
+
BRDA:126,14,1,0
|
|
1925
|
+
BRDA:134,15,0,0
|
|
1926
|
+
BRDA:134,15,1,0
|
|
1927
|
+
BRDA:207,16,0,0
|
|
1928
|
+
BRDA:207,16,1,0
|
|
1929
|
+
BRDA:218,17,0,0
|
|
1930
|
+
BRDA:218,17,1,0
|
|
1928
1931
|
BRF:37
|
|
1929
1932
|
BRH:0
|
|
1930
1933
|
end_of_record
|
|
@@ -8200,20 +8203,20 @@ BRH:10
|
|
|
8200
8203
|
end_of_record
|
|
8201
8204
|
TN:
|
|
8202
8205
|
SF:src/threads/query.js
|
|
8203
|
-
FN:
|
|
8204
|
-
FN:
|
|
8205
|
-
FN:
|
|
8206
|
-
FN:
|
|
8207
|
-
FN:
|
|
8208
|
-
FN:
|
|
8209
|
-
FN:
|
|
8210
|
-
FN:
|
|
8211
|
-
FN:
|
|
8212
|
-
FN:
|
|
8213
|
-
FN:
|
|
8214
|
-
FN:
|
|
8215
|
-
FN:
|
|
8216
|
-
FN:
|
|
8206
|
+
FN:9,(anonymous_0)
|
|
8207
|
+
FN:26,(anonymous_1)
|
|
8208
|
+
FN:88,(anonymous_2)
|
|
8209
|
+
FN:89,(anonymous_3)
|
|
8210
|
+
FN:102,(anonymous_4)
|
|
8211
|
+
FN:118,(anonymous_5)
|
|
8212
|
+
FN:136,(anonymous_6)
|
|
8213
|
+
FN:151,(anonymous_7)
|
|
8214
|
+
FN:160,(anonymous_8)
|
|
8215
|
+
FN:175,(anonymous_9)
|
|
8216
|
+
FN:216,(anonymous_10)
|
|
8217
|
+
FN:217,(anonymous_11)
|
|
8218
|
+
FN:220,(anonymous_12)
|
|
8219
|
+
FN:223,(anonymous_13)
|
|
8217
8220
|
FNF:14
|
|
8218
8221
|
FNH:13
|
|
8219
8222
|
FNDA:15,(anonymous_0)
|
|
@@ -8236,178 +8239,169 @@ DA:3,2
|
|
|
8236
8239
|
DA:4,2
|
|
8237
8240
|
DA:5,2
|
|
8238
8241
|
DA:6,2
|
|
8239
|
-
DA:
|
|
8240
|
-
DA:
|
|
8242
|
+
DA:10,15
|
|
8243
|
+
DA:11,15
|
|
8244
|
+
DA:12,15
|
|
8241
8245
|
DA:13,15
|
|
8242
8246
|
DA:14,15
|
|
8243
8247
|
DA:15,15
|
|
8244
8248
|
DA:16,15
|
|
8245
8249
|
DA:17,15
|
|
8246
8250
|
DA:18,15
|
|
8247
|
-
DA:
|
|
8248
|
-
DA:
|
|
8249
|
-
DA:
|
|
8250
|
-
DA:
|
|
8251
|
-
DA:26,15
|
|
8251
|
+
DA:22,15
|
|
8252
|
+
DA:23,15
|
|
8253
|
+
DA:27,16
|
|
8254
|
+
DA:29,16
|
|
8252
8255
|
DA:30,16
|
|
8253
|
-
DA:32,16
|
|
8254
8256
|
DA:33,16
|
|
8255
|
-
DA:
|
|
8256
|
-
DA:37,
|
|
8257
|
-
DA:
|
|
8258
|
-
DA:
|
|
8259
|
-
DA:
|
|
8257
|
+
DA:34,0
|
|
8258
|
+
DA:37,16
|
|
8259
|
+
DA:38,16
|
|
8260
|
+
DA:39,2
|
|
8261
|
+
DA:41,14
|
|
8262
|
+
DA:43,14
|
|
8260
8263
|
DA:44,14
|
|
8264
|
+
DA:45,14
|
|
8261
8265
|
DA:46,14
|
|
8262
8266
|
DA:47,14
|
|
8263
8267
|
DA:48,14
|
|
8264
|
-
DA:49,
|
|
8265
|
-
DA:50,
|
|
8266
|
-
DA:51,
|
|
8268
|
+
DA:49,12
|
|
8269
|
+
DA:50,12
|
|
8270
|
+
DA:51,12
|
|
8267
8271
|
DA:52,12
|
|
8268
|
-
DA:
|
|
8269
|
-
DA:
|
|
8270
|
-
DA:
|
|
8271
|
-
DA:
|
|
8272
|
-
DA:
|
|
8273
|
-
DA:
|
|
8274
|
-
DA:68,14
|
|
8272
|
+
DA:56,14
|
|
8273
|
+
DA:57,0
|
|
8274
|
+
DA:61,0
|
|
8275
|
+
DA:65,14
|
|
8276
|
+
DA:71,1
|
|
8277
|
+
DA:73,1
|
|
8275
8278
|
DA:74,1
|
|
8276
|
-
DA:
|
|
8277
|
-
DA:
|
|
8278
|
-
DA:
|
|
8279
|
-
DA:
|
|
8280
|
-
DA:
|
|
8281
|
-
DA:
|
|
8282
|
-
DA:
|
|
8283
|
-
DA:
|
|
8284
|
-
DA:96,
|
|
8285
|
-
DA:
|
|
8286
|
-
DA:
|
|
8287
|
-
DA:
|
|
8279
|
+
DA:78,13
|
|
8280
|
+
DA:79,0
|
|
8281
|
+
DA:83,13
|
|
8282
|
+
DA:84,11
|
|
8283
|
+
DA:88,13
|
|
8284
|
+
DA:89,0
|
|
8285
|
+
DA:93,13
|
|
8286
|
+
DA:95,13
|
|
8287
|
+
DA:96,0
|
|
8288
|
+
DA:99,13
|
|
8289
|
+
DA:103,5
|
|
8290
|
+
DA:104,5
|
|
8291
|
+
DA:105,5
|
|
8288
8292
|
DA:106,5
|
|
8289
|
-
DA:
|
|
8290
|
-
DA:
|
|
8291
|
-
DA:
|
|
8293
|
+
DA:119,6
|
|
8294
|
+
DA:120,6
|
|
8295
|
+
DA:121,6
|
|
8292
8296
|
DA:122,6
|
|
8293
8297
|
DA:123,6
|
|
8294
|
-
DA:124,
|
|
8295
|
-
DA:
|
|
8296
|
-
DA:
|
|
8297
|
-
DA:
|
|
8298
|
-
DA:
|
|
8299
|
-
DA:
|
|
8300
|
-
DA:
|
|
8301
|
-
DA:
|
|
8302
|
-
DA:140,16
|
|
8298
|
+
DA:124,5
|
|
8299
|
+
DA:128,5
|
|
8300
|
+
DA:129,5
|
|
8301
|
+
DA:131,1
|
|
8302
|
+
DA:133,6
|
|
8303
|
+
DA:137,16
|
|
8304
|
+
DA:138,16
|
|
8305
|
+
DA:139,0
|
|
8303
8306
|
DA:141,16
|
|
8304
|
-
DA:142,
|
|
8305
|
-
DA:
|
|
8306
|
-
DA:
|
|
8307
|
-
DA:
|
|
8308
|
-
DA:
|
|
8309
|
-
DA:
|
|
8310
|
-
DA:151,
|
|
8311
|
-
DA:153,
|
|
8312
|
-
DA:154,
|
|
8313
|
-
DA:
|
|
8314
|
-
DA:
|
|
8315
|
-
DA:160,
|
|
8316
|
-
DA:161,
|
|
8317
|
-
DA:
|
|
8318
|
-
DA:
|
|
8319
|
-
DA:
|
|
8320
|
-
DA:
|
|
8321
|
-
DA:
|
|
8322
|
-
DA:
|
|
8323
|
-
DA:175,16
|
|
8307
|
+
DA:142,16
|
|
8308
|
+
DA:143,16
|
|
8309
|
+
DA:144,2
|
|
8310
|
+
DA:145,2
|
|
8311
|
+
DA:148,16
|
|
8312
|
+
DA:150,11
|
|
8313
|
+
DA:151,11
|
|
8314
|
+
DA:153,6
|
|
8315
|
+
DA:154,0
|
|
8316
|
+
DA:157,6
|
|
8317
|
+
DA:158,6
|
|
8318
|
+
DA:160,11
|
|
8319
|
+
DA:161,11
|
|
8320
|
+
DA:162,11
|
|
8321
|
+
DA:163,6
|
|
8322
|
+
DA:164,6
|
|
8323
|
+
DA:169,6
|
|
8324
|
+
DA:172,16
|
|
8325
|
+
DA:176,16
|
|
8324
8326
|
DA:179,16
|
|
8325
|
-
DA:
|
|
8327
|
+
DA:180,19
|
|
8328
|
+
DA:181,0
|
|
8326
8329
|
DA:183,19
|
|
8327
|
-
DA:
|
|
8330
|
+
DA:185,0
|
|
8328
8331
|
DA:186,19
|
|
8329
|
-
DA:188,
|
|
8330
|
-
DA:
|
|
8331
|
-
DA:
|
|
8332
|
-
DA:
|
|
8333
|
-
DA:
|
|
8334
|
-
DA:
|
|
8335
|
-
DA:
|
|
8336
|
-
DA:
|
|
8337
|
-
DA:
|
|
8338
|
-
DA:
|
|
8339
|
-
DA:
|
|
8340
|
-
DA:
|
|
8341
|
-
DA:
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
BRDA:
|
|
8350
|
-
BRDA:
|
|
8351
|
-
BRDA:
|
|
8352
|
-
BRDA:
|
|
8353
|
-
BRDA:
|
|
8354
|
-
BRDA:
|
|
8355
|
-
BRDA:
|
|
8356
|
-
BRDA:
|
|
8357
|
-
BRDA:
|
|
8358
|
-
BRDA:
|
|
8359
|
-
BRDA:
|
|
8360
|
-
BRDA:
|
|
8361
|
-
BRDA:
|
|
8362
|
-
BRDA:
|
|
8363
|
-
BRDA:
|
|
8364
|
-
BRDA:
|
|
8365
|
-
BRDA:
|
|
8366
|
-
BRDA:
|
|
8367
|
-
BRDA:
|
|
8368
|
-
BRDA:
|
|
8369
|
-
BRDA:
|
|
8370
|
-
BRDA:
|
|
8371
|
-
BRDA:
|
|
8372
|
-
BRDA:
|
|
8373
|
-
BRDA:
|
|
8374
|
-
BRDA:
|
|
8375
|
-
BRDA:
|
|
8376
|
-
BRDA:141,
|
|
8377
|
-
BRDA:
|
|
8378
|
-
BRDA:
|
|
8379
|
-
BRDA:
|
|
8380
|
-
BRDA:144,
|
|
8381
|
-
BRDA:
|
|
8382
|
-
BRDA:
|
|
8383
|
-
BRDA:
|
|
8384
|
-
BRDA:
|
|
8385
|
-
BRDA:
|
|
8386
|
-
BRDA:
|
|
8387
|
-
BRDA:
|
|
8388
|
-
BRDA:
|
|
8389
|
-
BRDA:
|
|
8390
|
-
BRDA:
|
|
8391
|
-
BRDA:
|
|
8392
|
-
BRDA:
|
|
8393
|
-
BRDA:
|
|
8394
|
-
BRDA:
|
|
8395
|
-
BRDA:
|
|
8396
|
-
BRDA:
|
|
8397
|
-
BRDA:193,24,0,0
|
|
8398
|
-
BRDA:193,24,1,19
|
|
8399
|
-
BRDA:193,25,0,19
|
|
8400
|
-
BRDA:193,25,1,0
|
|
8332
|
+
DA:188,19
|
|
8333
|
+
DA:193,0
|
|
8334
|
+
DA:196,16
|
|
8335
|
+
DA:201,0
|
|
8336
|
+
DA:202,0
|
|
8337
|
+
DA:210,0
|
|
8338
|
+
DA:212,16
|
|
8339
|
+
DA:216,2
|
|
8340
|
+
DA:217,10
|
|
8341
|
+
DA:218,10
|
|
8342
|
+
DA:219,10
|
|
8343
|
+
DA:221,8
|
|
8344
|
+
DA:224,2
|
|
8345
|
+
LF:109
|
|
8346
|
+
LH:95
|
|
8347
|
+
BRDA:9,0,0,10
|
|
8348
|
+
BRDA:33,1,0,0
|
|
8349
|
+
BRDA:33,1,1,16
|
|
8350
|
+
BRDA:38,2,0,2
|
|
8351
|
+
BRDA:38,2,1,14
|
|
8352
|
+
BRDA:48,3,0,12
|
|
8353
|
+
BRDA:48,3,1,2
|
|
8354
|
+
BRDA:56,4,0,0
|
|
8355
|
+
BRDA:56,4,1,14
|
|
8356
|
+
BRDA:65,5,0,1
|
|
8357
|
+
BRDA:65,5,1,13
|
|
8358
|
+
BRDA:66,6,0,14
|
|
8359
|
+
BRDA:66,6,1,12
|
|
8360
|
+
BRDA:66,6,2,1
|
|
8361
|
+
BRDA:66,6,3,1
|
|
8362
|
+
BRDA:78,7,0,0
|
|
8363
|
+
BRDA:78,7,1,13
|
|
8364
|
+
BRDA:83,8,0,11
|
|
8365
|
+
BRDA:83,8,1,2
|
|
8366
|
+
BRDA:88,9,0,0
|
|
8367
|
+
BRDA:88,9,1,13
|
|
8368
|
+
BRDA:95,10,0,0
|
|
8369
|
+
BRDA:95,10,1,13
|
|
8370
|
+
BRDA:123,11,0,5
|
|
8371
|
+
BRDA:123,11,1,1
|
|
8372
|
+
BRDA:124,12,0,0
|
|
8373
|
+
BRDA:124,12,1,5
|
|
8374
|
+
BRDA:138,13,0,0
|
|
8375
|
+
BRDA:138,13,1,16
|
|
8376
|
+
BRDA:138,14,0,16
|
|
8377
|
+
BRDA:138,14,1,16
|
|
8378
|
+
BRDA:141,15,0,16
|
|
8379
|
+
BRDA:141,15,1,15
|
|
8380
|
+
BRDA:142,16,0,16
|
|
8381
|
+
BRDA:142,16,1,5
|
|
8382
|
+
BRDA:144,17,0,2
|
|
8383
|
+
BRDA:144,17,1,0
|
|
8384
|
+
BRDA:148,18,0,11
|
|
8385
|
+
BRDA:148,18,1,5
|
|
8386
|
+
BRDA:153,19,0,0
|
|
8387
|
+
BRDA:153,19,1,6
|
|
8388
|
+
BRDA:175,20,0,0
|
|
8389
|
+
BRDA:180,21,0,0
|
|
8390
|
+
BRDA:180,21,1,19
|
|
8391
|
+
BRDA:183,22,0,0
|
|
8392
|
+
BRDA:183,22,1,19
|
|
8393
|
+
BRDA:186,23,0,19
|
|
8394
|
+
BRDA:186,23,1,0
|
|
8395
|
+
BRDA:196,24,0,0
|
|
8396
|
+
BRDA:196,24,1,16
|
|
8397
|
+
BRDA:197,25,0,16
|
|
8398
|
+
BRDA:197,25,1,16
|
|
8399
|
+
BRDA:197,25,2,16
|
|
8401
8400
|
BRDA:203,26,0,0
|
|
8402
|
-
BRDA:203,26,1,
|
|
8403
|
-
BRDA:
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
BRDA:210,28,0,0
|
|
8407
|
-
BRDA:210,28,1,0
|
|
8408
|
-
BRDA:210,28,2,0
|
|
8409
|
-
BRF:60
|
|
8410
|
-
BRH:41
|
|
8401
|
+
BRDA:203,26,1,0
|
|
8402
|
+
BRDA:203,26,2,0
|
|
8403
|
+
BRF:56
|
|
8404
|
+
BRH:39
|
|
8411
8405
|
end_of_record
|
|
8412
8406
|
TN:
|
|
8413
8407
|
SF:src/threads/utils.js
|
|
@@ -155,7 +155,7 @@ var External;
|
|
|
155
155
|
thisRow._id = generateIdForRow(row, table);
|
|
156
156
|
thisRow.tableId = table._id;
|
|
157
157
|
thisRow._rev = "rev";
|
|
158
|
-
return thisRow;
|
|
158
|
+
return utils_4.processFormulas(table, thisRow);
|
|
159
159
|
}
|
|
160
160
|
function fixArrayTypes(row, table) {
|
|
161
161
|
for (let [fieldName, schema] of Object.entries(table.schema)) {
|
|
@@ -278,14 +278,24 @@ var External;
|
|
|
278
278
|
* This iterates through the returned rows and works out what elements of the rows
|
|
279
279
|
* actually match up to another row (based on primary keys) - this is pretty specific
|
|
280
280
|
* to SQL and the way that SQL relationships are returned based on joins.
|
|
281
|
+
* This is complicated, but the idea is that when a SQL query returns all the relations
|
|
282
|
+
* will be separate rows, with all of the data in each row. We have to decipher what comes
|
|
283
|
+
* from where (which tables) and how to convert that into budibase columns.
|
|
281
284
|
*/
|
|
282
|
-
updateRelationshipColumns(row, rows, relationships) {
|
|
285
|
+
updateRelationshipColumns(table, row, rows, relationships) {
|
|
283
286
|
const columns = {};
|
|
284
287
|
for (let relationship of relationships) {
|
|
285
288
|
const linkedTable = this.tables[relationship.tableName];
|
|
286
289
|
if (!linkedTable) {
|
|
287
290
|
continue;
|
|
288
291
|
}
|
|
292
|
+
const fromColumn = `${table.name}.${relationship.from}`;
|
|
293
|
+
const toColumn = `${linkedTable.name}.${relationship.to}`;
|
|
294
|
+
// this is important when working with multiple relationships
|
|
295
|
+
// between the same tables, don't want to overlap/multiply the relations
|
|
296
|
+
if (!relationship.through && row[fromColumn] !== row[toColumn]) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
289
299
|
let linked = basicProcessing(row, linkedTable);
|
|
290
300
|
if (!linked._id) {
|
|
291
301
|
continue;
|
|
@@ -323,7 +333,7 @@ var External;
|
|
|
323
333
|
row._id = rowId;
|
|
324
334
|
// this is a relationship of some sort
|
|
325
335
|
if (finalRows[rowId]) {
|
|
326
|
-
finalRows = this.updateRelationshipColumns(row, finalRows, relationships);
|
|
336
|
+
finalRows = this.updateRelationshipColumns(table, row, finalRows, relationships);
|
|
327
337
|
continue;
|
|
328
338
|
}
|
|
329
339
|
const thisRow = fixArrayTypes(basicProcessing(row, table), table);
|
|
@@ -332,7 +342,7 @@ var External;
|
|
|
332
342
|
}
|
|
333
343
|
finalRows[thisRow._id] = thisRow;
|
|
334
344
|
// do this at end once its been added to the final rows
|
|
335
|
-
finalRows = this.updateRelationshipColumns(row, finalRows, relationships);
|
|
345
|
+
finalRows = this.updateRelationshipColumns(table, row, finalRows, relationships);
|
|
336
346
|
}
|
|
337
347
|
return utils_4.processFormulas(table, Object.values(finalRows));
|
|
338
348
|
}
|
|
@@ -21,7 +21,7 @@ const { clientLibraryPath } = require("../../../utilities");
|
|
|
21
21
|
const { upload } = require("../../../utilities/fileSystem");
|
|
22
22
|
const { attachmentsRelativeURL } = require("../../../utilities");
|
|
23
23
|
const { DocumentTypes } = require("../../../db/utils");
|
|
24
|
-
const { getAppDB } = require("@budibase/backend-core/context");
|
|
24
|
+
const { getAppDB, updateAppId } = require("@budibase/backend-core/context");
|
|
25
25
|
const AWS = require("aws-sdk");
|
|
26
26
|
const AWS_REGION = env.AWS_REGION ? env.AWS_REGION : "eu-west-1";
|
|
27
27
|
function prepareUpload({ s3Key, bucket, metadata, file }) {
|
|
@@ -50,12 +50,9 @@ function getAppIdFromUrl(ctx) {
|
|
|
50
50
|
// search prod apps for a url that matches, exclude dev where id is always used
|
|
51
51
|
const apps = yield getAllApps({ dev: false });
|
|
52
52
|
const app = apps.filter(a => a.url && a.url.toLowerCase() === possibleAppUrl)[0];
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
else {
|
|
57
|
-
return ctx.params.appId;
|
|
58
|
-
}
|
|
53
|
+
const appId = app && app.appId ? app.appId : ctx.params.appId;
|
|
54
|
+
updateAppId(appId);
|
|
55
|
+
return appId;
|
|
59
56
|
});
|
|
60
57
|
}
|
|
61
58
|
exports.serveBuilder = function (ctx) {
|