Find referenced object
find_refLocate the table holding a UUID as its primary key when no foreign key link exists. Searches the hint table, column-named tables, then all tables.
Instructions
Find which table holds a UUID value as its primary key — for schemas that store references as UUIDs without foreign keys (1C-style Ref keys, columns like SenderAddress or Owner_Ref). Use it when describe shows no fk for a column whose values are UUIDs; use describe fk + query instead when real foreign keys exist. Searches tables whose single-column primary key can hold a UUID: the hint table first, then tables named like the column (SenderAddress → …Addresses), then all of them. Returns matches[N]{table,pk,label} (label = Description/Name/Number/Code of the row) and found_by, or searched_tables when nothing matched. On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | No | Optional: value of a sibling type column such as Owner_TRef = 'Catalog.Counterparties'. | |
| table | No | Optional: table the value was read from (improves the guess and is remembered). | |
| value | Yes | The UUID to look up, e.g. 7e6056b9-9582-11f1-a74c-005056bd6036. | |
| column | No | Optional: column the value was read from, e.g. SenderAddress. | |
| database | No | Optional database to use instead of the connection's default (names from `databases`). Omit to use the default. | |
| connection | Yes | Connection name exactly as returned by `connections` (e.g. "shop"). Unknown or unexposed names return an error. |