# class Plugin | A Plugin handles all connections related to a DBMS (Postgres, MySQL, and so on). More...
Contains pure virtuals
Full name | `KDB::Plugin`
Definition | `#include <plugin.h>`
Inherits | KDB::Object [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- struct PluginInfo

#### Public Methods

- Plugin (QObject *parent = 0L, const char *name = 0L)
- virtual ~Plugin ()
- virtual PluginInfo info ()
- Connection * openConnection (const QString &host, int port = 0, const QString &user = QString::null, const QString &password = QString::null)
- virtual Connection * addConnection (const QString &host, int port = 0, const QString &user = QString::null, const QString &password = QString::null)
- void remove (Connection *)
- Connection * findConnection (const QString &host, const QString & user)
- ConnectionIterator begin ()
- virtual bool provides (capability cap)
- virtual Capability * createObject (capability cap)

#### Signals

- void closing (KDB::Plugin *)

#### Protected Methods

- void registerConnection (Connection *)
- virtual Connector * createConnector ()

#### Protected Slots

- void slotConnectionClose (KDB::Connection *)

## Detailed Description

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:

- Transactions (does not have a "capability object")
- Reorganization, that is the ability of 'compressing' database objects after a big number of deletes (does not have a "capability object")
- Stored procedures
- Administration
- Users and Groups (ACL)
- Views
- Sequences
- User defined functions

PluginInfo (struct) | ### PluginInfo

Plugin (QObject *parent = 0L, const char *name = 0L) | ### Plugin

~Plugin () | ### ~Plugin

[virtual]

PluginInfo info () | ### info

[pure virtual]

Returns the information about the plugin.

Connection * openConnection (const QString &host, int port = 0, const QString &user = QString::null, const QString &password = QString::null) | ### openConnection

Create a connection, append it to the connection list, open the connection and return it.

Connection * addConnection (const QString &host, int port = 0, const QString &user = QString::null, const QString &password = QString::null) | ### addConnection

[virtual]

Same as connect, but does not perform the connection.

void remove (Connection *) | ### remove

Removes a connection from the list of connections. This will delete the connection, so make sure to not have dangling reference to the connection.

Connection * findConnection (const QString &host, const QString & user) | ### findConnection

Return a connection to the specified host for the given user. If no connection is found 0L is returned.

ConnectionIterator begin () | ### begin

Returns an iterator that points to the first Connection object.

bool provides (capability cap) | ### provides

[pure virtual]

returns true if the plugin can handle a given capability.

Capability * createObject (capability cap) | ### createObject

[pure virtual]

Create an object that will handle the specific capability if the plugin does not support a capability, an exception is thrown.

void closing (KDB::Plugin *) | ### closing

[signal]

void slotConnectionClose (KDB::Connection *) | ### slotConnectionClose

[protected slots slot]

void registerConnection (Connection *) | ### registerConnection

[protected]

Connector * createConnector () | ### createConnector

[protected pure virtual]

- Version: kdbcore 0.0.2
- Author: Alessandro Praduroux <pradu@thekompany.com>
- Generated: root@i386.ports.openbsd.org on Wed Apr 25 13:59:09 2001, using kdoc 2.0a53.