]>
Commit | Line | Data |
---|---|---|
e43481af CP |
1 | #ifndef __PQSQL_DB_H |
2 | #define __PQSQL_DB_H | |
3 | ||
4 | #include <libpq-fe.h> | |
5 | ||
67545367 CP |
6 | #define QH_CREATE 0x01 |
7 | ||
e43481af CP |
8 | typedef void (*PQQueryHandler)(PGconn *, void *); |
9 | ||
67545367 CP |
10 | void pqasyncqueryf(PQQueryHandler handler, void *tag, int flags, char *format, ...); |
11 | ||
87aeb91e CP |
12 | #define pqasyncquery(handler, tag, format, ...) pqasyncqueryf(handler, tag, 0, format , ##__VA_ARGS__) |
13 | #define pqcreatequery(format, ...) pqasyncqueryf(NULL, NULL, QH_CREATE, format , ##__VA_ARGS__) | |
14 | #define pqquery(format, ...) pqasyncquery(NULL, NULL, format , ##__VA_ARGS__) | |
67545367 | 15 | |
e43481af CP |
16 | int pqconnected(void); |
17 | ||
18 | #endif |