internally using real column name and alias is for external api only

This commit is contained in:
Priec
2026-08-08 14:00:41 +02:00
parent 751bfd9226
commit 58b7d0b5fb
2 changed files with 6 additions and 4 deletions

View File

@@ -6,6 +6,9 @@ pub struct RelationshipHop {
pub from_table: String,
pub to_table: String,
pub fk_source_table: String,
/// The link column's real name, the one the database answers to. Aliases
/// change; a path stored in aliases would have to be rewritten every time
/// one did, and it is read straight into SQL.
pub fk_column: String,
}
@@ -13,9 +16,8 @@ pub struct RelationshipHop {
pub struct RelationshipLink {
pub source_table: String,
pub target_table: String,
/// The column carrying the link, which is the name it was given. A table
/// may link to one target several times, so the target's name does not
/// identify the column.
/// The link column's real name. A table may link to one target several
/// times, so the target's name does not identify the column.
pub fk_column: String,
}