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

◆ DataContext()

template<EntityValueType ENTITY>
sqt::DataContext< ENTITY >::DataContext ( std::shared_ptr< sqt::Database > database)
explicitnoexcept

Constructs an instance using the specified shared database.

Parameters
databaseThe shared database instance to be used by the constructed instance.

The associated database table is not initialized (i.e., created or altered) during construction. It will be automatically initialized when the first CRUD operation is executed.

To initialize the table explicitly before performing any operations, call the InitializeTable() method.

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