|
|
base class for all Capabilities implemented by a plugin
This is the base class for the interaction between kdbcore and the various plugins. It should be subclassed by plugins, but should not be used by the client programs
Manages the connection state to a SQL engine.
Basically stores all authentication tokens and opens/closes connection as needed.
It is also a collection of database objects, allowing
typedef QList<Connection> |
typedef QListIterator<Connection> |
this class represents and exceptional condition of the library. The type of exceptional condition depends on the subclasses of this class
will contain the handler to a set of records
Representation of a database table.
Trough this object we access the fields and indices of a given table (when available). This object will allow building of new fields and indexes, as well as editing of the table data using openRecordset
Representation of a field object.
It knows its name, its datatype, constraints when available (like null/not null) and, when it is part of a record, its value.
The field object can manage only the data type of the underlying column. Conversion operators are provided for all common C++ datatypes. If a conversion is not allowed, a KDB::ConversionException is raised.
It is responsibility of the plugin to instantiate a correct field object for the underlying datatype. For datatypes not supported natively by C++, the Plugin can handle either QStrings or QByteArrays.
The datatype supported are the following:
All numeric types are handled both in signed and unsigned form.
Representation of a stored query.
Through this object we access the fields and parameters of the query, if any.
Each query is stored in the database as an XML definition. This definition will contain the list of fields, calculated fields (not implemented yet), tables, filters - join expressions and parameters. One exception to that is done when the query is built using an SQL expression in Database::newQuery . In this case, the SQL is stored.
Queries are of two types: select queries and command queries. Select queries can be used to obtain a recordset using openRecordset , while command queries are executed using execute . Command queries have different types: Update, Insert, Delete. By default, a newly built query is a Select query. You can change the query type using setType
Queries can be parametrized. While building the query, the user can use the special construct %name, and provide a corresponding value using the setParameter call. Before the execution (through openRecordset or execute ), a parameter substitution is done. When there is no corresponding parameter value, the %xxx keyword is removed. This can lead to incorrect SQL. Parameter substitution is done on the complete SQL statement, allowing creation of queries that access data with similar definition in different tables with only one query definition.
base class for control dialog extension. All plugins that need a specific configuration dialog in the KControl module must provide a subclass of this class.
Central access point to all functionality of the single database.
That means it provides a list of all queries and tables, and is able to execute a command query and to return a recordset for a given query.
Tables and queries can be accessed by name, and the class can provide collection objects for both.
typedef QList<Database> |
typedef QListIterator<Database> |
Base class for all 'real' data access objects.
It mostly provide shared support (with automatic deallocation) It inherits from KShared.
Table, Query and Recordset are DatabaseObject.
Entry point for the library.
This object manages all available plugins, and can create connections to servers or databases.
In more detail:
typedef QList<Field> |
typedef QListIterator<Field> |
typedef KSharedPtr<Handler> |
This class should provide information for an index of a table
Things such fields involved, ordering, if primary or not and so on.
typedef QList<Index> |
typedef QListIterator<Index> |
typedef QValueList< Value > |
typedef QValueList< KDB::Row > |
enum |
These are all the datatypes natively supported by libkdbcore. Conversion to and from QT/C++ native types is provided by the library. See KDB::Field for further details on kdbcore type system
enum |
These are all currently known capabilities of a DBMS that a plugin can support. Plugins are queryable about the supported capabilities through KDB::Plugin::provides and implementations are available through KDB::Plugin::createObject
Base class for all KDB objects.
It inherits QObject and provide base error reporting
A Plugin handles all connections related to a DBMS (Postgres, MySQL, and so on).
This class allows traversal of the list of available connections, and can be queried about general informations and implemented capabilities through provides
The Plugin is also responsible of creating "capability objects", that is objects that can implement a specific capabilities.
Actually we have found the following capabilities:
typedef QList<Plugin> |
typedef QListIterator<Plugin> |
A set of records, that can be traversed through iterators.
A recordset can be obtained directly by the database (through KDB::Database::openRecordset ("Select * from blah") ) or from an existing table or query.
There are two types of recordsets: read only or updatable. the type can be queried through updatable
an updatable recordset can be asked to build new records, as well as delete existing ones. Updates are allowed in the KDB::Record class
typedef KSharedPtr<Query> |
typedef QValueList<QueryPtr> |
typedef QValueListIterator<QueryPtr> |
typedef QMap<QString,QString> |
typedef QList<qryField> |
typedef QListIterator<qryField> |
typedef QList<qryCond> |
typedef QListIterator<qryCond> |
A collection of fields with relevant values.
The fields should be accessed like an associative array:
rec["field1"] = "value"; or rec[1] = "value"; |
there are two record types: updatable and read only, depending on the parent recordset
typedef KSharedPtr<Record> |
typedef KSharedPtr<Recordset> |
This is an iterator over a recordset.
It can be used to access all records of a recordset either sequentialy or randomly.
typedef KSharedPtr<Table> |
typedef QValueList<TablePtr> |
typedef QValueListIterator<TablePtr> |
typedef KSharedPtr<Recordset> |
Generated by: marc@yogi on Tue Mar 27 13:09:39 2001, using kdoc 2.0a48. |