SQT
A C++ ORM framework for SQLite
Loading...
Searching...
No Matches

◆ ExecuteSQL()

void sqt::Database::ExecuteSQL ( std::string_view sql)

Executes the specified SQL statement.

Parameters
sqlThe SQL statement to execute.
Exceptions
sqt::SQLErrorThrown if fails to execute the SQL statement.

This method is equivalent to calling:

auto statement = PrepareStatement(sql);
statement.Step();
Statement PrepareStatement(std::string_view sql)
Prepares the specified SQL statement.
Definition database.cpp:59

A statement is created and destroyed every time this method is called. If the same SQL statement needs to be executed multiple times in a batch operation, consider using PrepareStatement and reuse the returned statement instance.

See also
sqt::Database::PrepareStatement()