Performs a Database connection (possibly in another thread) and returns the constructed DormDB handle once connected.
Database operation to INSERT a single value or multiple values when a slice is passed into insert.
This function executes a raw SQL statement.
Deletes the given model instance from the database.
Returns a builder struct that can be used to perform a DELETE statement in the SQL database on the provided Model table.
Deletes the given model instance from the database.
Starts a database transaction, on which most operations can be called.
Returns a builder struct that can be used to perform an UPDATE statement in the SQL database on the provided Model table.
High-level wrapper around a database. Through the driver implementation layer this handles connection pooling and distributes work across a thread pool automatically.
Use the (UFCS) methods
- select - update - insert
to access the database.
This struct cannot be copied, to pass it around, use ref or move. Once the struct goes out of scope or gets unset, the connection to the database will be freed.