execute-sql
Configuration options
Core structure
Other options
Considerations
Examples and code snippets
Execute SQL statements to update & delete
title: Create Tag
type: jig.default
icon: checklist
actions:
- children:
- type: action.action-list
options:
title: Create Tag
isSequential: true
actions:
# Create the tags record in the local SQLite table,
# by writing a SQL statement to insert the record,
# and parameters defining the record's data.
- type: action.execute-sql
options:
statements:
- statement: |
INSERT INTO tags (id, data)
VALUES (@id, @data)
parameters:
data: |
={
"name": @ctx.components.name.state.value,
"description": @ctx.components.description.state.value,
"count": 0
}
id: [email protected]
entities:
- tags
- type: action.go-back
# Configure a form to capture the tag details.
children:
- type: component.form
instanceId: tag-form
options:
isDiscardChangesAlertEnabled: false
children:
- type: component.text-field
instanceId: id
options:
label: Id
style:
isDisabled: true
value: "=$base64encode(@ctx.components.name.state.value ?
@ctx.components.name.state.value : '')"
- type: component.text-field
instanceId: name
options:
label: Name
- type: component.text-field
instanceId: description
options:
label: DescriptionExecute SQL statements to create indexes
Last updated
Was this helpful?