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

◆ Prepare()

template<EntityValueType ENTITY>
template<QuerierType QUERIER>
Executor< QUERIER > sqt::DataContext< ENTITY >::Prepare ( const QUERIER & querier)
nodiscard

Creates an executor for executing the specified querier.

Template Parameters
QUERIERThe type of the querier.
Parameters
querierThe querier instance to execute.
Returns
A new executor instance for the specified querier.
Exceptions
sqt::SQLErrorThrown if an error occurs during the creation of the executor.

This method is used to execute queriers created by the Make*() methods. It prepares the corresponding SQL statement for the querier and binds all inline parameters in the querier to the statement. The returned executor can then be used to bind placeholder parameters and execute the statement.

For more information about using the executor, refer to the sqt::Executor<> class.

Calling this method will initialize the associated database table.

See also
sqt::DataContext<>::InitializeTable()
sqt::Executor<>
sqt::QuerierType