Actions4
Delete
AI-generatedOverview
This node performs a delete operation on a specified table in an OceanBase database. It deletes records based on a key-value pair provided by the user. This is useful for scenarios where you need to remove specific entries from a database table, such as deleting a user by their ID or removing outdated records.
Use Case Examples
- Deleting a user from the 'users' table where the user ID matches a given value.
- Removing a product from the 'inventory' table based on a product code.
Properties
| Name | Meaning |
|---|---|
| Table | Name of the table to operate on, required to specify which table the delete operation targets. |
| Delete Key | The key (column name) used to find the record to delete, e.g., 'ID' or 'user_id'. |
| Delete Value | The value corresponding to the delete key to identify the specific record to delete. |
| Options | Additional options for the delete operation, including query parameters and fields to return. |
Output
JSON
affectedRows- Number of rows affected by the delete operation.insertId- Insert ID if applicable (usually null for delete).pairedItemitem- Index of the input item that the output corresponds to.
Dependencies
- OceanBase database connection using credentials with host, port, database, user, and password.
Troubleshooting
- Common issues include incorrect table name, delete key, or delete value leading to no rows being deleted.
- Errors may occur if the database connection fails or if the SQL syntax is incorrect.
- If the node throws an 'Unknown operation' error, ensure the operation parameter is set to 'delete'.
- To resolve connection issues, verify the credentials and network access to the OceanBase database.