X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/24e1aba8d56ea34aa9dfd78977a41174173c87b2..18afb5fb8815bebadb2ff5f4465c326d1b4ce3d7:/dbapi/dbapi.h diff --git a/dbapi/dbapi.h b/dbapi/dbapi.h index 07d888b9..4b4453a5 100644 --- a/dbapi/dbapi.h +++ b/dbapi/dbapi.h @@ -7,6 +7,7 @@ #define DB_NULLIDENTIFIER 0 #define DB_CREATE 1 +#define DB_CALL 2 #ifdef DBAPI_OVERRIDE #undef USE_DBAPI_PGSQL @@ -43,6 +44,7 @@ typedef PQResult DBResult; #define dbgetvalue(result, column) pqgetvalue(result, column) #define dbclear(result) pqclear(result) +#define dbcall(id, handler, tag, function, ...) pqasyncqueryf(id, handler, tag, (handler) == NULL ? DB_CALL : 0, "SELECT %s(%s)", function , ##__VA_ARGS__) #endif /* DBAPI_PGSQL */ @@ -75,6 +77,8 @@ typedef SQLiteResult DBResult; #define dbclear(result) sqliteclear(result) +#define dbcall(...) abort() /* HA */ + #endif /* DBAPI_SQLITE */ #endif /* BUILDING_DBAPI */