Code

Renamed DBI_TYPE_TO_SC to DBI_TYPE_TO_SDB.
authorSebastian Harl <sh@tokkee.org>
Wed, 11 Jun 2014 09:37:28 +0000 (11:37 +0200)
committerSebastian Harl <sh@tokkee.org>
Wed, 11 Jun 2014 09:37:28 +0000 (11:37 +0200)
The old name was still from the times the project was called syscollector ;-)

src/include/utils/dbi.h
src/utils/dbi.c
t/unit/utils/dbi_test.c

index 9d5cfc05cc66dd552be7073c225e8baacf896ee1..af2c8a44ecb1da78acc6ed8de7581e1445da0c2e 100644 (file)
@@ -34,7 +34,7 @@
 #include <stddef.h>
 
 /* translate libdbi types to SysDB types */
-#define DBI_TYPE_TO_SC(dt) \
+#define DBI_TYPE_TO_SDB(dt) \
        (((dt) == DBI_TYPE_INTEGER) \
                ? SDB_TYPE_INTEGER \
                : ((dt) == DBI_TYPE_DECIMAL) \
index b1fdaf127896aaf35863ec1a8cfd208c62982d6d..73fc6b77a4e2582b431ac109a1e9147f66535360 100644 (file)
@@ -194,7 +194,7 @@ sdb_dbi_get_data(sdb_dbi_client_t *client, dbi_result res,
                                        sdb_dbi_strerror(client->conn));
                        return -1;
                }
-               types[i] = DBI_TYPE_TO_SC(types[i]);
+               types[i] = DBI_TYPE_TO_SDB(types[i]);
        }
 
        num_rows = dbi_result_get_numrows(res);
@@ -497,7 +497,7 @@ sdb_dbi_exec_query(sdb_dbi_client_t *client, const char *query,
 
                        unsigned int type = va_arg(types, unsigned int);
 
-                       field_type = DBI_TYPE_TO_SC(field_type);
+                       field_type = DBI_TYPE_TO_SDB(field_type);
 
                        /* column count starts at 1 */
                        if ((unsigned int)field_type != type) {
index 1ad96d123f6b6431b87f8cfc3a83872ccc37fb1b..2935940182f268bd36b68291e68bf30b8b8c6256 100644 (file)
@@ -527,7 +527,7 @@ query_callback(sdb_dbi_client_t *c,
                        user_data, TEST_MAGIC);
 
        for (i = 0; i < n; ++i) {
-               int expected_type = DBI_TYPE_TO_SC(current_query->field_types[i]);
+               int expected_type = DBI_TYPE_TO_SDB(current_query->field_types[i]);
                mock_data_t expected_data;
 
                fail_unless((int)data[i].type == expected_type,