This file defines the abstract database type and functions that perform basic database operations.
Definition in file psDB.h.
#include "psType.h"
#include "psMetadata.h"
Include dependency graph for psDB.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | PS_DB_H 1 |
Functions | |
| psDB * | psDBInit (const char *host, const char *user, const char *passwd, const char *dbname) |
| Opens a new database connection. | |
| void | psDBCleanup (psDB *dbh) |
| Closes a database connection. | |
| bool | psDBCreate (psDB *dbh, const char *dbname) |
| Creates a new database namespace. | |
| bool | psDBChange (psDB *dbh, const char *dbname) |
| Changes the current database namespace. | |
| bool | psDBDrop (psDB *dbh, const char *dbname) |
| Drops a database namespace. | |
| bool | p_psDBRunQuery (psDB *dbh, const char *format,...) |
| Executes a SQL query. | |
| bool | psDBCreateTable (psDB *dbh, const char *tableName, const psMetadata *md) |
| Creates a new database table. | |
| bool | psDBDropTable (psDB *dbh, const char *tableName) |
| Deletes a database table. | |
| psArray * | psDBSelectColumn (psDB *dbh, const char *tableName, const char *col, unsigned long long limit) |
| Selects a column from a table. | |
| psVector * | psDBSelectColumnNum (psDB *dbh, const char *tableName, const char *col, psElemType type, unsigned long long limit) |
| Selects a column from a table and casts it to a given type. | |
| psArray * | psDBSelectRows (psDB *dbh, const char *tableName, const psMetadata *where, unsigned long long limit) |
| Selects a set of rows from a table. | |
| bool | psDBInsertOneRow (psDB *dbh, const char *tableName, const psMetadata *row) |
| Insert a single row into a table. | |
| bool | psDBInsertRows (psDB *dbh, const char *tableName, const psArray *rowSet) |
| Insert a set of rows into a table. | |
| psArray * | psDBDumpRows (psDB *dbh, const char *tableName) |
| Retrieves all rows from a table. | |
| psMetadata * | psDBDumpCols (psDB *dbh, const char *tableName) |
| Retrieves all columns from a table. | |
| long | psDBUpdateRows (psDB *dbh, const char *tableName, const psMetadata *where, const psMetadata *values) |
| Updates the field values, as specified, in a table. | |
| long | psDBDeleteRows (psDB *dbh, const char *tableName, const psMetadata *where, unsigned long long limit) |
| Deletes rows, as specified, in a table. | |
|
|
|
1.4.2