1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

LibSQL: Store selected column names in the results for SELECT statements

This commit is contained in:
Timothy Flynn 2023-02-03 09:58:38 -05:00 committed by Andreas Kling
parent 198f2945bf
commit f0441ee16a
2 changed files with 49 additions and 4 deletions

View file

@ -25,7 +25,14 @@ public:
{
}
ALWAYS_INLINE ResultSet(SQLCommand command, Vector<DeprecatedString> column_names)
: m_command(command)
, m_column_names(move(column_names))
{
}
SQLCommand command() const { return m_command; }
Vector<DeprecatedString> const& column_names() const { return m_column_names; }
void insert_row(Tuple const& row, Tuple const& sort_key);
void limit(size_t offset, size_t limit);
@ -34,6 +41,7 @@ private:
size_t binary_search(Tuple const& sort_key, size_t low, size_t high);
SQLCommand m_command { SQLCommand::Unknown };
Vector<DeprecatedString> m_column_names;
};
}