mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibSQL: Add 'schema' and 'table' to TupleElementDescriptor
These are needed to distinguish columns from different tables with the same column name in one and the same (joined) Tuple. Not quite happy yet with this API; I think some sort of hierarchical structure would be better but we'll burn that bridge when we get there :^)
This commit is contained in:
parent
c2c47fb9bb
commit
7ea54db430
7 changed files with 27 additions and 25 deletions
|
@ -118,7 +118,7 @@ NonnullRefPtr<TupleDescriptor> IndexDef::to_tuple_descriptor() const
|
|||
{
|
||||
NonnullRefPtr<TupleDescriptor> ret = adopt_ref(*new TupleDescriptor);
|
||||
for (auto& part : m_key_definition) {
|
||||
ret->append({ part.name(), part.type(), part.sort_order() });
|
||||
ret->append({ "", "", part.name(), part.type(), part.sort_order() });
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ NonnullRefPtr<TupleDescriptor> TableDef::to_tuple_descriptor() const
|
|||
{
|
||||
NonnullRefPtr<TupleDescriptor> ret = adopt_ref(*new TupleDescriptor);
|
||||
for (auto& part : m_columns) {
|
||||
ret->append({ part.name(), part.type(), Order::Ascending });
|
||||
ret->append({ parent()->name(), name(), part.name(), part.type(), Order::Ascending });
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue