class Database
|
Central access point to all functionality of the single database. More... |
|
|
Public Methods
Signals
Protected Slots
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.
Database (const Database & base)
| Database |
[virtual]
TablePtr newTable (const QString &name)
| newTable |
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
TablePtr getTable (const QString &name)
| getTable |
returns an existing table by name, or 0L if the
table does not exists
TableList tables (bool system = false)
| tables |
return the list of available tables.
tables whose name begins with "__" ( so called
system tables) will be returned only if system = true
QStringList tableNames (bool system = false)
| tableNames |
return a list of names of available tables.
tables whose name begins with "__" ( so called
system tables) will be returned only if system = true
bool removeTable (const QString &name)
| removeTable |
removes a table from the database. This means
that the table is dropped, and all the content
is erased
QueryPtr newQuery (const QString &name, const QString &SQL = QString::null)
| newQuery |
creates a new query
Parameters:
name | this is the name of the query
|
SQL | this is the sql executed by the
query. if it is not given, the query can be built
with addTable, addField and so on
|
QueryPtr getQuery (const QString &name)
| getQuery |
returns an existing query by name, or 0L if the
query does not exists
QueryList queries ()
| queries |
return the list of available queries
QStringList queryNames ()
| queryNames |
return the list of names of available queries
bool removeQuery (const QString &name)
| removeQuery |
removes a query from the database.
RecordsetPtr openRecordset (const QString &SQL)
| openRecordset |
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
KDB_ULONG execute (const QString &SQL)
| execute |
exec a command query. returns the number of
records affected
void tableAdded ( QString )
| tableAdded |
[signal]
void tableRemoved ( QString )
| tableRemoved |
[signal]
void queryAdded ( QString )
| queryAdded |
[signal]
void queryRemoved ( QString )
| queryRemoved |
[signal]
[signal]
[signal]
[signal]
[protected slots slot]
- Version: kdbcore 0.0.2
- Author: Alessandro Praduroux <pradu@thekompany.com>
- Generated: root@kull.hsv.redhat.com on Thu Aug 1 18:18:03 2002, using kdoc 2.0a53.