dbsync_srvapp.is_row_referenced()
Checks if a given row is still referenced in other tables by foreign key.
Syntax
FUNCTION is_row_referenced(
table_name STRING,
jo_data util.JSONObject
)
RETURNS BOOLEAN
- table_name is the table referenced by other tables.
- jo_data is the primary key value of the row to check (JSON).
Returns:
- TRUE if row is still referenced.
Usage
Before deleting a row in the server app, use this function to check if the row is still used, and warn the end user that the row cannot be deleted.