diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-02-10 14:53:51 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-10 23:11:13 +0100 |
commit | df2ddcafd4ac0de163a80e357f83a64dce698fb9 (patch) | |
tree | 872385e7e700ef86180a64bc7dfe55daa9293f60 /Userland | |
parent | f3c6cb40d720039e87b331a9762eb74ebd42166e (diff) | |
download | serenity-df2ddcafd4ac0de163a80e357f83a64dce698fb9.zip |
LibSQL: Remove the now-unused ExecutionContext::result object
The INSERT and SELECT statements set up this object for any expression
evaluation to indicate errors. This is no longer needed.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibSQL/AST/AST.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibSQL/AST/Insert.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibSQL/AST/Select.cpp | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibSQL/AST/Statement.cpp | 2 |
4 files changed, 1 insertions, 5 deletions
diff --git a/Userland/Libraries/LibSQL/AST/AST.h b/Userland/Libraries/LibSQL/AST/AST.h index 8f646ba25f..ed07b69c0b 100644 --- a/Userland/Libraries/LibSQL/AST/AST.h +++ b/Userland/Libraries/LibSQL/AST/AST.h @@ -299,7 +299,6 @@ private: struct ExecutionContext { NonnullRefPtr<Database> database; - Optional<Result> result; class Statement const* statement; Tuple* current_row { nullptr }; }; diff --git a/Userland/Libraries/LibSQL/AST/Insert.cpp b/Userland/Libraries/LibSQL/AST/Insert.cpp index 7490a8fb6b..48ae68b73a 100644 --- a/Userland/Libraries/LibSQL/AST/Insert.cpp +++ b/Userland/Libraries/LibSQL/AST/Insert.cpp @@ -39,8 +39,6 @@ ResultOr<ResultSet> Insert::execute(ExecutionContext& context) const ResultSet result { SQLCommand::Insert }; TRY(result.try_ensure_capacity(m_chained_expressions.size())); - context.result = Result { SQLCommand::Insert }; - for (auto& row_expr : m_chained_expressions) { for (auto& column_def : table_def->columns()) { if (!m_column_names.contains_slow(column_def.name())) diff --git a/Userland/Libraries/LibSQL/AST/Select.cpp b/Userland/Libraries/LibSQL/AST/Select.cpp index 91a7824853..8238c2b1d5 100644 --- a/Userland/Libraries/LibSQL/AST/Select.cpp +++ b/Userland/Libraries/LibSQL/AST/Select.cpp @@ -48,7 +48,6 @@ ResultOr<ResultSet> Select::execute(ExecutionContext& context) const } } - context.result = Result { SQLCommand::Select }; ResultSet result { SQLCommand::Select }; auto descriptor = adopt_ref(*new TupleDescriptor); diff --git a/Userland/Libraries/LibSQL/AST/Statement.cpp b/Userland/Libraries/LibSQL/AST/Statement.cpp index 876d35601a..fc3cd34087 100644 --- a/Userland/Libraries/LibSQL/AST/Statement.cpp +++ b/Userland/Libraries/LibSQL/AST/Statement.cpp @@ -13,7 +13,7 @@ namespace SQL::AST { ResultOr<ResultSet> Statement::execute(AK::NonnullRefPtr<Database> database) const { - ExecutionContext context { move(database), {}, this, nullptr }; + ExecutionContext context { move(database), this, nullptr }; return execute(context); } |