SHOW LINKS
Commands › Looking around · Any caller; rows they are not granted never appear
Lists every declared link that reaches one record: each relation it is the from end of (out) or the to end of (in), its host when it is OF another entity BY a column, and the records that are OF it. Per link it gives how many records are on the other end and a sample of them.
Syntax
SHOW LINKS OF <Entity> '<key>' [ LIMIT <n> ]
SHOW LINKS OF clean.<source>.<table> '<_id>' [ LIMIT <n> ]
Parameters
| Parameter | Description |
|---|---|
<Entity> | A model entity with records of its own. |
'<key>' | The record's key, as a quoted string. A bare whole number is also accepted. |
clean.<source>.<table> '<_id>' | A group of a cleaned table: the links of its member rows. The result has one more column, links. |
LIMIT <n> | The sample size per link, at least 1. The default is 20 and the most is 200. |
Usage notes
- Columns:
link(the relation or host name),direction(outorin),verb,other(the entity on the other end),count,sample(keys and titles of records on the other end). - Every count and sample is a
SELECTrun as the caller, so a caller sees exactly the links aSELECTof their own would find. - The MCP
querytool runs this statement. - To read the linked rows in full, walk the relation with JOIN.
Examples
SHOW LINKS OF Customer 'acme' LIMIT 5
| link | direction | verb | other | count | sample |
|---|---|---|---|---|---|
| placed | out | places | Order | 41 | PO-1042 (Pallets), PO-1017 (Racking), ... |
| supplies | in | supplies | Supplier | 2 | S-7 (Northwind), S-12 (Contoso) |
SHOW LINKS OF clean.crm.account 'acme corp'
Not supported
| Refused | Write instead |
|---|---|
| A record named without a key | SHOW LINKS OF <Entity> '<key>' |
LIMIT 0 | A sample of at least 1 |
-- Refused by the engine
SHOW LINKS OF Customer
-- Refused by the engine
SHOW LINKS OF Customer 'acme' LIMIT 0
See also
SHOW LINEAGE · SHOW RECORDS · SHOW MODEL · CREATE RELATION · JOIN