dbsync_app.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
  1. table_name is the table referenced by other tables.
  2. jo_data is the primary key value of the row to check (JSON).
Returns:
  1. TRUE if row is still referenced.

Usage

Before deleting a row in the DB Sync client app, use this function to check if the row is still used, and warn the end user that the row cannot be deleted.