mirror of
https://github.com/RGBCube/serenity
synced 2025-07-22 22:37:40 +00:00
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.
This commit is contained in:
parent
f3c6cb40d7
commit
df2ddcafd4
4 changed files with 1 additions and 5 deletions
|
@ -299,7 +299,6 @@ private:
|
||||||
|
|
||||||
struct ExecutionContext {
|
struct ExecutionContext {
|
||||||
NonnullRefPtr<Database> database;
|
NonnullRefPtr<Database> database;
|
||||||
Optional<Result> result;
|
|
||||||
class Statement const* statement;
|
class Statement const* statement;
|
||||||
Tuple* current_row { nullptr };
|
Tuple* current_row { nullptr };
|
||||||
};
|
};
|
||||||
|
|
|
@ -39,8 +39,6 @@ ResultOr<ResultSet> Insert::execute(ExecutionContext& context) const
|
||||||
ResultSet result { SQLCommand::Insert };
|
ResultSet result { SQLCommand::Insert };
|
||||||
TRY(result.try_ensure_capacity(m_chained_expressions.size()));
|
TRY(result.try_ensure_capacity(m_chained_expressions.size()));
|
||||||
|
|
||||||
context.result = Result { SQLCommand::Insert };
|
|
||||||
|
|
||||||
for (auto& row_expr : m_chained_expressions) {
|
for (auto& row_expr : m_chained_expressions) {
|
||||||
for (auto& column_def : table_def->columns()) {
|
for (auto& column_def : table_def->columns()) {
|
||||||
if (!m_column_names.contains_slow(column_def.name()))
|
if (!m_column_names.contains_slow(column_def.name()))
|
||||||
|
|
|
@ -48,7 +48,6 @@ ResultOr<ResultSet> Select::execute(ExecutionContext& context) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
context.result = Result { SQLCommand::Select };
|
|
||||||
ResultSet result { SQLCommand::Select };
|
ResultSet result { SQLCommand::Select };
|
||||||
|
|
||||||
auto descriptor = adopt_ref(*new TupleDescriptor);
|
auto descriptor = adopt_ref(*new TupleDescriptor);
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace SQL::AST {
|
||||||
|
|
||||||
ResultOr<ResultSet> Statement::execute(AK::NonnullRefPtr<Database> database) const
|
ResultOr<ResultSet> Statement::execute(AK::NonnullRefPtr<Database> database) const
|
||||||
{
|
{
|
||||||
ExecutionContext context { move(database), {}, this, nullptr };
|
ExecutionContext context { move(database), this, nullptr };
|
||||||
return execute(context);
|
return execute(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue