/* * Copyright (c) 2021, Jan de Visser * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include namespace SQL::AST { ResultOr Statement::execute(AK::NonnullRefPtr database, ReadonlySpan placeholder_values) const { ExecutionContext context { move(database), this, placeholder_values, nullptr }; auto result = TRY(execute(context)); // FIXME: When transactional sessions are supported, don't auto-commit modifications. TRY(context.database->commit()); return result; } }