@lowdefy/docs-content 0.0.0-experimental-20260710073520
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/LICENSE +201 -0
- package/README.md +20 -0
- package/content/actions/callapi.md +66 -0
- package/content/actions/callmethod.md +41 -0
- package/content/actions/copytoclipboard.md +32 -0
- package/content/actions/displaymessage.md +53 -0
- package/content/actions/downloadcsv.md +89 -0
- package/content/actions/fetch.md +50 -0
- package/content/actions/geolocationcurrentposition.md +56 -0
- package/content/actions/link.md +104 -0
- package/content/actions/login.md +85 -0
- package/content/actions/logout.md +56 -0
- package/content/actions/pdfmake.md +304 -0
- package/content/actions/request.md +67 -0
- package/content/actions/reset.md +27 -0
- package/content/actions/resetvalidation.md +85 -0
- package/content/actions/scrollto.md +85 -0
- package/content/actions/setdarkmode.md +62 -0
- package/content/actions/setfocus.md +33 -0
- package/content/actions/setglobal.md +63 -0
- package/content/actions/setlocale.md +69 -0
- package/content/actions/setstate.md +70 -0
- package/content/actions/throw.md +72 -0
- package/content/actions/validate.md +87 -0
- package/content/actions/wait.md +24 -0
- package/content/agents/agent-endpoint-tools.md +190 -0
- package/content/agents/agent-mcp-tools.md +124 -0
- package/content/agents/agent-multi-agent.md +136 -0
- package/content/agents/agent-properties.md +174 -0
- package/content/agents/agent-server-hooks.md +336 -0
- package/content/agents/agentchat.md +515 -0
- package/content/agents/agentconversations.md +148 -0
- package/content/concepts/ai-agent-docs.md +190 -0
- package/content/concepts/cli.md +213 -0
- package/content/concepts/connections-and-requests.md +7 -0
- package/content/concepts/custom-html.md +3 -0
- package/content/concepts/custom-styling.md +161 -0
- package/content/concepts/events-and-actions.md +271 -0
- package/content/concepts/hosting-files.md +18 -0
- package/content/concepts/i18n.md +320 -0
- package/content/concepts/keyboard-shortcuts.md +218 -0
- package/content/concepts/layout-overview.md +478 -0
- package/content/concepts/lists.md +144 -0
- package/content/concepts/logger.md +43 -0
- package/content/concepts/lowdefy-schema.md +365 -0
- package/content/concepts/menus.md +144 -0
- package/content/concepts/module-authoring.md +564 -0
- package/content/concepts/modules.md +338 -0
- package/content/concepts/operators.md +45 -0
- package/content/concepts/overview.md +19 -0
- package/content/concepts/references-and-templates.md +207 -0
- package/content/concepts/secrets.md +24 -0
- package/content/concepts/selectors.md +143 -0
- package/content/connections/amazonredshift.md +176 -0
- package/content/connections/anthropic.md +232 -0
- package/content/connections/awss3.md +313 -0
- package/content/connections/azureblobstorage.md +133 -0
- package/content/connections/elasticsearch.md +371 -0
- package/content/connections/google.md +228 -0
- package/content/connections/googlecloudstorage.md +139 -0
- package/content/connections/googlesheet.md +313 -0
- package/content/connections/knex.md +206 -0
- package/content/connections/mariadb.md +177 -0
- package/content/connections/mcp.md +134 -0
- package/content/connections/mongodb.md +739 -0
- package/content/connections/mssql.md +191 -0
- package/content/connections/mysql.md +192 -0
- package/content/connections/openai-connection.md +228 -0
- package/content/connections/postgresql.md +200 -0
- package/content/connections/redis.md +116 -0
- package/content/connections/sendgridmail.md +94 -0
- package/content/connections/smtp.md +149 -0
- package/content/connections/sqlite.md +187 -0
- package/content/connections/stripe.md +115 -0
- package/content/container-blocks/affix.md +413 -0
- package/content/container-blocks/alert.md +937 -0
- package/content/container-blocks/badge.md +1222 -0
- package/content/container-blocks/box.md +1453 -0
- package/content/container-blocks/card.md +1200 -0
- package/content/container-blocks/carousel.md +2247 -0
- package/content/container-blocks/collapse.md +1335 -0
- package/content/container-blocks/configprovider.md +1070 -0
- package/content/container-blocks/confirmmodal.md +1159 -0
- package/content/container-blocks/content.md +597 -0
- package/content/container-blocks/descriptions.md +870 -0
- package/content/container-blocks/drawer.md +1379 -0
- package/content/container-blocks/dropdownmenu.md +643 -0
- package/content/container-blocks/flex.md +1510 -0
- package/content/container-blocks/footer.md +380 -0
- package/content/container-blocks/googlemaps.md +546 -0
- package/content/container-blocks/googlemapsheatmap.md +607 -0
- package/content/container-blocks/googlemapsscript.md +61 -0
- package/content/container-blocks/header.md +302 -0
- package/content/container-blocks/label.md +739 -0
- package/content/container-blocks/layout.md +604 -0
- package/content/container-blocks/masonry.md +1090 -0
- package/content/container-blocks/mobilemenu.md +1244 -0
- package/content/container-blocks/modal.md +1180 -0
- package/content/container-blocks/pageheadermenu.md +614 -0
- package/content/container-blocks/pagesidebarlayout.md +438 -0
- package/content/container-blocks/pagesidermenu.md +651 -0
- package/content/container-blocks/popover.md +1421 -0
- package/content/container-blocks/result.md +972 -0
- package/content/container-blocks/sider.md +1064 -0
- package/content/container-blocks/span.md +747 -0
- package/content/container-blocks/spinner.md +267 -0
- package/content/container-blocks/splitter.md +1735 -0
- package/content/container-blocks/tabs.md +1718 -0
- package/content/container-blocks/tooltip.md +1274 -0
- package/content/container-blocks/watermark.md +515 -0
- package/content/controls/for.md +103 -0
- package/content/controls/if.md +107 -0
- package/content/controls/log.md +50 -0
- package/content/controls/parallel.md +71 -0
- package/content/controls/parallel_for.md +36 -0
- package/content/controls/reject.md +56 -0
- package/content/controls/return.md +66 -0
- package/content/controls/set_state.md +98 -0
- package/content/controls/switch.md +90 -0
- package/content/controls/throw.md +79 -0
- package/content/controls/try.md +88 -0
- package/content/deployment/docker.md +149 -0
- package/content/deployment/node-server.md +27 -0
- package/content/deployment/vercel.md +101 -0
- package/content/display-blocks/aggrid.md +1459 -0
- package/content/display-blocks/anchor.md +336 -0
- package/content/display-blocks/avatar.md +1154 -0
- package/content/display-blocks/breadcrumb.md +517 -0
- package/content/display-blocks/button.md +758 -0
- package/content/display-blocks/calendar.md +156 -0
- package/content/display-blocks/dangeroushtml.md +314 -0
- package/content/display-blocks/dangerousmarkdown.md +423 -0
- package/content/display-blocks/diffgit.md +44 -0
- package/content/display-blocks/difflist.md +225 -0
- package/content/display-blocks/diffsidebyside.md +56 -0
- package/content/display-blocks/difftimeline.md +94 -0
- package/content/display-blocks/divider.md +406 -0
- package/content/display-blocks/download.md +60 -0
- package/content/display-blocks/dropdownbutton.md +661 -0
- package/content/display-blocks/echart.md +418 -0
- package/content/display-blocks/floatbutton.md +545 -0
- package/content/display-blocks/html.md +311 -0
- package/content/display-blocks/icon.md +717 -0
- package/content/display-blocks/img.md +479 -0
- package/content/display-blocks/markdown.md +520 -0
- package/content/display-blocks/markdownwithcode.md +730 -0
- package/content/display-blocks/menu.md +1123 -0
- package/content/display-blocks/message.md +941 -0
- package/content/display-blocks/notification.md +1410 -0
- package/content/display-blocks/paragraph.md +643 -0
- package/content/display-blocks/progress.md +818 -0
- package/content/display-blocks/qrcode.md +519 -0
- package/content/display-blocks/s3download.md +240 -0
- package/content/display-blocks/search.md +360 -0
- package/content/display-blocks/skeleton.md +272 -0
- package/content/display-blocks/skeletonavatar.md +222 -0
- package/content/display-blocks/skeletonbutton.md +245 -0
- package/content/display-blocks/skeletoninput.md +223 -0
- package/content/display-blocks/skeletonparagraph.md +201 -0
- package/content/display-blocks/statistic.md +485 -0
- package/content/display-blocks/steps.md +585 -0
- package/content/display-blocks/tag.md +620 -0
- package/content/display-blocks/title.md +654 -0
- package/content/display-blocks/tour.md +2359 -0
- package/content/input-blocks/autocomplete.md +786 -0
- package/content/input-blocks/buttonselector.md +964 -0
- package/content/input-blocks/checkboxselector.md +765 -0
- package/content/input-blocks/checkboxswitch.md +497 -0
- package/content/input-blocks/colorselector.md +884 -0
- package/content/input-blocks/daterangeselector.md +777 -0
- package/content/input-blocks/dateselector.md +693 -0
- package/content/input-blocks/datetimeselector.md +791 -0
- package/content/input-blocks/inputgallery.md +528 -0
- package/content/input-blocks/monthselector.md +717 -0
- package/content/input-blocks/multipleselector.md +1337 -0
- package/content/input-blocks/numberinput.md +855 -0
- package/content/input-blocks/pagination.md +679 -0
- package/content/input-blocks/paragraphinput.md +1664 -0
- package/content/input-blocks/passwordinput.md +480 -0
- package/content/input-blocks/phonenumberinput.md +688 -0
- package/content/input-blocks/radioselector.md +820 -0
- package/content/input-blocks/ratingslider.md +684 -0
- package/content/input-blocks/s3uploadbutton.md +384 -0
- package/content/input-blocks/s3uploaddragger.md +305 -0
- package/content/input-blocks/s3uploadphoto.md +288 -0
- package/content/input-blocks/segmentedselector.md +782 -0
- package/content/input-blocks/selector.md +1162 -0
- package/content/input-blocks/switch.md +552 -0
- package/content/input-blocks/textarea.md +714 -0
- package/content/input-blocks/textinput.md +639 -0
- package/content/input-blocks/tiptapinput.md +226 -0
- package/content/input-blocks/tiptapmentioninput.md +471 -0
- package/content/input-blocks/titleinput.md +1094 -0
- package/content/input-blocks/treeinput.md +144 -0
- package/content/input-blocks/treemultipleselector.md +162 -0
- package/content/input-blocks/treeselector.md +185 -0
- package/content/input-blocks/upload.md +149 -0
- package/content/input-blocks/uploaddragger.md +85 -0
- package/content/input-blocks/uploadphoto.md +84 -0
- package/content/input-blocks/weekselector.md +630 -0
- package/content/list-blocks/controlledlist.md +498 -0
- package/content/list-blocks/list.md +529 -0
- package/content/list-blocks/listselector.md +301 -0
- package/content/list-blocks/masonrylist.md +230 -0
- package/content/migration/upgrade-guide.md +106 -0
- package/content/migration/v4-to-v5.md +589 -0
- package/content/migration/v5-to-v6.md +36 -0
- package/content/operators/_actions.md +58 -0
- package/content/operators/_and.md +76 -0
- package/content/operators/_api.md +254 -0
- package/content/operators/_app.md +114 -0
- package/content/operators/_args.md +65 -0
- package/content/operators/_array.md +331 -0
- package/content/operators/_base64.md +49 -0
- package/content/operators/_boolean.md +33 -0
- package/content/operators/_build.md +166 -0
- package/content/operators/_change_case.md +357 -0
- package/content/operators/_date.md +415 -0
- package/content/operators/_dayjs.md +128 -0
- package/content/operators/_diff.md +61 -0
- package/content/operators/_divide.md +32 -0
- package/content/operators/_eq.md +52 -0
- package/content/operators/_event.md +86 -0
- package/content/operators/_function.md +52 -0
- package/content/operators/_get.md +92 -0
- package/content/operators/_global.md +86 -0
- package/content/operators/_gt.md +50 -0
- package/content/operators/_gte.md +50 -0
- package/content/operators/_hash.md +112 -0
- package/content/operators/_if.md +30 -0
- package/content/operators/_if_none.md +47 -0
- package/content/operators/_index.md +48 -0
- package/content/operators/_input.md +86 -0
- package/content/operators/_intl.md +135 -0
- package/content/operators/_item.md +166 -0
- package/content/operators/_js.md +113 -0
- package/content/operators/_json.md +120 -0
- package/content/operators/_jsonata.md +152 -0
- package/content/operators/_locale.md +65 -0
- package/content/operators/_location.md +40 -0
- package/content/operators/_log.md +22 -0
- package/content/operators/_lt.md +50 -0
- package/content/operators/_lte.md +50 -0
- package/content/operators/_math.md +407 -0
- package/content/operators/_media.md +83 -0
- package/content/operators/_menu.md +62 -0
- package/content/operators/_module.md +340 -0
- package/content/operators/_mql.md +95 -0
- package/content/operators/_ne.md +62 -0
- package/content/operators/_not.md +33 -0
- package/content/operators/_number.md +159 -0
- package/content/operators/_nunjucks.md +117 -0
- package/content/operators/_object.md +253 -0
- package/content/operators/_operator.md +33 -0
- package/content/operators/_or.md +67 -0
- package/content/operators/_product.md +45 -0
- package/content/operators/_random.md +90 -0
- package/content/operators/_ref.md +80 -0
- package/content/operators/_regex.md +69 -0
- package/content/operators/_request.md +35 -0
- package/content/operators/_request_details.md +29 -0
- package/content/operators/_secret.md +56 -0
- package/content/operators/_state.md +134 -0
- package/content/operators/_step.md +98 -0
- package/content/operators/_string.md +327 -0
- package/content/operators/_subtract.md +24 -0
- package/content/operators/_sum.md +45 -0
- package/content/operators/_switch.md +37 -0
- package/content/operators/_t.md +96 -0
- package/content/operators/_theme.md +65 -0
- package/content/operators/_type.md +78 -0
- package/content/operators/_uri.md +49 -0
- package/content/operators/_url_query.md +92 -0
- package/content/operators/_user.md +154 -0
- package/content/operators/_uuid.md +118 -0
- package/content/operators/_var.md +88 -0
- package/content/operators/_yaml.md +96 -0
- package/content/other/introduction.md +39 -0
- package/content/other/next-auth-providers.md +3 -0
- package/content/other/updatesession.md +26 -0
- package/content/plugins/plugins-actions.md +80 -0
- package/content/plugins/plugins-connections.md +98 -0
- package/content/plugins/plugins-dev.md +138 -0
- package/content/plugins/plugins-introduction.md +29 -0
- package/content/plugins/plugins-operators.md +71 -0
- package/content/testing/e2e-auth.md +108 -0
- package/content/testing/e2e-configuration.md +107 -0
- package/content/testing/e2e-getting-started.md +96 -0
- package/content/testing/e2e-introduction.md +53 -0
- package/content/testing/e2e-mocking.md +155 -0
- package/content/testing/e2e-writing-tests.md +214 -0
- package/content/tutorial/tutorial-actions-operators.md +222 -0
- package/content/tutorial/tutorial-add-blocks.md +86 -0
- package/content/tutorial/tutorial-create-page.md +57 -0
- package/content/tutorial/tutorial-display-data-page.md +181 -0
- package/content/tutorial/tutorial-next-steps.md +53 -0
- package/content/tutorial/tutorial-requests-sql.md +22 -0
- package/content/tutorial/tutorial-start.md +71 -0
- package/content/user-authentication/auth-providers.md +15 -0
- package/content/user-authentication/login-and-logout.md +122 -0
- package/content/user-authentication/users-introduction.md +31 -0
- package/index.json +2281 -0
- package/package.json +34 -0
- package/scripts/extractAgentDocs.js +130 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Google Cloud Storage
|
|
2
|
+
|
|
3
|
+
Google Cloud Storage is the object storage service provided by Google Cloud Platform. Data is stored as objects in buckets, and objects can be public or private. You can read more [here](https://cloud.google.com/storage/docs).
|
|
4
|
+
|
|
5
|
+
Lowdefy integrates with Google Cloud Storage using signed URLs and signed POST policies — short-lived credentials that let the browser upload and download objects directly, without file content passing through the Lowdefy server. The connection plugs into the provider-neutral <a href="/Upload">Upload</a> and <a href="/Download">Download</a> blocks.
|
|
6
|
+
|
|
7
|
+
Direct browser uploads require [CORS configuration on the bucket](https://cloud.google.com/storage/docs/using-cors) that allows your app's origin.
|
|
8
|
+
|
|
9
|
+
## Connections
|
|
10
|
+
|
|
11
|
+
Connection types:
|
|
12
|
+
- GoogleCloudStorageBucket
|
|
13
|
+
|
|
14
|
+
### GoogleCloudStorageBucket
|
|
15
|
+
|
|
16
|
+
The `GoogleCloudStorageBucket` connection is used to connect to a Google Cloud Storage bucket.
|
|
17
|
+
|
|
18
|
+
#### Properties
|
|
19
|
+
- `bucket: string`: __Required__ - Google Cloud Storage bucket name.
|
|
20
|
+
- `client_email: string`: The email of your service account. If omitted, Application Default Credentials are used (e.g. the attached service account when running on GCP).
|
|
21
|
+
- `private_key: string`: The private key for your service account. If omitted, Application Default Credentials are used.
|
|
22
|
+
- `projectId: string`: The Google Cloud project ID the bucket belongs to.
|
|
23
|
+
- `publicUrlBase: string`: Base URL used to construct stable public object URLs (e.g. a CDN domain in front of the bucket). Used by download requests when the request sets `public: true`.
|
|
24
|
+
- `read: boolean`: Default: `true` - Allow reads from the bucket.
|
|
25
|
+
- `write: boolean`: Default: `false` - Allow writes to the bucket.
|
|
26
|
+
|
|
27
|
+
#### Examples
|
|
28
|
+
|
|
29
|
+
###### Reads and writes with a service account:
|
|
30
|
+
```yaml
|
|
31
|
+
connections:
|
|
32
|
+
- id: my_bucket
|
|
33
|
+
type: GoogleCloudStorageBucket
|
|
34
|
+
properties:
|
|
35
|
+
bucket: my-bucket-name
|
|
36
|
+
projectId: my-project
|
|
37
|
+
client_email:
|
|
38
|
+
_secret: GCS_CLIENT_EMAIL
|
|
39
|
+
private_key:
|
|
40
|
+
_secret: GCS_PRIVATE_KEY
|
|
41
|
+
write: true
|
|
42
|
+
```
|
|
43
|
+
Environment variables:
|
|
44
|
+
```
|
|
45
|
+
LOWDEFY_SECRET_GCS_CLIENT_EMAIL = service-account@my-project.iam.gserviceaccount.com
|
|
46
|
+
LOWDEFY_SECRET_GCS_PRIVATE_KEY = -----BEGIN PRIVATE KEY-----\n...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Requests
|
|
50
|
+
|
|
51
|
+
Request types:
|
|
52
|
+
- GcsSignedPostPolicy
|
|
53
|
+
- GcsSignedGetUrl
|
|
54
|
+
- GcsGetObject
|
|
55
|
+
- GcsPutObject
|
|
56
|
+
|
|
57
|
+
### GcsSignedPostPolicy
|
|
58
|
+
|
|
59
|
+
The `GcsSignedPostPolicy` request signs a V4 POST policy for direct browser uploads. It returns the standard upload-policy descriptor `{ method: 'POST', url, key, bucket, fields }` used by the <a href="/Upload">Upload</a>, <a href="/UploadPhoto">UploadPhoto</a> and <a href="/UploadDragger">UploadDragger</a> blocks — reference the request id in the block's `uploadPolicyRequestId` property. The connection must set `write: true`.
|
|
60
|
+
|
|
61
|
+
#### Properties
|
|
62
|
+
- `key: string`: __Required__ - Key under which the object will be stored. If another file is saved with the same key, that file will be overwritten, so a random string in this field is probably needed.
|
|
63
|
+
- `expires: number`: Default: `3600` - Number of seconds for which the policy should be valid.
|
|
64
|
+
- `fields: object`: Additional form fields to include in the POST policy (e.g. `acl`).
|
|
65
|
+
- `conditions: array`: Conditions to be enforced on the request. See [POST policy conditions](https://cloud.google.com/storage/docs/xml-api/post-object-forms#policy_document).
|
|
66
|
+
|
|
67
|
+
#### Examples
|
|
68
|
+
|
|
69
|
+
###### Upload a file with the user's filename:
|
|
70
|
+
```yaml
|
|
71
|
+
requests:
|
|
72
|
+
- id: upload_policy
|
|
73
|
+
type: GcsSignedPostPolicy
|
|
74
|
+
connectionId: my_bucket
|
|
75
|
+
payload:
|
|
76
|
+
name:
|
|
77
|
+
_event: file.name
|
|
78
|
+
properties:
|
|
79
|
+
key:
|
|
80
|
+
_string.concat:
|
|
81
|
+
- 'uploads/'
|
|
82
|
+
- _payload: name
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### GcsSignedGetUrl
|
|
86
|
+
|
|
87
|
+
The `GcsSignedGetUrl` request signs a V4 read URL for downloads. Reference the request id in the <a href="/Download">Download</a> block's `downloadPolicyRequestId` property, or open the returned URL with the `Link` action.
|
|
88
|
+
|
|
89
|
+
#### Properties
|
|
90
|
+
- `key: string`: __Required__ - Key under which the object is stored.
|
|
91
|
+
- `expires: number`: Default: `3600` - Number of seconds for which the signed URL should be valid.
|
|
92
|
+
- `public: boolean`: Default: `false` - Return a stable, non-expiring public URL (`https://storage.googleapis.com/{bucket}/{key}`, or `${publicUrlBase}/${key}` when the connection sets `publicUrlBase`) instead of a signed URL. The object must be publicly readable; this is author-declared and never checked at runtime.
|
|
93
|
+
- `responseDisposition: string`: Sets the Content-Disposition header of the response.
|
|
94
|
+
- `responseType: string`: Sets the Content-Type header of the response.
|
|
95
|
+
|
|
96
|
+
### GcsGetObject
|
|
97
|
+
|
|
98
|
+
The `GcsGetObject` request reads an object from the bucket on the server and returns its content
|
|
99
|
+
as a base64 encoded string, so [API endpoint](/lowdefy-api) routine steps can process file content
|
|
100
|
+
with operators and pass it to other steps. The connection must allow reads (`read` is `true` by
|
|
101
|
+
default). Returns `{ bucket, key, content, contentType, size }`.
|
|
102
|
+
|
|
103
|
+
#### Properties
|
|
104
|
+
- `key: string`: __Required__ - Key under which the object is stored.
|
|
105
|
+
|
|
106
|
+
### GcsPutObject
|
|
107
|
+
|
|
108
|
+
The `GcsPutObject` request writes an object to the bucket from the server. It accepts base64 encoded content, which makes it the storage half of the server-side file handling pattern: an upload block with `emitFileContent: true` sends the file as a base64 payload to an [API endpoint](/lowdefy-api) with the `CallAPI` action, and a routine step stores it. The connection must set `write: true`.
|
|
109
|
+
|
|
110
|
+
#### Properties
|
|
111
|
+
- `key: string`: __Required__ - Key under which the object will be stored.
|
|
112
|
+
- `content: string`: __Required__ - Object content as a base64 encoded string.
|
|
113
|
+
- `contentType: string`: MIME type of the object (sets the Content-Type of the stored object).
|
|
114
|
+
- `public: boolean`: Default: `false` - Make the stored object publicly readable.
|
|
115
|
+
|
|
116
|
+
#### Examples
|
|
117
|
+
|
|
118
|
+
###### Store a file sent as an endpoint payload:
|
|
119
|
+
```yaml
|
|
120
|
+
api:
|
|
121
|
+
- id: store_report
|
|
122
|
+
type: Api
|
|
123
|
+
routine:
|
|
124
|
+
- id: put_object
|
|
125
|
+
type: GcsPutObject
|
|
126
|
+
connectionId: my_bucket
|
|
127
|
+
properties:
|
|
128
|
+
key:
|
|
129
|
+
_string.concat:
|
|
130
|
+
- 'reports/'
|
|
131
|
+
- _payload: name
|
|
132
|
+
content:
|
|
133
|
+
_payload: content
|
|
134
|
+
contentType:
|
|
135
|
+
_payload: type
|
|
136
|
+
- ':return':
|
|
137
|
+
key:
|
|
138
|
+
_step: put_object.key
|
|
139
|
+
```
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
# Google Sheets
|
|
2
|
+
|
|
3
|
+
## Connections
|
|
4
|
+
|
|
5
|
+
Connection types:
|
|
6
|
+
- GoogleSheet
|
|
7
|
+
|
|
8
|
+
### GoogleSheet
|
|
9
|
+
|
|
10
|
+
The `GoogleSheet` connection offers the flexibility to connect to Google Sheets using either an API key or a service account. While an API key is suitable for read-only access to public sheets, most applications will benefit more from using a service account, which offers broader capabilities. For detailed instructions on creating a service account, you can refer to the [Google Sheets API Quickstart Guide](https://developers.google.com/sheets/api/quickstart/js) and the [Google Workspace Guide on Creating a Project](https://developers.google.com/workspace/guides/create-project).
|
|
11
|
+
|
|
12
|
+
This connection refers to the entire document as the `spreadsheet`, and the individual sheets in the document as `sheets`. The spreadsheet is identified by it's `spreadsheetId`, and sheets can either be identified by their `sheetId` or their `index` (position in the document starting from 0).
|
|
13
|
+
|
|
14
|
+
When a sheet is accessed in a browser the url either looks like:
|
|
15
|
+
`https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit#gid={sheetId}`
|
|
16
|
+
|
|
17
|
+
The `GoogleSheet` connection works with sheets as a row based data store. Each row is a data record, and a header row needs to be present to define the column names. This header needs to be created in the Google Sheets web interface. Types can be specified for any of the columns in the sheet. If a type is not specified, the value will be read as a string. The `json` type will stringify a object as JSON before saving it, and parse it again when reading.
|
|
18
|
+
|
|
19
|
+
#### Properties
|
|
20
|
+
- `apiKey: string`: API key for your google project.
|
|
21
|
+
- `client_email: string`: The email address of your service account.
|
|
22
|
+
- `private_key: string`: The private key for your service account. Base64 encode the string if you have issues with the newline characters in the string.
|
|
23
|
+
- `sheetId: string`: The ID of the worksheet. Can be found in the URL as the "gid" parameter. One of `sheetId` or `sheetIndex` is required.
|
|
24
|
+
- `sheetIndex: number`: The position of the worksheet as they appear in the Google sheets UI. Starts from 0. One of `sheetId` or `sheetIndex` is required.
|
|
25
|
+
- `spreadsheetId: string`: __Required__ - The document ID from the URL of the spreadsheet.
|
|
26
|
+
- `columnTypes: object`: An object that defines the data types for each column. Each key should be the column name, and the value should be one of: `string`, `number`, `boolean`, `date`, or `json`.
|
|
27
|
+
- `read: boolean`: Default: `true` - Allow read operations like find on the sheet.
|
|
28
|
+
- `write: boolean`: Default: `false` - Allow write operations like update on the sheet.
|
|
29
|
+
|
|
30
|
+
#### Examples
|
|
31
|
+
|
|
32
|
+
###### Read only access to first sheet in a public spreadsheet:
|
|
33
|
+
```yaml
|
|
34
|
+
connections:
|
|
35
|
+
- id: public_sheet
|
|
36
|
+
type: GoogleSheet
|
|
37
|
+
properties:
|
|
38
|
+
apiKey:
|
|
39
|
+
_secret: GOOGLE_SHEETS_API_KEY
|
|
40
|
+
sheetIndex: 0
|
|
41
|
+
spreadsheetId: ubQsWYNGRUq0gFB1sAp2r9oYE19lZ8yGA1T6y0yBoLPW
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
###### Access with a service account, with defined types:
|
|
45
|
+
```yaml
|
|
46
|
+
connections:
|
|
47
|
+
- id: my_sheet
|
|
48
|
+
type: GoogleSheet
|
|
49
|
+
properties:
|
|
50
|
+
client_email:
|
|
51
|
+
_secret: GOOGLE_SHEETS_CLIENT_EMAIL
|
|
52
|
+
private_key:
|
|
53
|
+
_base64.decode:
|
|
54
|
+
_secret: GOOGLE_SHEETS_PRIVATE_KEY
|
|
55
|
+
sheetId: '1199545345'
|
|
56
|
+
spreadsheetId: ubQsWYNGRUq0gFB1sAp2r9oYE19lZ8yGA1T6y0yBoLPW
|
|
57
|
+
columnTypes:
|
|
58
|
+
name: string
|
|
59
|
+
age: number
|
|
60
|
+
birthday: date
|
|
61
|
+
subscribed: boolean
|
|
62
|
+
address: json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Requests
|
|
66
|
+
|
|
67
|
+
Request types:
|
|
68
|
+
- GoogleSheetAppendMany
|
|
69
|
+
- GoogleSheetAppendOne
|
|
70
|
+
- GoogleSheetDeleteOne
|
|
71
|
+
- GoogleSheetGetMany
|
|
72
|
+
- GoogleSheetGetOne
|
|
73
|
+
- GoogleSheetUpdateMany
|
|
74
|
+
- GoogleSheetUpdateOne
|
|
75
|
+
|
|
76
|
+
### GoogleSheetAppendMany
|
|
77
|
+
|
|
78
|
+
The `GoogleSheetAppendMany` request inserts an array of documents as rows in a Google Sheet.
|
|
79
|
+
|
|
80
|
+
#### Properties
|
|
81
|
+
- `rows: object[]`: __Required__ - The rows to insert into the sheet. An an array of objects where keys are the column names and values are the values to insert.
|
|
82
|
+
- `options: object`: Optional settings. Supported settings are:
|
|
83
|
+
- `raw: boolean`: Store raw values instead of converting as if typed into the sheets UI.
|
|
84
|
+
|
|
85
|
+
#### Examples
|
|
86
|
+
|
|
87
|
+
###### Insert a list of rows.
|
|
88
|
+
```yaml
|
|
89
|
+
requests:
|
|
90
|
+
- id: append_rows
|
|
91
|
+
type: GoogleSheetAppendMany
|
|
92
|
+
connectionId: google_sheets
|
|
93
|
+
properties:
|
|
94
|
+
rows:
|
|
95
|
+
- name: D.Va
|
|
96
|
+
role: Tank
|
|
97
|
+
- name: Tracer
|
|
98
|
+
role: Damage
|
|
99
|
+
- name: Genji
|
|
100
|
+
role: Damage
|
|
101
|
+
- name: Reinhart
|
|
102
|
+
role: Tank
|
|
103
|
+
- name: Mercy
|
|
104
|
+
role: Support
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### GoogleSheetAppendOne
|
|
108
|
+
|
|
109
|
+
The `GoogleSheetAppendOne` request inserts a documents as a row in a Google Sheet.
|
|
110
|
+
|
|
111
|
+
#### Properties
|
|
112
|
+
- `row: object`: __Required__ - The row to insert into the sheet. An object where keys are the column names and values are the values to insert.
|
|
113
|
+
- `options: object`: Optional settings. Supported settings are:
|
|
114
|
+
- `raw: boolean`: Store raw values instead of converting as if typed into the sheets UI.
|
|
115
|
+
|
|
116
|
+
#### Examples
|
|
117
|
+
|
|
118
|
+
###### Insert a single row:
|
|
119
|
+
```yaml
|
|
120
|
+
requests:
|
|
121
|
+
- id: insert_dva
|
|
122
|
+
type: GoogleSheetAppendOne
|
|
123
|
+
connectionId: google_sheets
|
|
124
|
+
properties:
|
|
125
|
+
row:
|
|
126
|
+
name: D.Va
|
|
127
|
+
role: Tank
|
|
128
|
+
real_name: Hana Song
|
|
129
|
+
age: 19
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### GoogleSheetDeleteOne
|
|
133
|
+
|
|
134
|
+
The `GoogleSheetDeleteOne` request deletes a row from a Google Sheet. It deletes the first row matched by the filter, written as a MongoDB query expression.
|
|
135
|
+
|
|
136
|
+
#### Properties
|
|
137
|
+
- `filter: object`: __Required__ - A MongoDB query expression to filter the data. The first row matched by the filter will be deleted.
|
|
138
|
+
- `options: object`: Optional settings. Supported settings are:
|
|
139
|
+
- `limit: number`: The maximum number of rows to fetch.
|
|
140
|
+
- `skip: number`: The number of rows to skip from the top of the sheet.
|
|
141
|
+
|
|
142
|
+
#### Examples
|
|
143
|
+
|
|
144
|
+
###### Delete the row where name is "Hanzo".
|
|
145
|
+
```yaml
|
|
146
|
+
requests:
|
|
147
|
+
- id: delete_hanzo
|
|
148
|
+
type: GoogleSheetDeleteOne
|
|
149
|
+
connectionId: google_sheets
|
|
150
|
+
properties:
|
|
151
|
+
filter:
|
|
152
|
+
name:
|
|
153
|
+
$eq: Hanzo
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### GoogleSheetGetMany
|
|
157
|
+
|
|
158
|
+
The `GoogleSheetGetMany` request fetches a number of rows from the spreadsheet. The `limit` and `skip` options can be used to control which documents are read from the spreadsheet. The filter or pipeline options can then be used to filter or transform the fetched data.
|
|
159
|
+
|
|
160
|
+
#### Properties
|
|
161
|
+
- `filter: object`: A MongoDB query expression to filter the data.
|
|
162
|
+
- `pipeline: object[]`: A MongoDB aggregation pipeline to transform the data.
|
|
163
|
+
- `options: object`: Optional settings. Supported settings are:
|
|
164
|
+
- `limit: number`: The maximum number of rows to fetch.
|
|
165
|
+
- `skip: number`: The number of rows to skip from the top of the sheet.
|
|
166
|
+
|
|
167
|
+
#### Examples
|
|
168
|
+
|
|
169
|
+
###### Get the first 10 rows.
|
|
170
|
+
```yaml
|
|
171
|
+
requests:
|
|
172
|
+
- id: get_10_rows
|
|
173
|
+
type: GoogleSheetGetMany
|
|
174
|
+
connectionId: google_sheets
|
|
175
|
+
properties:
|
|
176
|
+
options:
|
|
177
|
+
limit: 10
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
###### Pagination using limit and skip.
|
|
181
|
+
```yaml
|
|
182
|
+
requests:
|
|
183
|
+
- id: get_10_rows
|
|
184
|
+
type: GoogleSheetGetMany
|
|
185
|
+
connectionId: google_sheets
|
|
186
|
+
payload:
|
|
187
|
+
page_size:
|
|
188
|
+
_state: page_size
|
|
189
|
+
page_number:
|
|
190
|
+
_state: page_number
|
|
191
|
+
properties:
|
|
192
|
+
options:
|
|
193
|
+
skip:
|
|
194
|
+
_product:
|
|
195
|
+
- _payload: page_size
|
|
196
|
+
- _subtract:
|
|
197
|
+
- _payload: page_number
|
|
198
|
+
- 1
|
|
199
|
+
limit:
|
|
200
|
+
_payload: page_size
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
###### Get all records where age is greater than 25.
|
|
204
|
+
```yaml
|
|
205
|
+
requests:
|
|
206
|
+
- id: get_10_rows
|
|
207
|
+
type: GoogleSheetGetMany
|
|
208
|
+
connectionId: google_sheets
|
|
209
|
+
properties:
|
|
210
|
+
filter:
|
|
211
|
+
age:
|
|
212
|
+
$gt: 25
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
###### Use an aggregation pipeline to aggregate data.
|
|
216
|
+
```yaml
|
|
217
|
+
requests:
|
|
218
|
+
- id: get_10_rows
|
|
219
|
+
type: GoogleSheetGetMany
|
|
220
|
+
connectionId: google_sheets
|
|
221
|
+
properties:
|
|
222
|
+
pipeline:
|
|
223
|
+
- $group:
|
|
224
|
+
_id: $region
|
|
225
|
+
score:
|
|
226
|
+
$avg: $score
|
|
227
|
+
- $project:
|
|
228
|
+
_id: 0
|
|
229
|
+
region: $_id
|
|
230
|
+
score: 1
|
|
231
|
+
- $sort:
|
|
232
|
+
score: 1
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### GoogleSheetGetOne
|
|
236
|
+
|
|
237
|
+
The `GoogleSheetGetOne` request fetches a single rows from the spreadsheet. The `limit` and `skip` options can be used to control which documents are read from the spreadsheet. The filter option can then be used to filter or select which row is returned.
|
|
238
|
+
|
|
239
|
+
#### Properties
|
|
240
|
+
- `filter: object`: A MongoDB query expression to filter the data.
|
|
241
|
+
- `options: object`: Optional settings. Supported settings are:
|
|
242
|
+
- `limit: number`: The maximum number of rows to fetch.
|
|
243
|
+
- `skip: number`: The number of rows to skip from the top of the sheet.
|
|
244
|
+
|
|
245
|
+
#### Examples
|
|
246
|
+
|
|
247
|
+
###### Get row where name is "Zarya".
|
|
248
|
+
```yaml
|
|
249
|
+
requests:
|
|
250
|
+
- id: get_10_rows
|
|
251
|
+
type: GoogleSheetGetOne
|
|
252
|
+
connectionId: google_sheets
|
|
253
|
+
properties:
|
|
254
|
+
filter:
|
|
255
|
+
name:
|
|
256
|
+
$eq: Zarya
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### GoogleSheetUpdateMany
|
|
260
|
+
|
|
261
|
+
The `GoogleSheetUpdateMany` request updates all the rows matched by the filter.
|
|
262
|
+
|
|
263
|
+
#### Properties
|
|
264
|
+
- `filter: object`: A MongoDB query expression to filter the data. . All rows matched by the filter will be updated.
|
|
265
|
+
- `update: object`: The update to apply to the row. An object where keys are the column names and values are the updated values.
|
|
266
|
+
- `options: object`: Optional settings. Supported settings are:
|
|
267
|
+
- `limit: number`: The maximum number of rows to fetch.
|
|
268
|
+
- `raw: boolean`: Store raw values instead of converting as if typed into the sheets UI.
|
|
269
|
+
- `skip: number`: The number of rows to skip from the top of the sheet.
|
|
270
|
+
|
|
271
|
+
#### Examples
|
|
272
|
+
|
|
273
|
+
###### Update all rows where age is less than 18.
|
|
274
|
+
```yaml
|
|
275
|
+
requests:
|
|
276
|
+
- id: get_10_rows
|
|
277
|
+
type: GoogleSheetUpdateMany
|
|
278
|
+
connectionId: google_sheets
|
|
279
|
+
properties:
|
|
280
|
+
filter:
|
|
281
|
+
age:
|
|
282
|
+
$lt: 18
|
|
283
|
+
update:
|
|
284
|
+
minor: true
|
|
285
|
+
```
|
|
286
|
+
### GoogleSheetUpdateOne
|
|
287
|
+
|
|
288
|
+
The `GoogleSheetUpdateOne` request updates the first row matched by the filter.
|
|
289
|
+
|
|
290
|
+
#### Properties
|
|
291
|
+
- `filter: object`: A MongoDB query expression to filter the data. . The first row matched by the filter will be updated.
|
|
292
|
+
- `update: object`: The update to apply to the row. An object where keys are the column names and values are the updated values.
|
|
293
|
+
- `options: object`: Optional settings. Supported settings are:
|
|
294
|
+
- `limit: number`: The maximum number of rows to fetch.
|
|
295
|
+
- `raw: boolean`: Store raw values instead of converting as if typed into the sheets UI.
|
|
296
|
+
- `skip: number`: The number of rows to skip from the top of the sheet.
|
|
297
|
+
- `upsert: boolean`: Insert the row if no rows are matched by the filter.
|
|
298
|
+
|
|
299
|
+
#### Examples
|
|
300
|
+
|
|
301
|
+
###### Update the row for "Doomfist"
|
|
302
|
+
```yaml
|
|
303
|
+
requests:
|
|
304
|
+
- id: get_10_rows
|
|
305
|
+
type: GoogleSheetUpdateOne
|
|
306
|
+
connectionId: google_sheets
|
|
307
|
+
properties:
|
|
308
|
+
filter:
|
|
309
|
+
name:
|
|
310
|
+
$eq: Doomfist
|
|
311
|
+
update:
|
|
312
|
+
overpowered: true
|
|
313
|
+
```
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Knex
|
|
2
|
+
|
|
3
|
+
[`Knex.js`](http://knexjs.org) is a SQL query builder that can be used to connect to [PostgreSQL](/PostgreSQL), [MS SQL Server](/MSSQL), [MySQL](/MySQL), [MariaDB](/MariaDB), [SQLite](/SQLite), Oracle, and [Amazon Redshift](/AmazonRedshift) databases.
|
|
4
|
+
|
|
5
|
+
The Knex connection can be used to execute raw SQL queries using the `KnexRaw` requests, or the Knex query builder can be used with the `KnexBuilder` request.
|
|
6
|
+
|
|
7
|
+
For more details on specific databases, see the database documentation:
|
|
8
|
+
|
|
9
|
+
## Connections
|
|
10
|
+
|
|
11
|
+
Connection types:
|
|
12
|
+
- Knex
|
|
13
|
+
|
|
14
|
+
### Knex
|
|
15
|
+
|
|
16
|
+
#### Properties
|
|
17
|
+
- `client: enum`: __Required__ - The database client to use. One of:
|
|
18
|
+
- `better-sqlite3`
|
|
19
|
+
- `sqlite` (alias of `better-sqlite3`)
|
|
20
|
+
- `mssql`
|
|
21
|
+
- `mysql2`
|
|
22
|
+
- `oracledb`
|
|
23
|
+
- `postgres`
|
|
24
|
+
- `pg` (alias of `postgres`)
|
|
25
|
+
- `postgresql` (alias of `postgres`)
|
|
26
|
+
- `redshift`
|
|
27
|
+
- `connection: object | string`: __Required__ - Connection string or object to pass to the database client. See the specific client documentation for more details.
|
|
28
|
+
- `searchPath: string`: Set PostgreSQL search path.
|
|
29
|
+
- `version: string`: Set database version.
|
|
30
|
+
- `useNullAsDefault: boolean`: If true, undefined keys are replaced with NULL instead of DEFAULT.
|
|
31
|
+
|
|
32
|
+
#### Examples
|
|
33
|
+
|
|
34
|
+
###### MySQL with connection object:
|
|
35
|
+
```yaml
|
|
36
|
+
connections:
|
|
37
|
+
- id: mysql
|
|
38
|
+
type: Knex
|
|
39
|
+
properties:
|
|
40
|
+
client: mysql2
|
|
41
|
+
connection:
|
|
42
|
+
host:
|
|
43
|
+
_secret: MYSQL_HOST
|
|
44
|
+
user:
|
|
45
|
+
_secret: MYSQL_USER
|
|
46
|
+
database:
|
|
47
|
+
_secret: MYSQL_DB
|
|
48
|
+
password:
|
|
49
|
+
_secret: MYSQL_PASSWORD
|
|
50
|
+
```
|
|
51
|
+
Environment variables:
|
|
52
|
+
```
|
|
53
|
+
LOWDEFY_SECRET_MYSQL_HOST = database.server.com
|
|
54
|
+
LOWDEFY_SECRET_MYSQL_DB = db
|
|
55
|
+
LOWDEFY_SECRET_MYSQL_USER = user
|
|
56
|
+
LOWDEFY_SECRET_MYSQL_PASSWORD = password
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
###### PostgreSQL with secret connection string:
|
|
60
|
+
```yaml
|
|
61
|
+
connections:
|
|
62
|
+
- id: postgres
|
|
63
|
+
type: Knex
|
|
64
|
+
properties:
|
|
65
|
+
client: postgres
|
|
66
|
+
connection:
|
|
67
|
+
_secret: PG_CONNECTION_STRING
|
|
68
|
+
```
|
|
69
|
+
Environment variables:
|
|
70
|
+
```
|
|
71
|
+
LOWDEFY_SECRET_PG_CONNECTION_STRING = postgresql://user:password@database.server.com:5432/db
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Requests
|
|
75
|
+
|
|
76
|
+
Request types:
|
|
77
|
+
|
|
78
|
+
- KnexBuilder
|
|
79
|
+
- KnexRaw
|
|
80
|
+
|
|
81
|
+
### KnexBuilder
|
|
82
|
+
|
|
83
|
+
#### Properties
|
|
84
|
+
|
|
85
|
+
- `query: object[]`: **Required** - SQL query builder array. An array of objects, with a single key which is the name of the knex builder function. The value should be an array of arguments to pass to the builder function.
|
|
86
|
+
- `tableName: string | object`: The name of the table to query from.
|
|
87
|
+
|
|
88
|
+
#### Examples
|
|
89
|
+
|
|
90
|
+
###### Build a query:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
id: knexBuilder
|
|
94
|
+
type: KnexBuilder
|
|
95
|
+
connectionId: knex
|
|
96
|
+
payload:
|
|
97
|
+
name:
|
|
98
|
+
_state: name
|
|
99
|
+
properties:
|
|
100
|
+
query:
|
|
101
|
+
- select:
|
|
102
|
+
- '*'
|
|
103
|
+
- from:
|
|
104
|
+
- users
|
|
105
|
+
- where:
|
|
106
|
+
- name
|
|
107
|
+
- _payload: name
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
###### Using `tableName`:
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
id: knexBuilder
|
|
114
|
+
type: KnexBuilder
|
|
115
|
+
connectionId: knex
|
|
116
|
+
payload:
|
|
117
|
+
name:
|
|
118
|
+
_state: name
|
|
119
|
+
properties:
|
|
120
|
+
tableName: users
|
|
121
|
+
query:
|
|
122
|
+
- select:
|
|
123
|
+
- '*'
|
|
124
|
+
- where:
|
|
125
|
+
- name
|
|
126
|
+
- _payload: name
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
###### Aliases:
|
|
130
|
+
|
|
131
|
+
```yaml
|
|
132
|
+
id: knexBuilder
|
|
133
|
+
type: KnexBuilder
|
|
134
|
+
connectionId: knex
|
|
135
|
+
properties:
|
|
136
|
+
tableName:
|
|
137
|
+
a: tableA
|
|
138
|
+
b: tableB
|
|
139
|
+
query:
|
|
140
|
+
- select:
|
|
141
|
+
- aField: 'a.field'
|
|
142
|
+
- bField: 'b.field'
|
|
143
|
+
- limit:
|
|
144
|
+
- 1
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### KnexRaw
|
|
148
|
+
|
|
149
|
+
#### Properties
|
|
150
|
+
|
|
151
|
+
- `query: string`: **Required** - SQL query string.
|
|
152
|
+
- `parameters: string | number | array | object`: SQL query parameters.
|
|
153
|
+
|
|
154
|
+
#### Examples
|
|
155
|
+
|
|
156
|
+
###### Simple raw query:
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
id: knexRaw
|
|
160
|
+
type: KnexRaw
|
|
161
|
+
connectionId: knex
|
|
162
|
+
properties:
|
|
163
|
+
query: SELECT * FROM "my_table";
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
###### Query with named parameters:
|
|
167
|
+
|
|
168
|
+
```yaml
|
|
169
|
+
id: knexRaw
|
|
170
|
+
type: KnexRaw
|
|
171
|
+
connectionId: knex
|
|
172
|
+
payload:
|
|
173
|
+
selected_name:
|
|
174
|
+
_state: selected_name
|
|
175
|
+
properties:
|
|
176
|
+
query: select * from users where name = :name
|
|
177
|
+
parameters:
|
|
178
|
+
name:
|
|
179
|
+
_payload: selected_name
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
###### Query with positional parameters:
|
|
183
|
+
|
|
184
|
+
```yaml
|
|
185
|
+
id: knexRaw
|
|
186
|
+
type: KnexRaw
|
|
187
|
+
connectionId: knex
|
|
188
|
+
payload:
|
|
189
|
+
selected_name:
|
|
190
|
+
_state: selected_name
|
|
191
|
+
properties:
|
|
192
|
+
query: select * from users where name = ?
|
|
193
|
+
parameters:
|
|
194
|
+
- _payload: selected_name
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
###### Reference a `.sql` file:
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
id: knexRaw
|
|
201
|
+
type: KnexRaw
|
|
202
|
+
connectionId: knex
|
|
203
|
+
properties:
|
|
204
|
+
query:
|
|
205
|
+
_ref: my_query.sql
|
|
206
|
+
```
|