PostgreSQL Database.
More...
#include <rdbpostgres.h>
PostgreSQL Database.
The RDbPostgreSQL class provides a representation of connection to a PostgreSQL database.
- See also
- RQuery
Construct a connection to the PostgreSQL database.
- Parameters
-
db | Name of the database. |
host | Host. |
user | User. |
pwd | Password. |
coding | Name of the coding used. |
Destruct the connection to the database.
Create an empty PostgreSQL database.
- Parameters
-
db | Name of the database. |
host | Host. |
user | User. |
pwd | Password. |
virtual size_t GetLastInsertId |
( |
void |
| ) |
|
|
virtual |
Get the last auto-increment identifier inserted.
Implements RDb.
Initialize a query.
- Parameters
-
sql | SQL query. |
nbcols | Number of columns of the query (assigned by the method). |
- Returns
- Pointer to a structure allocated by the database.
Implements RDb.
virtual void ReleaseQuery |
( |
void * |
data | ) |
|
|
virtual |
Release a query.
- Parameters
-
data | Data to release (must be cast). |
Implements RDb.
virtual bool EndQuery |
( |
const void * |
data | ) |
|
|
virtual |
- Parameters
-
data | Database-dependent data. |
- Returns
- true if all the rows of a query are treated.
Implements RDb.
virtual void StartQuery |
( |
void * |
data | ) |
|
|
virtual |
Start a query.
- Parameters
-
data | Database-dependent data. |
Implements RDb.
virtual void NextQuery |
( |
void * |
data | ) |
|
|
virtual |
Read the next row of the query.
- Parameters
-
data | Database-dependent data. |
Implements RDb.
virtual RString GetField |
( |
const void * |
data, |
|
|
size_t |
index |
|
) |
| |
|
virtual |
Return a specific field of the current row.
- Parameters
-
data | Database-dependent data. |
index | Index of the field in the query. |
Implements RDb.
Coding used to read/write to PostgreSQL.