Smart foreign-key display values
◐ in progressHelp foreign keys show the human-friendly value behind the id, not just another opaque number.
Foreign keys are useful to the database but not always kind to human eyes. An
OwnerId of 48213 tells you nothing; “Acme
Corp” tells you everything. SQLly works out the likely
human-friendly display value for each relationship so the id can
show its meaning.
How the display column is guessed
From the schema itself, not from a hard-coded list of column names. SQLly follows the declared foreign key to the referenced table and looks for the column most likely to be what a person would recognise - a short, unique, human-readable text column in preference to a code, a timestamp, or another key. Where no formal key is declared, name-inferred relationships fill in.
Where it shows up today
- The row editor - already live. A foreign-key field offers searchable referenced values, so you pick “Acme Corp” and SQLly stores the id.
- Completion - already live where you have configured it, via FK / name interchangeability: type the name in a
WHEREclause and get the id. - The result grid - the remaining work. Bringing the name alongside the id in a grid cell means fetching the referenced values for the rows on screen, on a background task, without turning one query into hundreds.
In progress. The relationship model and the display-value resolution exist and are used by the row editor; the grid rendering path is what is still being built.