dbd/common.h

changeset 17
21c4feaeafe7
parent 14
98192b7d4e89
child 21
7956401a0c5e
equal deleted inserted replaced
16:318e5dfd03b8 17:21c4feaeafe7
86 86
87 LUA_PUSH_MAX 87 LUA_PUSH_MAX
88 } lua_push_type_t; 88 } lua_push_type_t;
89 89
90 /* 90 /*
91 * used for placeholder translations
92 * from '?' to the .\d{4}
93 */
94 #define MAX_PLACEHOLDERS 9999
95 #define MAX_PLACEHOLDER_SIZE (1+4) /* .\d{4} */
96
97 /*
91 * 98 *
92 * Common error strings 99 * Common error strings
93 * defined here for consistency in driver implementations 100 * defined here for consistency in driver implementations
94 * 101 *
95 */ 102 */
110 #define DBI_ERR_PREP_STATEMENT "Error preparing statement handle: %s" 117 #define DBI_ERR_PREP_STATEMENT "Error preparing statement handle: %s"
111 #define DBI_ERR_INVALID_PORT "Invalid port: %d" 118 #define DBI_ERR_INVALID_PORT "Invalid port: %d"
112 #define DBI_ERR_ALLOC_RESULT "Error allocating result set: %s" 119 #define DBI_ERR_ALLOC_RESULT "Error allocating result set: %s"
113 #define DBI_ERR_DESC_RESULT "Error describing result set: %s" 120 #define DBI_ERR_DESC_RESULT "Error describing result set: %s"
114 #define DBI_ERR_BINDING_TYPE_ERR "Unknown or unsupported type `%s'" 121 #define DBI_ERR_BINDING_TYPE_ERR "Unknown or unsupported type `%s'"
122
123 /*
124 * convert string to lower case
125 */
126 const char *strlower(char *in);
127
128 /*
129 * replace '?' placeholders with .\d+ placeholders
130 * to be compatible with the native driver API
131 */
132 char *replace_placeholders(lua_State *L, char native_prefix, const char *sql);
133

mercurial