Deletes a row by the specified primary key value from the database table.
- Parameters
-
| primary_key | The primary key value of the row to be deleted. |
- Returns
- true if the row was deleted; otherwise, false if the row with the specified primary key value does not exist.
- Exceptions
-
- Note
- This method is only available if the entity type has a primary key. Use the SQT_PRIMARY_KEY or SQT_PRIMARY_KEY_AUTO_INC macro to define a primary key.
For more control over the conditions of which rows to delete, use the MakeDeleter() method from the complex style interface to create a deleter and apply custom conditions.
- See also
- sqt::DataContext<>::DeleteAll()
-
sqt::DataContext<>::MakeDeleter()
-
SQT_PRIMARY_KEY
-
SQT_PRIMARY_KEY_AUTO_INC