DormTransaction

Wrapper around a Database transaction. Most methods that can be used on a DormDB can also be used on a transaction.

Performs a rollback when going out of scope and wasn't committed or rolled back explicitly.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

commit
void commit()

Commits this transaction, so the changes are recorded to the current database state.

insert
void insert(T value)
void insert(T[] value)

Transacted variant of DormDB.insert. Can insert a single value or multiple values at once.

rawSQL
RawSQLIterator rawSQL(const(char)[] queryString, ffi.FFIValue[] bindParams)

This function executes a raw SQL statement.

remove
RemoveOperation!T remove()

Returns a builder struct that can be used to perform a DELETE statement in the SQL database on the provided Model table.

remove
bool remove(T instance)
bool remove(TPatch instance)

Deletes the given model instance from the database inside the transaction.

rollback
void rollback()

Rolls back this transaction, so the DB changes are reverted to before the transaction was started.

update
UpdateOperation!T update()

Returns a builder struct that can be used to perform an update statement in the SQL database on the provided Model table.

Meta