heading(a)
Returns the heading {attr, type} for a as a relation.
Examples
Relation
heading($S)
| attr | type |
|---|---|
| SNO | str |
| SNAME | str |
| STATUS | int |
| CITY | str |
Schema/Tuple
heading(schema)
| type | attr |
|---|---|
| {name:str,rule:str} | $constraint |
| {SNO:str,SNAME:str,STATUS:int,CITY:str} | $S |
| {PNO:str,PNAME:str,COLOR:str,WEIGHT:int,CITY:str} | $P |
| {SNO:str,PNO:str,QTY:int} | $SP |
| {name:str,message:str} | error |
Find the names of the variables in the current schema
heading(schema){attr}
| attr |
|---|
| $P |
| $S |
| $SP |
| $constraint |
| error |