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

◆ SelectAll()

template<EntityValueType ENTITY>
std::vector< ENTITY > sqt::DataContext< ENTITY >::SelectAll ( )

Retrieves all entities from the database table.

Returns
A container holding all entities in the table.
Exceptions
sqt::SQLErrorThrown if the selection fails.

This method retrieves all entities into a container. Be aware that this may result in high memory consumption if the table contains a large number of rows. To mitigate this, consider using the MakeSelecter() method from the complex style interface to control the selection progress manually.

For more control over which entities to retrieve, use the following alternatives:

  • Select() for retrieving a single entity by the specified primary key value.
  • MakeSelecter() for creating a selecter that can be applied with custom conditions.
See also
sqt::DataContext<>::MakeSelecter()
sqt::DataContext<>::MakeSelecter(const COLUMNS&... columns)
sqt::DataContext<>::Select()