struct DBAPIResult;
-typedef DBAPI2_HANDLE *(*DBAPINew)(struct DBAPIConn *);
+typedef DBAPI2_HANDLE *(*DBAPINew)(const struct DBAPIConn *);
typedef void (*DBAPIClose)(struct DBAPIConn *);
-typedef void (*DBAPIQueryCallback)(struct DBAPIResult *, void *);
+typedef void (*DBAPIQueryCallback)(const struct DBAPIResult *, void *);
-typedef void (*DBAPIQuery)(struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, ...) __attribute__ ((format (printf, 4, 5)));
-typedef void (*DBAPISimpleQuery)(struct DBAPIConn *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
-typedef void (*DBAPIQueryV)(struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, va_list);
-typedef void (*DBAPICreateTable)(struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, ...) __attribute__ ((format (printf, 4, 5)));
-typedef void (*DBAPILoadTable)(struct DBAPIConn *, DBAPIQueryCallback, DBAPIQueryCallback, DBAPIQueryCallback, DBAPIUserData, const char *);
+typedef void (*DBAPIQuery)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, ...) __attribute__ ((format (printf, 4, 5)));
+typedef void (*DBAPISimpleQuery)(const struct DBAPIConn *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
+typedef void (*DBAPIQueryV)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *);
+typedef void (*DBAPICallV)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, const char *);
+typedef void (*DBAPICreateTable)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, ...) __attribute__ ((format (printf, 4, 5)));
+typedef void (*DBAPICreateTableV)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *);
+typedef void (*DBAPILoadTable)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIQueryCallback, DBAPIQueryCallback, DBAPIUserData, const char *);
-typedef void (*DBAPISafeQuery)(struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, const char *, ...);
-typedef void (*DBAPISafeQueryV)(struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, const char *, va_list);
-typedef void (*DBAPISafeSimpleQuery)(struct DBAPIConn *, const char *, const char *, ...);
-typedef void (*DBAPISafeCreateTable)(struct DBAPIConn *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
+typedef void (*DBAPISafeQuery)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, const char *, ...);
+typedef void (*DBAPISafeSimpleQuery)(const struct DBAPIConn *, const char *, const char *, ...);
+typedef void (*DBAPISafeCreateTable)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, const char *, ...);
-typedef void (*DBAPIEscapeString)(struct DBAPIConn *, char *, const char *, size_t);
-typedef int (*DBAPIQuoteString)(struct DBAPIConn *, char *, size_t, const char *, size_t);
+typedef void (*DBAPIEscapeString)(const struct DBAPIConn *, char *, const char *, size_t);
+typedef int (*DBAPIQuoteString)(const struct DBAPIConn *, char *, size_t, const char *, size_t);
+typedef void (*DBAPICall)(const struct DBAPIConn *, DBAPIQueryCallback, DBAPIUserData, const char *, const char *, const char *, ...);
+typedef void (*DBAPISimpleCall)(const struct DBAPIConn *, const char *, const char *, const char *, ...);
+
+typedef char *(*DBAPITableName)(const struct DBAPIConn *, const char *);
struct DBAPIProviderData;
DBAPIClose close;
DBAPIQueryV query;
- DBAPICreateTable createtable;
+ DBAPICreateTableV createtable;
DBAPILoadTable loadtable;
-/*
- DBAPISafeQuery safequery;
- DBAPISafeSimpleQuery safesimplequery;
- DBAPISafeCreateTable safecreatetable;
-*/
+
+ DBAPITableName tablename;
DBAPIEscapeString escapestring;
DBAPIQuoteString quotestring;
+ DBAPICallV call;
/* private members */
struct DBAPIProviderData *__providerdata;
typedef struct DBAPIConn {
DBAPIClose close;
- DBAPIQuery query;
- DBAPISimpleQuery squery;
- DBAPICreateTable createtable;
+ DBAPIQuery unsafequery;
+ DBAPISimpleQuery unsafesquery;
+ DBAPICreateTable unsafecreatetable;
DBAPILoadTable loadtable;
DBAPIEscapeString escapestring; /* deprecated */
+ DBAPITableName tablename;
+
+ DBAPISafeQuery query;
+ DBAPISafeSimpleQuery squery;
+ DBAPISafeCreateTable createtable;
+
+ DBAPICall call;
+ DBAPISimpleCall scall;
char name[DBNAME_LEN+1];
DBAPIClose __close;
DBAPIQuoteString __quotestring;
DBAPIQueryV __query;
+ DBAPICreateTableV __createtable;
+ DBAPILoadTable __loadtable;
+ DBAPICallV __call;
} DBAPIConn;
-typedef char *(*DBAPIResultGet)(struct DBAPIResult *, int);
-typedef int (*DBAPIResultNext)(struct DBAPIResult *);
-typedef void (*DBAPIResultClear)(struct DBAPIResult *);
+typedef char *(*DBAPIResultGet)(const struct DBAPIResult *, unsigned int);
+typedef int (*DBAPIResultNext)(const struct DBAPIResult *);
+typedef void (*DBAPIResultClear)(const struct DBAPIResult *);
typedef struct DBAPIResult {
DBAPI2_RESULT_HANDLE *handle;
- unsigned short success, fields;
+ unsigned short success, fields, affected;
DBAPIResultGet get;
DBAPIResultNext next;
void deregisterdbprovider(int);
DBAPIConn *dbapi2open(const char *, const char *);
-void dbsnprintf(DBAPIConn *, char *, size_t, const char *, const char *, ...);
-
#endif