|
|
| DatabaseCore () |
| | Constructs a new Database object.
|
|
| DatabaseCore (db::CommandGeneratorFactory factory) |
| | Constructs a database with an application-supplied backend registry.
|
|
| DatabaseCore (const DatabaseCore &)=delete |
|
| DatabaseCore (DatabaseCore &&)=delete |
|
auto | operator= (const DatabaseCore &) -> DatabaseCore &=delete |
|
auto | operator= (DatabaseCore &&) -> DatabaseCore &=delete |
| auto | connect (const std::string &connectionString) -> void |
| | Connects to a database.
|
|
auto | connect (db::BackendType requestedBackend, const std::string &connectionString) -> void |
| | Connects using an explicitly selected registered backend.
|
|
auto | disconnect () -> void |
| | Disconnects from the database.
|
| auto | getBackendType () const noexcept -> db::BackendType |
| | Get the backend type of the database.
|
|
auto | isConnected () const noexcept -> bool |
| | Returns whether a backend session is currently open.
|
| auto | getBackendCapabilities () const -> const db::BackendCapabilities & |
| | Returns the capabilities advertised by the connected backend.
|
|
auto | beginTransaction () -> void |
| | Starts a transaction.
|
|
auto | commitTransaction () -> void |
| | Commits a transaction.
|
|
auto | rollbackTransaction () -> void |
| | Rollbacks a transaction.
|
|
| template<typename SchemaType, typename T> |
| auto | selectImpl (Query< T > &query) -> std::vector< T > |
| | Executes a select query and returns the result.
|
| template<typename SchemaType, typename Source, typename Result> |
| auto | selectImpl (ProjectionQuery< Source, Result > &query) -> std::vector< Result > |
| | Executes a projection select query and returns DTO results.
|
| template<typename SchemaType, typename T> |
| auto | insertImpl (const std::vector< T > &objects) -> void |
| | Executes a insert query for multiple objects.
|
| template<typename SchemaType, typename T> |
| auto | insertImpl (T object) -> void |
| | Executes a insert query for a single object.
|
| template<typename SchemaType, typename T> |
| auto | updateImpl (const Update< T > &update) -> std::size_t |
| | Executes an update query.
|
| template<typename SchemaType, typename T> |
| auto | removeImpl (const query::Predicate &predicate) -> std::size_t |
| | Executes a delete query for rows matching a predicate.
|
| template<typename SchemaType, typename T> |
| auto | createTableImpl () -> void |
| | Execute a create table query for a model.
|
| template<typename SchemaType, typename T> |
| auto | deleteTableImpl () -> void |
| | Execute a delete table query for a model.
|
| template<typename SchemaType, typename T> |
| auto | createRelationTablesImpl () -> void |
| | Creates junction tables owned by a model's ManyToMany mappings.
|
|
template<typename SchemaType, typename T> |
| auto | deleteRelationTablesImpl () -> void |
| | Drops junction tables owned by a model's ManyToMany mappings.
|
| template<typename SchemaType, typename Owner, typename Target> |
| auto | linkImpl (const Owner &owner, std::string_view relationField, const Target &target) -> std::size_t |
| | Creates or changes a OneToMany/ManyToMany association.
|
| template<typename SchemaType, typename Owner, typename Target> |
| auto | unlinkImpl (const Owner &owner, std::string_view relationField, const Target &target) -> std::size_t |
| | Removes a OneToMany/ManyToMany association.
|
A class representing a database in the ORM framework.
This class provides functionality for connecting to a database and executing queries.