mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
LibSQL: Copy SQL::Value instances less frequently (which may be vectors)
This commit is contained in:
parent
5f549fe5d9
commit
c0b54f18b5
3 changed files with 10 additions and 8 deletions
|
@ -40,12 +40,13 @@ ResultOr<Value> NestedExpression::evaluate(ExecutionContext& context) const
|
|||
|
||||
ResultOr<Value> ChainedExpression::evaluate(ExecutionContext& context) const
|
||||
{
|
||||
Value ret(SQLType::Tuple);
|
||||
Vector<Value> values;
|
||||
TRY(values.try_ensure_capacity(expressions().size()));
|
||||
|
||||
for (auto& expression : expressions())
|
||||
values.append(TRY(expression.evaluate(context)));
|
||||
ret = values;
|
||||
return ret;
|
||||
values.unchecked_append(TRY(expression.evaluate(context)));
|
||||
|
||||
return Value { move(values) };
|
||||
}
|
||||
|
||||
ResultOr<Value> BinaryOperatorExpression::evaluate(ExecutionContext& context) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue