namespace KDB


List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Members


Detailed Description

Capability (class)

base class for all Capabilities implemented by a plugin

Connector (class)

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

Connection (class)

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> ConnectionList

typedef QListIterator<Connection> ConnectionIterator

Exception (class)

this class represents and exceptional condition of the library. The type of exceptional condition depends on the subclasses of this class

Handler (class)

will contain the handler to a set of records

Table (class)

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

Field (class)

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.

Query (class)

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.

Control (class)

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.

Database (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> DatabaseList

typedef QListIterator<Database> DatabaseIterator

DataObject (class)

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.

DBEngine (class)

Entry point for the library.

This object manages all available plugins, and can create connections to servers or databases.

In more detail:

PluginException (class)

PluginNotFound (class)

LibraryError (class)

UnsupportedCapability (class)

DataException (class)

ConversionException (class)

ServerError (class)

ObjectNotFound (class)

SQLError (class)

InvalidRequest (class)

ConnectionException (class)

HostNotFound (class)

InvalidLogin (class)

typedef QList<Field> FieldList

typedef QListIterator<Field> FieldIterator

typedef KSharedPtr<Handler> HandlerPtr

Index (class)

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> IndexList

typedef QListIterator<Index> IndexIterator

typedef QValueList< Value > Row

typedef QValueList< KDB::Row > RowList

enum DataType {UNKNOWN = -1, CHAR, VARCHAR, SMALLINT, INT, BIGINT, FLOAT, DOUBLE, DATE, TIME, TIMESTAMP, SET, ENUM, ARRAY, BLOB }

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 capability {TRANSACTIONS, REORG, STOPROCS, VIEWS, ADMIN, SEQUENCES, FUNCTIONS, CONFIG }

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

Object (class)

Base class for all KDB objects.

It inherits QObject and provide base error reporting

Plugin (class)

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> PluginList

typedef QListIterator<Plugin> PluginIterator

Recordset (class)

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> QueryPtr

typedef QValueList<QueryPtr> QueryList

typedef QValueListIterator<QueryPtr> QueryIterator

typedef QMap<QString,QString> ParameterList

qryField (struct)

typedef QList<qryField> FldList

typedef QListIterator<qryField> FldIterator

qryCond (struct)

typedef QList<qryCond> CondList

typedef QListIterator<qryCond> CondIterator

Record (class)

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> RecordPtr

typedef KSharedPtr<Recordset> RecordsetPtr

RecordsetIterator (class)

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> TablePtr

typedef QValueList<TablePtr> TableList

typedef QValueListIterator<TablePtr> TableIterator

typedef KSharedPtr<Recordset> RecordsetPtr


Generated by: marc@yogi on Tue Mar 27 13:09:39 2001, using kdoc 2.0a48.