1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 13:44:58 +00:00
serenity/Userland/Libraries/LibSQL/AST/Statement.cpp
Timothy Flynn 6620f19979 LibSQL+SQLServer: Return the new Result class from statement executions
We can now TRY anything that returns a SQL::Result or an AK::Error.
2022-02-10 12:20:35 +00:00

20 lines
412 B
C++

/*
* Copyright (c) 2021, Jan de Visser <jan@de-visser.net>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibSQL/AST/AST.h>
#include <LibSQL/Database.h>
#include <LibSQL/Meta.h>
#include <LibSQL/Row.h>
namespace SQL::AST {
Result Statement::execute(AK::NonnullRefPtr<Database> database) const
{
ExecutionContext context { move(database), {}, this, nullptr };
return execute(context);
}
}