class Connection

Connection to a server. More...

Contains pure virtuals
Full nameKDB::Connection
Definition#include <connection.h>
InheritsKDB::Object
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

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 QListIterator<Database> iterator

 Connection (const char * name)

Connection ()

[virtual]

void  open ()

connect to the host. if username and password are missing, pops up a dialog to ask them. if the connection is open, nothing is actually done

void  close ()

[pure virtual]

disconnects from the host. all databases are closed

bool  isConnected ()

returns true if a successfull connection has been estabilished

void  setUser (const QString &name)

sets the user for this connection. the change will not take place until a disconnect/connect is made

void  setPassword (const QString &pwd)

sets the password for this connection. the change will not take place until a disconnect/connect is made. passing QString::null will force the connection to ask for the password next time open is called

QString  host ()

returns the host name for this connection

QString  prettyPrint ()

returns a complete description of the connection

Database *  openDatabase (const QString &name)

open a database by name

Database *  find (const QString &name)

return a database by name.

Database *  createDatabase (const QString &name)

[pure virtual]

creates a new database in the current connection

QList<Database>  databases ()

return a list of all available databases

iterator  begin ()

return an iterator that points to the first database

bool  _connect (const QString &user, const QString &pwd)

[protected pure virtual]

Connect to the Host. reimplemented in plugins

bool m_connected

[protected]

QString m_host

[protected]

QList<Database> m_databases

[protected]


Generated by: pradu@server.rete.casa on Fri Jul 28 15:15:55 2000, using kdoc 2.0a36.