dbd/common.h

changeset 4
c50b0e6f25d6
parent 2
c4f02fc67e5a
child 10
3aa8a37a3dd8
equal deleted inserted replaced
3:b61020ca4753 4:c50b0e6f25d6
71 lua_rawseti(L, -2, n); \ 71 lua_rawseti(L, -2, n); \
72 n++; 72 n++;
73 73
74 /* 74 /*
75 * 75 *
76 * Describes SQL to Lua API conversions 76 * Describes SQL to Lua API type conversions
77 * 77 *
78 */ 78 */
79 79
80 typedef enum lua_push_type { 80 typedef enum lua_push_type {
81 LUA_PUSH_NIL = 0, 81 LUA_PUSH_NIL = 0,
85 LUA_PUSH_BOOLEAN, 85 LUA_PUSH_BOOLEAN,
86 86
87 LUA_PUSH_MAX 87 LUA_PUSH_MAX
88 } lua_push_type_t; 88 } lua_push_type_t;
89 89
90 /*
91 *
92 * Common error strings
93 * defined here for consistency in driver implementations
94 *
95 */
96
97 #define DBI_ERR_CONNECTION_FAILED "Failed to connect to database: %s"
98 #define DBI_ERR_DB_UNAVAILABLE "Database not available"
99 #define DBI_ERR_EXECUTE_INVALID "Execute called on a closed or invalid statement"
100 #define DBI_ERR_EXECUTE_FAILED "Execute failed %s"
101 #define DBI_ERR_FETCH_INVALID "Fetch called on a closed or invalid statement"
102 #define DBI_ERR_FETCH_FAILED "Fetch failed %s"
103 #define DBI_ERR_PARAM_MISCOUNT "Statement expected %d parameters but received %d"
104 #define DBI_ERR_BINDING_UNKNOWN "Binding unknown or unsupported type"
105 #define DBI_ERR_BINDING_PARAMS "Error binding statement parameters: %s"
106 #define DBI_ERR_BINDING_EXEC "Error executing statement parameters: %s"
107 #define DBI_ERR_FETCH_NO_EXECUTE "Fetch called before execute"
108 #define DBI_ERR_BINDING_RESULTS "Error binding statement results: %s"
109 #define DBI_ERR_UNKNOWN_PUSH "Unknown push type in result set"
110 #define DBI_ERR_ALLOC_STATEMENT "Error allocating statement handle: %s"
111 #define DBI_ERR_PREP_STATEMENT "Error preparing statement handle: %s"
112 #define DBI_ERR_INVALID_PORT "Invalid port: %d"
113 #define DBI_ERR_ALLOC_RESULT "Error allocating result set: %s"

mercurial