|
KanoopDatabaseQt 1.1.1
Qt database abstraction library
|
|
#include <databasecredentials.h>
Public Member Functions | |
| DatabaseCredentials () | |
| Construct default (empty) credentials. | |
| DatabaseCredentials (const QString &host, const QString &schema, const QString &username, const QString &password, const QString &engine) | |
| Construct credentials with all connection parameters. | |
| DatabaseCredentials (const QString &schema) | |
| Construct SQLite credentials with only a schema (file path). | |
| QString | host () const |
| Get the database server hostname. | |
| void | setHost (const QString &value) |
| Set the database server hostname. | |
| QString | schema () const |
| Get the database/schema name. | |
| void | setSchema (const QString &value) |
| Set the database/schema name. | |
| QString | username () const |
| Get the database username. | |
| void | setUsername (const QString &value) |
| Set the database username. | |
| QString | password () const |
| Get the database password. | |
| void | setPassword (const QString &value) |
| Set the database password. | |
| QString | engine () const |
| Get the database engine identifier. | |
| void | setEngine (const QString &value) |
| Set the database engine identifier. | |
| bool | isSqlite () const |
| Return true if the engine is SQLite. | |
| bool | isValid () const |
| Return true if the credentials have a non-empty schema. | |
Static Public Attributes | |
| static const QString | SQLENG_SQLITE |
| Engine identifier string for SQLite. | |
| static const QString | SQLENG_MYSQL |
| Engine identifier string for MySQL. | |
| static const QString | SQLENG_PGSQL |
| Engine identifier string for PostgreSQL. | |
Represents a set of database credentials for use by the DataSource class
Stephen Punak, January 11 2025
Represents a set of database connection credentials for use by the DataSource class.
Definition at line 14 of file databasecredentials.h.
|
inline |
Construct default (empty) credentials.
Definition at line 18 of file databasecredentials.h.
|
inline |
Construct credentials with all connection parameters.
| host | The database server hostname or IP address. |
| schema | The database/schema name. |
| username | The database username. |
| password | The database password. |
| engine | The database engine identifier (e.g. SQLENG_SQLITE, SQLENG_MYSQL). |
Definition at line 27 of file databasecredentials.h.
|
inline |
Construct SQLite credentials with only a schema (file path).
| schema | The SQLite database file path. |
Definition at line 33 of file databasecredentials.h.
|
inline |
Get the database engine identifier.
Definition at line 75 of file databasecredentials.h.
|
inline |
Get the database server hostname.
Definition at line 39 of file databasecredentials.h.
|
inline |
Return true if the engine is SQLite.
Definition at line 84 of file databasecredentials.h.
References SQLENG_SQLITE.
Referenced by DataSource::isSqlite().
|
inline |
Return true if the credentials have a non-empty schema.
Definition at line 88 of file databasecredentials.h.
|
inline |
Get the database password.
Definition at line 66 of file databasecredentials.h.
|
inline |
Get the database/schema name.
Definition at line 48 of file databasecredentials.h.
|
inline |
Set the database engine identifier.
| value | The engine string (e.g. SQLENG_SQLITE). |
Definition at line 79 of file databasecredentials.h.
|
inline |
Set the database server hostname.
| value | The hostname or IP address. |
Definition at line 43 of file databasecredentials.h.
|
inline |
Set the database password.
| value | The password. |
Definition at line 70 of file databasecredentials.h.
|
inline |
Set the database/schema name.
| value | The schema name or SQLite file path. |
Definition at line 52 of file databasecredentials.h.
|
inline |
Set the database username.
| value | The username. |
Definition at line 61 of file databasecredentials.h.
|
inline |
Get the database username.
Definition at line 57 of file databasecredentials.h.
|
static |
Engine identifier string for MySQL.
Definition at line 93 of file databasecredentials.h.
|
static |
Engine identifier string for PostgreSQL.
Definition at line 95 of file databasecredentials.h.
|
static |
Engine identifier string for SQLite.
Definition at line 91 of file databasecredentials.h.
Referenced by isSqlite().