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

◆ MakeNoPrimaryKeyUpdater()

template<EntityValueType ENTITY>
template<ConflictAction CONFLICT_ACTION = ConflictAction::Abort>
requires PrimaryKeyEntityValueType<ENTITY>
constexpr auto sqt::DataContext< ENTITY >::MakeNoPrimaryKeyUpdater ( )
staticconstexprnoexcept

Creates an updater for updating non-primary key columns in the database table.

Template Parameters
CONFLICT_ACTIONThe conflict action to be used when an unique constraint violation occurs. The default action is sqt::ConflictAction::Abort.
Returns
A new updater instance.

This method is similar to the MakeUpdater() method, except that it updates only the non-primary key columns of the entity type. It is typically used when updating the entity by its primary key value, reducing the unnecessary overhead of updating the primary key columns.

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.
See also
sqt::DataContext<>::MakeUpdater()
sqt::DataContext<>::MakeUpdater(ASSIGNMENTS&&... assignments)
SQT_PRIMARY_KEY
SQT_PRIMARY_KEY_AUTO_INC