1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +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:
Jan de Visser 2021-11-02 16:39:00 -04:00 committed by Andreas Kling
parent c2c47fb9bb
commit 7ea54db430
7 changed files with 27 additions and 25 deletions

View file

@ -124,8 +124,8 @@ void insert_into_and_scan_hash_index(int);
NonnullRefPtr<SQL::HashIndex> setup_hash_index(SQL::Serializer& serializer)
{
NonnullRefPtr<SQL::TupleDescriptor> tuple_descriptor = adopt_ref(*new SQL::TupleDescriptor);
tuple_descriptor->append({ "key_value", SQL::SQLType::Integer, SQL::Order::Ascending });
tuple_descriptor->append({ "text_value", SQL::SQLType::Text, SQL::Order::Ascending });
tuple_descriptor->append({ "schema", "table", "key_value", SQL::SQLType::Integer, SQL::Order::Ascending });
tuple_descriptor->append({ "schema", "table", "text_value", SQL::SQLType::Text, SQL::Order::Ascending });
auto directory_pointer = serializer.heap().user_value(0);
if (!directory_pointer) {