Data structures that represents capabilities in the database.
More...
Go to the source code of this file.
Defines
-
#define DB_CAP_ALL (DB_CAP_QUERY | DB_CAP_INSERT | DB_CAP_DELETE | DB_CAP_UPDATE)
- All database capabilities except raw_query, replace, insert_update and last_inserted_id which should be checked separately when needed.
-
#define DB_CAPABILITY(dbf, cpv) (((dbf).cap & (cpv)) == (cpv))
- Returns true if all the capabilities in cpv are supported by module represented by dbf, false otherwise.
Typedefs
-
typedef enum db_cap db_cap_t
- Represents the capabilities that a database driver supports.
Enumerations
- enum db_cap {
DB_CAP_QUERY = 1 << 0,
DB_CAP_RAW_QUERY = 1 << 1,
DB_CAP_INSERT = 1 << 2,
DB_CAP_DELETE = 1 << 3,
DB_CAP_UPDATE = 1 << 4,
DB_CAP_REPLACE = 1 << 5,
DB_CAP_FETCH = 1 << 6,
DB_CAP_LAST_INSERTED_ID = 1 << 7,
DB_CAP_INSERT_UPDATE = 1 << 8,
DB_CAP_INSERT_DELAYED = 1 << 9,
DB_CAP_AFFECTED_ROWS = 1 << 10
}
Represents the capabilities that a database driver supports.
More...
Detailed Description
This file defines data structures that represents certain database capabilities. It also provides some macros for convenient access to this values.
Definition in file db_cap.h.
Enumeration Type Documentation
- Enumerator:
| DB_CAP_QUERY |
driver can perform queries
|
| DB_CAP_RAW_QUERY |
driver can perform raw queries
|
| DB_CAP_INSERT |
driver can insert data
|
| DB_CAP_DELETE |
driver can delete data
|
| DB_CAP_UPDATE |
driver can update data
|
| DB_CAP_REPLACE |
driver can replace (also known as INSERT OR UPDATE) data
|
| DB_CAP_FETCH |
driver supports fetch result queries
|
| DB_CAP_LAST_INSERTED_ID |
driver can return the ID of the last insert operation
|
| DB_CAP_INSERT_UPDATE |
driver can insert data into database & update on duplicate
|
| DB_CAP_INSERT_DELAYED |
driver can do insert delayed
|
| DB_CAP_AFFECTED_ROWS |
driver can return number of rows affected by the last query
|
Definition at line 41 of file db_cap.h.