KDbConnectionOptions
#include <KDbConnectionOptions.h>
Public Member Functions | |
KDbConnectionOptions (const KDbConnectionOptions &other) | |
void | insert (const QByteArray &name, const QVariant &value, const QString &caption=QString()) |
bool | isReadOnly () const |
bool | operator!= (const KDbConnectionOptions &other) const |
KDbConnectionOptions & | operator= (const KDbConnectionOptions &other) |
bool | operator== (const KDbConnectionOptions &other) const |
void | remove (const QByteArray &name) |
void | setCaption (const QByteArray &name, const QString &caption) |
void | setReadOnly (bool set) |
void | setValue (const QByteArray &name, const QVariant &value) |
Public Member Functions inherited from KDbUtils::PropertySet | |
PropertySet (const PropertySet &other) | |
void | insert (const QByteArray &name, const QVariant &value, const QString &caption=QString()) |
QList< QByteArray > | names () const |
bool | operator!= (const PropertySet &other) const |
PropertySet & | operator= (const PropertySet &other) |
bool | operator== (const PropertySet &other) const |
Property | property (const QByteArray &name) const |
void | remove (const QByteArray &name) |
void | setCaption (const QByteArray &name, const QString &caption) |
void | setValue (const QByteArray &name, const QVariant &value) |
Detailed Description
Generic options for a single connection. The options are accessible using key/value pairs. This enables extensibility depending on driver's type and version.
- See also
- KDbDriver::createConnection(const KDbConnectionData&, const KDbConnectionOptions&)
- KDbConnection::options()
Definition at line 35 of file KDbConnectionOptions.h.
Constructor & Destructor Documentation
◆ KDbConnectionOptions() [1/2]
KDbConnectionOptions::KDbConnectionOptions | ( | ) |
Definition at line 85 of file KDbConnection.cpp.
◆ KDbConnectionOptions() [2/2]
KDbConnectionOptions::KDbConnectionOptions | ( | const KDbConnectionOptions & | other | ) |
Definition at line 91 of file KDbConnection.cpp.
◆ ~KDbConnectionOptions()
KDbConnectionOptions::~KDbConnectionOptions | ( | ) |
Definition at line 97 of file KDbConnection.cpp.
Member Function Documentation
◆ insert()
void KDbConnectionOptions::insert | ( | const QByteArray & | name, |
const QVariant & | value, | ||
const QString & | caption = QString() ) |
Inserts option with a given name, value and caption.
If such option exists, value is updated but caption only if existing caption is empty. name must be a valid identifier (see KDb::isIdentifier()).
Definition at line 121 of file KDbConnection.cpp.
◆ isReadOnly()
bool KDbConnectionOptions::isReadOnly | ( | ) | const |
- Returns
- true for read-only connection. Used especially for file-based drivers. Can be implemented in a driver to provide real read-only flag of the connection (sqlite driver does this).
Definition at line 116 of file KDbConnection.cpp.
◆ operator!=()
|
inline |
- Returns
- true if these options differs in at least one value from other
- Since
- 3.1
Definition at line 53 of file KDbConnectionOptions.h.
◆ operator=()
KDbConnectionOptions & KDbConnectionOptions::operator= | ( | const KDbConnectionOptions & | other | ) |
Definition at line 102 of file KDbConnection.cpp.
◆ operator==()
bool KDbConnectionOptions::operator== | ( | const KDbConnectionOptions & | other | ) | const |
- Returns
- true if these options have exactly the same values as other
- Since
- 3.1
Definition at line 111 of file KDbConnection.cpp.
◆ remove()
void KDbConnectionOptions::remove | ( | const QByteArray & | name | ) |
Removes option with a given name if exists.
Definition at line 152 of file KDbConnection.cpp.
◆ setCaption()
void KDbConnectionOptions::setCaption | ( | const QByteArray & | name, |
const QString & | caption ) |
Sets caption for option name to caption.
If such option does not exist, does nothing.
Definition at line 135 of file KDbConnection.cpp.
◆ setReadOnly()
void KDbConnectionOptions::setReadOnly | ( | bool | set | ) |
used by KDbDriver::createConnection(). Only works if connection is not yet established.
Definition at line 160 of file KDbConnection.cpp.
◆ setValue()
void KDbConnectionOptions::setValue | ( | const QByteArray & | name, |
const QVariant & | value ) |
Sets value for option name to value.
If such option does not exist, does nothing.
- Since
- 3.1
Definition at line 143 of file KDbConnection.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:54:31 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.