|
ImagingTools Core SDK
|
Manages database connection lifecycle for remote database servers. More...
#include <IDatabaseConnector.h>
Inherits istd::IPolymorphic.
Inherited by imtdb::CDatabaseConnectorComp [virtual].
Public Member Functions | |
| virtual bool | ConnectToDatabase (const IDatabaseLoginSettings &loginSettings) const =0 |
| Establishes a connection to a database server. | |
| virtual bool | DisconnectFromDatabase (const QString &connectionName) const =0 |
| Closes an existing database connection. | |
Manages database connection lifecycle for remote database servers.
IDatabaseConnector handles the establishment and termination of connections to database servers. It abstracts the connection process and supports various database backends through the IDatabaseLoginSettings interface.
Typical usage pattern:
Definition at line 49 of file IDatabaseConnector.h.
|
pure virtual |
Establishes a connection to a database server.
Creates and opens a database connection using the provided login credentials. The connection is registered with Qt's SQL system and can be used for query execution.
| loginSettings | Configuration containing host, port, database name, credentials |
|
pure virtual |
Closes an existing database connection.
Terminates the connection identified by the given connection name and releases associated resources.
| connectionName | The name of the connection to close (from IDatabaseLoginSettings) |