namespace KDB


List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Members


Detailed Description

Capability (class)

Capability

base class for all Capabilities implemented by a plugin

Connector (class)

Connector

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)

Connection

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

ConnectionList

typedef QListIterator<Connection> ConnectionIterator

ConnectionIterator

Exception (class)

Exception

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

Handler (class)

Handler

will contain the handler to a set of records

Table (class)

Table

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)

Field

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)

Query

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)

Control

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)

Database

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

DatabaseList

typedef QListIterator<Database> DatabaseIterator

DatabaseIterator

DataObject (class)

DataObject

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)

DBEngine

Entry point for the library.

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

In more detail:

PluginException (class)

PluginException

PluginNotFound (class)

PluginNotFound

LibraryError (class)

LibraryError

UnsupportedCapability (class)

UnsupportedCapability

DataException (class)

DataException

ConversionException (class)

ConversionException

ServerError (class)

ServerError

ObjectNotFound (class)

ObjectNotFound

SQLError (class)

SQLError

InvalidRequest (class)

InvalidRequest

ConnectionException (class)

ConnectionException

HostNotFound (class)

HostNotFound

InvalidLogin (class)

InvalidLogin

typedef QList<Field> FieldList

FieldList

typedef QListIterator<Field> FieldIterator

FieldIterator

typedef KSharedPtr<Handler> HandlerPtr

HandlerPtr

Index (class)

Index

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

IndexList

typedef QListIterator<Index> IndexIterator

IndexIterator

typedef QValueList< Value > Row

Row

typedef QValueList< KDB::Row > RowList

RowList

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

DataType

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 }

capability

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)

Object

Base class for all KDB objects.

It inherits QObject and provide base error reporting

Plugin (class)

Plugin

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

PluginList

typedef QListIterator<Plugin> PluginIterator

PluginIterator

Recordset (class)

Recordset

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

QueryPtr

typedef QValueList<QueryPtr> QueryList

QueryList

typedef QValueListIterator<QueryPtr> QueryIterator

QueryIterator

typedef QMap<QString,QString> ParameterList

ParameterList

qryField (struct)

qryField

typedef QList<qryField> FldList

FldList

typedef QListIterator<qryField> FldIterator

FldIterator

qryCond (struct)

qryCond

typedef QList<qryCond> CondList

CondList

typedef QListIterator<qryCond> CondIterator

CondIterator

Record (class)

Record

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

RecordPtr

typedef KSharedPtr<Recordset> RecordsetPtr

RecordsetPtr

RecordsetIterator (class)

RecordsetIterator

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

TablePtr

typedef QValueList<TablePtr> TableList

TableList

typedef QValueListIterator<TablePtr> TableIterator

TableIterator

typedef KSharedPtr<Recordset> RecordsetPtr

RecordsetPtr


Generated by: prospector@george.devel.redhat.com on Wed Apr 25 19:31:58 2001, using kdoc 2.0a53.