13 if (res_future.get()) {
14 bool res =
commit(std::move(t));
18 bool aborted =
abort(std::move(t));
static std::atomic< uint64_t > next_id_
Stores the next available Transaction ID, stored atomically to prevent race conditions
virtual std::unique_ptr< Transaction > begin_transaction()=0
Returns a new Scheduler::Transaction object that is passed along when scheduling commands.
virtual bool commit(std::unique_ptr< Transaction > t)=0
Closes the given Scheduler::Transaction and commits its changes.
bool autocommit(std::unique_ptr< ast::Command > command, Diagnostic &diag)
Schedule a ast::Command for execution and automatically commits its changes.
virtual bool abort(std::unique_ptr< Transaction > t)=0
Closes the given Scheduler::Transaction and discards its changes.
virtual std::future< bool > schedule_command(Transaction &t, std::unique_ptr< ast::Command > command, Diagnostic &diag)=0
Schedule a ast::Command for execution within the given Scheduler::Transaction.