| std::int64_t sqt::DataContext< ENTITY >::Replace | ( | const ENTITY & | entity | ) |
Inserts the specified entity into the database table, replacing the existing row.
| entity | The entity to be inserted. |
| sqt::SQLError | Thrown if the insertion fails. |
This method is similar to the Insert() method, except that it replaces the existing row if an unique constraint violation occurs.
To automatically generate the primary key value, use AutoIncReplace() method instead.
For more control over the inserted columns, use the more flexible MakeReplacer(ASSIGNMENTS&&...) method from the complex style interface.