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

◆ DeleteAll()

template<EntityValueType ENTITY>
std::size_t sqt::DataContext< ENTITY >::DeleteAll ( )

Deletes all rows from the database table.

Returns
The number of rows deleted.
Exceptions
sqt::SQLErrorThrown if the deletion fails.

This method empties the entire table. For more control over which rows to delete, use the following alternatives:

  • Delete() for deleting a row by the specified primary key value.
  • MakeDeleter() for creating a deleter that can be applied with custom conditions.
See also
sqt::DataContext<>::Delete()
sqt::DataContext<>::MakeDeleter()