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

◆ PrepareStatement()

Statement sqt::Database::PrepareStatement ( std::string_view sql)

Prepares the specified SQL statement.

Parameters
sqlThe SQL statement to prepare.
Returns
A prepared sqt::Statement instance. The instance is valid until the current database is destroyed.
Exceptions
sqt::SQLErrorThrown if fails to prepare the SQL statement.

Consider reusing the returned statement instance for the same SQL statement in a batch operation to gain the best performance.