kexi
KexiDB::ConnectionData Class Reference
#include <connectiondata.h>

Detailed Description
Database specific connection data, e.g. host, port.Connection data, once configured, can be later stored for reuse.
Definition at line 162 of file connectiondata.h.
Public Types | |
typedef QPtrList< ConnectionData > | List |
typedef QPtrListIterator < ConnectionData > | ListIterator |
Public Member Functions | |
ConnectionData (const ConnectionData &) | |
ConnectionData & | operator= (const ConnectionData &cd) |
void | setFileName (const QString &fn) |
QString | fileName () const |
QString | dbPath () const |
QString | dbFileName () const |
QString | serverInfoString (bool addUser=true) const |
Public Attributes | |
uint | formatVersion |
Protected Attributes | |
Private * | priv |
Friends | |
class | Connection |
Member Function Documentation
void ConnectionData::setFileName | ( | const QString & | fn | ) |
Set the filename used by the connection.
For file-based database engines, like SQLite, you should use this function to set the file name of the database to use. fn can be either absolute or relative path to the file.
Definition at line 85 of file connectiondata.cpp.
QString KexiDB::ConnectionData::fileName | ( | ) | const [inline] |
Get the filename used by the connection.
For file-based database engines like SQLite, fileName is used instead hostName and port.
- Returns:
- An absolute path to the database file being used
Definition at line 192 of file connectiondata.h.
QString KexiDB::ConnectionData::dbPath | ( | ) | const [inline] |
The directory the database file is in.
- Returns:
- file path (for file-based engines) but without a file name
Definition at line 199 of file connectiondata.h.
QString KexiDB::ConnectionData::dbFileName | ( | ) | const [inline] |
The file name (without path) of the database file.
- Returns:
- The file name (for file-based engines) but without a full path
Definition at line 206 of file connectiondata.h.
QString ConnectionData::serverInfoString | ( | bool | addUser = true |
) | const |
A user-friendly string for the server.
- Returns:
- a user-friendly string like:
- "myhost.org:12345" if a host and port is specified;
- "localhost:12345" of only port is specified;
- "user@myhost.org:12345" if also user is specified
- "<file>" if file-based driver is assigned but no filename is assigned
- "file: pathto/mydb.kexi" if file-based driver is assigned and filename is assigned
Definition at line 95 of file connectiondata.cpp.
The documentation for this class was generated from the following files: