dbd/db2/statement.c

changeset 17
21c4feaeafe7
parent 14
98192b7d4e89
child 19
b5ec612be4da
equal deleted inserted replaced
16:318e5dfd03b8 17:21c4feaeafe7
1 #include "dbd_db2.h" 1 #include "dbd_db2.h"
2
3 #define MAX_COLUMNS 255
4
5 #ifndef max
6 #define max(a,b) (a > b ? a : b)
7 #endif
8
9 static const char *strlower(char *in) {
10 char *s = in;
11
12 while(*s) {
13 *s= (*s <= 'Z' && *s >= 'A') ? (*s - 'A') + 'a' : *s;
14 s++;
15 }
16
17 return in;
18 }
19 2
20 static lua_push_type_t db2_to_lua_push(unsigned int db2_type, int len) { 3 static lua_push_type_t db2_to_lua_push(unsigned int db2_type, int len) {
21 lua_push_type_t lua_type; 4 lua_push_type_t lua_type;
22 5
23 if (len == SQL_NULL_DATA) 6 if (len == SQL_NULL_DATA)

mercurial