Public Methods |
| | Connector () |
| | Connector (const Connector& c) |
| virtual | ~Connector () |
| void | setHost (const QString & host) |
| void | setPort (int port) |
| void | setUser (const QString & user) |
| void | setPassword (const QString & pwd) |
| QString | host () const |
| int | port () const |
| QString | user () const |
| QString | password () const |
| bool | isConnected () const |
| virtual void | close () |
| | closes the connection to the database backend.
|
| virtual bool | connect () = 0 |
| | opens the connection to the database backend.
|
| virtual QString | protocol () const = 0 |
| | return the protocol of the current connection ( e.g. More...
|
| virtual QStringList | databases () = 0 |
| | returns the list of the available databases for the current open connection.
|
| virtual QStringList | tables () = 0 |
| | returns the list of the available tables for the current open database.
|
| virtual QStringList | queries () = 0 |
| | returns the list of the available queries for the current open database.
|
| virtual QStringList | fields (const QString & tableName) = 0 |
| | returns the list of the fields for the given table for the current open database.
|
| virtual unsigned long long | execute (const QString &sql) = 0 |
| | executes an SQL statement. More...
|
| virtual bool | createDatabase (const QString & name) = 0 |
| | creates an empty database.
|
| virtual bool | createTable (const Table & tab) = 0 |
| | creates a table with the characteristic of the given one.
|
| virtual Connector* | clone () = 0 |
| | clones the current object. More...
|
| virtual bool | setCurrentDatabase (const QString &name) = 0 |
| | set the operational database for the current connector. More...
|
| virtual DataType | nativeToKDB (const QString &type) = 0 |
| | returns the corresponding KDB datatype for the given native one.
|
| virtual QString | KDBToNative (DataType type) = 0 |
| | returns the corresponding native datatype for the given KDB one.
|
| virtual Handler* | query (const QString &SQL) = 0 |
| | executes a select to the backend and returns an handler to the result.
|
Protected Methods |
| void | setConnected (bool conn) |
| | must be called by subclasses when a connection to the backend is established.
|