#ifndef DCCDBGlobals_h__ #define DCCDBGlobals_h__ //This type is used for database ID-s that is used in DB typedef int dbkey_t; //infinite run ranges may be used to set // 1000 to INFINITE_RUN means all runs greater or equal than run 1000 // 0 - INFINITE_RUN all possible runs #define INFINITE_RUN 2147483647 //This constant represent the delimeter that is used to separate stringified data inside database blob #define CCDB_DATA_BLOB_DELIMETER "|" //name of @default variation #define CCDB_DEFAULT_VARIATION_NAME "default" //name of run range that holds all pssible ranges [0,INFINITE_RUN] #define CCDB_ALL_RUNRANGE_NAME "all" /*---------------------------------------------------------------------------------------------------- * E R R O R C O D E S * -------------------------------------------------------------------------------------------------*/ //#define CCDB_ERROR_ //this flag is set when no errors are happend //usually returned by GetLastError if no errors happened #define CCDB_NO_ERRORS 0 //Development generic error that indicates that some method is not implemented yet #define CCDB_ERROR_NOT_IMPLEMENTED 901 // The error happens if the connection string cannot be used for this provider // for MySQL provider when the string is not starts with "mysql://" #define CCDB_ERROR_CONNECTION_PARSE_STRING 1001 // The error happens if some one tries to initialize a new connection // withot closing the old connection #define CCDB_ERROR_CONNECTION_ALREADY_OPENED 1002 //The error happens probably because of problems with memory allocation during mysql initialization #define CCDB_ERROR_CONNECTION_INITIALIZATION 1003 //The error happens if mysql_connect return error or, i.e., open files dont have right privileges //the main info is contained in description for such error #define CCDB_ERROR_CONNECTION_EXTERNAL_ERROR 1004 // The error happens if function that needs connection to DB is called // before connection or after connection failed. Thus trying to run function // on unconnected provider #define CCDB_ERROR_NOT_CONNECTED_ERROR 1005 //Error in select query execution in mysql #define CCDB_ERROR_MYSQL_SELECT 1011 //Error in update query execution in mysql #define CCDB_ERROR_MYSQL_UPDATE 1012 //Error in insert query execution in mysql #define CCDB_ERROR_MYSQL_INSERT 1013 //Error in delete query execution in mysql #define CCDB_ERROR_MYSQL_DELETE 1014 //Error in custom query execution in mysql #define CCDB_ERROR_MYSQL_CUSTOM_QUERY 1015 #endif // DCCDBGlobals_h__