mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-04-05 18:19:19 +02:00
initial commit using a very minimalistic db abstraction preparing to add postgresql support as well
This commit is contained in:
15
src/defs.h
15
src/defs.h
@@ -55,6 +55,13 @@
|
||||
#define READY 1
|
||||
#define BUSY 2
|
||||
|
||||
#define MAX_SQL_VARS 20
|
||||
|
||||
#define TYPE_UNDEF 0
|
||||
#define TYPE_TINY 1
|
||||
#define TYPE_LONG 2
|
||||
#define TYPE_LONGLONG 3
|
||||
#define TYPE_STRING 4
|
||||
|
||||
#define MAXCHILDREN 64
|
||||
|
||||
@@ -247,6 +254,7 @@ struct __data {
|
||||
char mydomains[MAXBUFSIZE];
|
||||
|
||||
#ifdef NEED_MYSQL
|
||||
MYSQL_STMT *stmt_generic;
|
||||
MYSQL_STMT *stmt_get_meta_id_by_message_id;
|
||||
MYSQL_STMT *stmt_insert_into_rcpt_table;
|
||||
MYSQL_STMT *stmt_insert_into_sphinx_table;
|
||||
@@ -258,8 +266,15 @@ struct __data {
|
||||
MYSQL_STMT *stmt_get_folder_id;
|
||||
MYSQL_STMT *stmt_insert_into_folder_table;
|
||||
MYSQL_STMT *stmt_update_metadata_reference;
|
||||
MYSQL_STMT *stmt_select_from_meta_table;
|
||||
MYSQL_STMT *stmt_select_non_referenced_attachments;
|
||||
#endif
|
||||
|
||||
char *sql[MAX_SQL_VARS];
|
||||
int type[MAX_SQL_VARS];
|
||||
int len[MAX_SQL_VARS];
|
||||
int pos;
|
||||
|
||||
#ifdef HAVE_TRE
|
||||
struct rule *archiving_rules;
|
||||
struct rule *retention_rules;
|
||||
|
||||
Reference in New Issue
Block a user