|
staticconstexprnoexcept |
Creates an inserter for inserting an entire entity into the database table.
| CONFLICT_ACTION | The conflict action to be used when a unique constraint violation occurs. The default action is sqt::ConflictAction::Abort. |
The returned inserter corresponds to an INSERT SQL statement that inserts all columns of the entity into the database table. The following alternatives provide more control over the inserted columns:
The MakeReplacer() method is a shorthand for MakeInserter<sqt::ConflictAction::Replace>().
A placeholder for the entity is implicitly added to the returned inserter. To execute the inserter, an entity instance must be bound. The following code demonstrates how to use the inserter:
For an easier-to-use method, use the Insert() method from the easy style interface.