Database
Queries, inserts, updates, and deletes data in a database. SQL databases (MySQL, PostgreSQL, SQLite, ODBC) and the Firebase Realtime Database are supported, and connections are registered in Settings > Database (Part 6). See Appendix B for preparing Firebase.
Database
Select the database to use. The SQL fields or the Firebase fields below are shown according to the type of the selected database.
SQL databases
Command
- Login (default): Logs in to the database.
- Execute Query: Runs an SQL query to query, insert, update, or delete data.
- Logout: Logs out of the database.
Query
Enter the SQL query to run (for example, SELECT * FROM users WHERE id = 1). Variable values can be composed with expressions in the block editor. Displayed only when Command is Execute Query.
Response
Select a Text variable to store the query response. Displayed only when Command is Execute Query.
Firebase database
Command
- Read (default): Reads the data at the path into a variable.
- Write: Writes data to the path.
- Delete: Deletes the data at the path.
Path
Enter the path of a node (key) inside the database (for example, /users/123/status). The root is /; this is not a file path.
Value
For Read, select the variable that receives the data; variables of every type can be selected. For Write, enter the data in the format of the Value Type. Not displayed when Command is Delete.
Value Type
Select the type of the data to write: Digital (default), Number, Text, Date, Time, Duration, Byte Array, or Color. Displayed only when Command is Write.