Browse code

DB_* renamed to DB1_* in files originating from kamailio/db_mysql.

Jan Janak authored on 16/02/2009 22:17:48
Showing 2 changed files
... ...
@@ -97,34 +97,34 @@ int db_mysql_get_columns(const db1_con_t* _h, db1_res_t* _r)
97 97
 			case MYSQL_TYPE_LONG:
98 98
 			case MYSQL_TYPE_INT24:
99 99
 			case MYSQL_TYPE_TIMESTAMP:
100
-				LM_DBG("use DB_INT result type\n");
101
-				RES_TYPES(_r)[col] = DB_INT;
100
+				LM_DBG("use DB1_INT result type\n");
101
+				RES_TYPES(_r)[col] = DB1_INT;
102 102
 				break;
103 103
 
104 104
 			case MYSQL_TYPE_LONGLONG:
105
-				LM_DBG("use DB_BIGINT result type\n");
106
-				RES_TYPES(_r)[col] = DB_BIGINT;
105
+				LM_DBG("use DB1_BIGINT result type\n");
106
+				RES_TYPES(_r)[col] = DB1_BIGINT;
107 107
 				break;
108 108
 
109 109
 			case MYSQL_TYPE_FLOAT:
110 110
 			case MYSQL_TYPE_DOUBLE:
111
-				LM_DBG("use DB_DOUBLE result type\n");
112
-				RES_TYPES(_r)[col] = DB_DOUBLE;
111
+				LM_DBG("use DB1_DOUBLE result type\n");
112
+				RES_TYPES(_r)[col] = DB1_DOUBLE;
113 113
 				break;
114 114
 
115 115
 			case MYSQL_TYPE_DATETIME:
116
-				LM_DBG("use DB_DATETIME result type\n");
117
-				RES_TYPES(_r)[col] = DB_DATETIME;
116
+				LM_DBG("use DB1_DATETIME result type\n");
117
+				RES_TYPES(_r)[col] = DB1_DATETIME;
118 118
 				break;
119 119
 
120 120
 			case MYSQL_TYPE_BLOB:
121
-				LM_DBG("use DB_BLOB result type\n");
122
-				RES_TYPES(_r)[col] = DB_BLOB;
121
+				LM_DBG("use DB1_BLOB result type\n");
122
+				RES_TYPES(_r)[col] = DB1_BLOB;
123 123
 				break;
124 124
 
125 125
 			case FIELD_TYPE_SET:
126
-				LM_DBG("use DB_BITMAP result type\n");
127
-				RES_TYPES(_r)[col] = DB_BITMAP;
126
+				LM_DBG("use DB1_BITMAP result type\n");
127
+				RES_TYPES(_r)[col] = DB1_BITMAP;
128 128
 				break;
129 129
 
130 130
 			case MYSQL_TYPE_DECIMAL:
... ...
@@ -133,15 +133,15 @@ int db_mysql_get_columns(const db1_con_t* _h, db1_res_t* _r)
133 133
 			#endif
134 134
 			case MYSQL_TYPE_STRING:
135 135
 			case MYSQL_TYPE_VAR_STRING:
136
-				LM_DBG("use DB_STRING result type\n");
137
-				RES_TYPES(_r)[col] = DB_STRING;
136
+				LM_DBG("use DB1_STRING result type\n");
137
+				RES_TYPES(_r)[col] = DB1_STRING;
138 138
 				break;
139 139
 
140 140
 			default:
141 141
 				LM_WARN("unhandled data type column (%.*s) type id (%d), "
142
-						"use DB_STRING as default\n", RES_NAMES(_r)[col]->len,
142
+						"use DB1_STRING as default\n", RES_NAMES(_r)[col]->len,
143 143
 						RES_NAMES(_r)[col]->s, fields[col].type);
144
-				RES_TYPES(_r)[col] = DB_STRING;
144
+				RES_TYPES(_r)[col] = DB1_STRING;
145 145
 				break;
146 146
 		}
147 147
 	}
... ...
@@ -53,7 +53,7 @@ int db_mysql_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _le
53 53
 		return tmp;
54 54
 
55 55
 	switch(VAL_TYPE(_v)) {
56
-	case DB_STRING:
56
+	case DB1_STRING:
57 57
 		l = strlen(VAL_STRING(_v));
58 58
 		if (*_len < (l * 2 + 3)) {
59 59
 			LM_ERR("destination buffer too short\n");
... ...
@@ -69,7 +69,7 @@ int db_mysql_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _le
69 69
 		}
70 70
 		break;
71 71
 
72
-	case DB_STR:
72
+	case DB1_STR:
73 73
 		if (*_len < (VAL_STR(_v).len * 2 + 3)) {
74 74
 			LM_ERR("destination buffer too short\n");
75 75
 			return -7;
... ...
@@ -84,7 +84,7 @@ int db_mysql_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _le
84 84
 		}
85 85
 		break;
86 86
 
87
-	case DB_BLOB:
87
+	case DB1_BLOB:
88 88
 		l = VAL_BLOB(_v).len;
89 89
 		if (*_len < (l * 2 + 3)) {
90 90
 			LM_ERR("destination buffer too short\n");