Actions4
Update
AI-generatedOverview
This node performs an update operation on a specified table in an OceanBase database. It updates fields of a record identified by a key-value pair. This is useful for modifying existing data in a database table based on a unique identifier or key. For example, updating a user's email address or name in a user table by specifying the user ID as the key.
Use Case Examples
- Updating a user's name and email in the 'users' table where the user ID matches a given value.
- Modifying product details in an inventory table by specifying the product ID.
Properties
| Name | Meaning |
|---|---|
| Table | Name of the table to operate on, required to specify which table to update. |
| Update Key | Key name to find the record to update, e.g., 'ID' or primary key column. |
| Update Value | Key value to find the record to update, e.g., the specific ID value. |
| Fields to Update | Fields and their new values to update in the format 'field1=value1,field2=value2'. |
| Options.queryParameters | Optional SQL query parameters separated by commas, used as placeholders in the query. |
| Options.returnFields | Fields to return after the update, separated by commas. Defaults to all fields ('*'). |
Output
JSON
json- Contains the updated record(s) or the result of the update operation, including affected rows and insert ID if applicable.
Dependencies
- OceanBase database connection using credentials with host, port, database, user, and password.
Troubleshooting
- Ensure the 'Table' name is correct and exists in the database to avoid SQL errors.
- Verify that 'Update Key' and 'Update Value' correctly identify the record to update; otherwise, no records will be modified.
- Check the format of 'Fields to Update' to be 'field1=value1,field2=value2' without syntax errors.
- If the node throws 'Unknown operation' error, confirm the operation parameter is set to 'update'.
- Database connection issues may arise if credentials are incorrect or the database is unreachable.