#include <dbi.h>
Public Methods | |
dbi (databases) | |
~dbi () | |
bool | open (const char *username, const char *password, const char *db=0, const char *hostname="localhost", unsigned int port=0) |
Open a database connection. More... | |
void | close () |
Close the database connection. | |
bool | error () |
Check for an error. More... | |
const char * | errstr () |
Get the last error string. More... | |
statement * | prepare (const char *query) |
Prepare a query for execution. More... | |
statement * | prepare (const std::string &query) |
Prepare a query for execution. More... | |
long | execute (const char *statement) |
Execute a statement without reading the respone. More... | |
long | executequery (const char *st, std::string &value) |
Execute a query and get its response. More... | |
long | executequery (const char *st, Hash &hash) |
Execute a query and get its response. More... | |
long | executequery (const char *st, const std::string ¶meter, std::string &value) |
Execute a query and get its response. More... | |
long | executequery (const char *st, const std::string ¶meter, Hash &hash) |
Execute a query and get its response. More... | |
operator bool () const | |
Check if connected to the server. More... | |
bool | operator! () const |
Check if not connected to the server. More... | |
databases | gettype () const |
Get the type of this database instance. More... | |
const char * | version () |
Get library version number string. More... | |
Friends | |
class | statement |
@except dbi::exception
|
Construct a DBI instance for the specified database. |
|
Release resources used by this DBI instance |
|
Check for an error. Check for an error condition.
|
|
Get the last error string. Get the current error string.
|
|
Execute a statement without reading the respone. Immediately execute the given statement without generating a new statement handle.
|
|
Execute a query and get its response. Immediately execute the given statement, given a single parameter, and retrieve a result row. Note: Do not use this function to fetch binary data. The Hash is constructed with strings. Fetching binary data into a hash has undefined results.
|
|
Execute a query and get its response. Immediately execute the given statement, given a single parameter, retrieving a single value
|
|
Execute a query and get its response. Immediately execute the given statement, and retrieve a result row. Note: Do not use this function to fetch binary data. The Hash is constructed with strings. Fetching binary data into a hash has undefined results.
|
|
Execute a query and get its response. Immediately execute the given statement, retrieving a single value
|
|
Get the type of this database instance. Get the current type of database instance.
|
|
Open a database connection. Open a connection to the specified database. |
|
Check if connected to the server. Check if a connection is open to the server.
|
|
Check if not connected to the server. Check that a connection is not open to the server.
|
|
Prepare a query for execution. Prepare a statement handle for execution.
|
|
Prepare a query for execution. Prepare a statement handle for execution.
|
|
Get library version number string. Get the SQLoco version number string.
|