#include <database.h>
Inheritance diagram for KDB::Database:

Public Methods | |
| Database (const Database & base) | |
| virtual | ~Database () |
| TablePtr | newTable (const QString &name) |
| creates a new table for the current database. More... | |
| TablePtr | getTable (const QString &name) |
| returns an existing table by name, or 0L if the table does not exists. | |
| TableList | tables (bool system = false) |
| return the list of available tables. More... | |
| QStringList | tableNames (bool system = false) |
| return a list of names of available tables. More... | |
| bool | removeTable (const QString &name) |
| removes a table from the database. More... | |
| QueryPtr | newQuery (const QString &name, const QString &SQL = QString::null) |
| creates a new query. More... | |
| QueryPtr | getQuery (const QString &name) |
| returns an existing query by name, or 0L if the query does not exists. | |
| QueryList | queries () |
| return the list of available queries. | |
| QStringList | queryNames () |
| return the list of names of available queries. | |
| bool | removeQuery (const QString &name) |
| removes a query from the database. | |
| RecordsetPtr | openRecordset (const QString &SQL) |
| creates a recordset based on a given query. More... | |
| unsigned long long | execute (const QString &SQL) |
| exec a command query. More... | |
| bool | open () |
| void | close () |
| bool | isOpen () |
Signals | |
| void | tableAdded ( Table * ) |
| void | tableRemoved ( Table * ) |
| void | tableChanged ( Table * ) |
| void | queryAdded ( Query * ) |
| void | queryRemoved ( Query * ) |
| void | queryChanged ( Query * ) |
| void | changed () |
| void | closed () |
| void | opened () |
Protected Slots | |
| void | tableCreated ( Table * ) |
Friends | |
| class | Connection |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exec a command query. returns the number of records affected |
|
|
returns an existing query by name, or 0L if the query does not exists.
|
|
|
returns an existing table by name, or 0L if the table does not exists.
|
|
|
|
|
|
creates a new query.
|
|
|
creates a new table for the current database. please note that the table is not yet part of the database until you call KDB::Table::create() |
|
|
|
|
|
creates a recordset based on a given query. if the query fails, 0L is returned. you can then check errorMessage() to get a specific error message |
|
|
|
|
|
return the list of available queries.
|
|
|
|
|
|
|
|
|
return the list of names of available queries.
|
|
|
|
|
|
removes a query from the database.
|
|
|
removes a table from the database. This means that the table is dropped, and all the content is erased |
|
|
|
|
|
|
|
|
|
|
|
return a list of names of available tables. tables whose name begins with "__" ( so called system tables) will be returned only if system = true |
|
|
|
|
|
return the list of available tables. tables whose name begins with "__" ( so called system tables) will be returned only if system = true |
|
|
|
1.2.1 written by Dimitri van Heesch,
© 1997-2000