mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
LibSQL: Allow expressions and column names in SELECT ... FROM
Up to now the only ``SELECT`` statement that worked was ``SELECT * FROM <table>``. This commit allows a column list consisting of column names and expressions in addition to ``*``. ``WHERE`` still doesn't work though.
This commit is contained in:
parent
f33a288ca4
commit
fe50598a03
8 changed files with 90 additions and 20 deletions
|
@ -298,7 +298,7 @@ private:
|
|||
struct ExecutionContext {
|
||||
NonnullRefPtr<Database> database;
|
||||
RefPtr<SQLResult> result { nullptr };
|
||||
Tuple current_row {};
|
||||
Tuple* current_row { nullptr };
|
||||
};
|
||||
|
||||
class Expression : public ASTNode {
|
||||
|
@ -429,6 +429,7 @@ public:
|
|||
const String& schema_name() const { return m_schema_name; }
|
||||
const String& table_name() const { return m_table_name; }
|
||||
const String& column_name() const { return m_column_name; }
|
||||
virtual Value evaluate(ExecutionContext&) const override;
|
||||
|
||||
private:
|
||||
String m_schema_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue