]> saetta.ns0.it Git - gdadbcopy/commitdiff
Cleaned the code.
authorAndrea Zagli <azagli@libero.it>
Wed, 21 Nov 2012 20:48:06 +0000 (21:48 +0100)
committerAndrea Zagli <azagli@libero.it>
Wed, 21 Nov 2012 20:48:06 +0000 (21:48 +0100)
src/main.c
tests/db.db

index 5faac4ea8ddccb6b0cf7c1c42a176ba97c9d2a6d..bb4a096e047d378fcd5b46adcc6130fcb03366f7 100644 (file)
@@ -118,7 +118,11 @@ read_fields (GdaConnection *gdacon, Table *table)
                                {
                                        field = g_new0 (Field, 1);
                                        field->name = gda_value_stringify (gda_data_model_get_value_at (dm_fields, 0, row, NULL));
-                                       g_message ("\t\tField: %s", field->name);
+                                       g_message ("\t\tField: %s - %s - %s - %d - %d", field->name,
+                                               gda_value_stringify (gda_data_model_get_value_at (dm_fields, 1, row, NULL)),
+                                               gda_value_stringify (gda_data_model_get_value_at (dm_fields, 2, row, NULL)),
+                                               g_value_get_int (gda_data_model_get_value_at (dm_fields, 3, row, NULL)),
+                                               g_value_get_int (gda_data_model_get_value_at (dm_fields, 4, row, NULL)));
 
                                        g_hash_table_insert (table->ht_fields, field->name, field);
                                }
@@ -175,7 +179,6 @@ main (int argc, char *argv[])
        GOptionContext *context;
 
        GHashTable *ht_ref_db_tables;
-       GHashTable *ht_db_tables;
 
        g_type_init ();
 
@@ -229,10 +232,6 @@ main (int argc, char *argv[])
        ht_ref_db_tables = g_hash_table_new (g_str_hash, g_str_equal);
        read_tables (gda_conn_ref_db, ht_ref_db_tables);
 
-       g_message ("Reading tables of database (%s).", db_cnc);
-       ht_db_tables = g_hash_table_new (g_str_hash, g_str_equal);
-       read_tables (gda_conn_db, ht_db_tables);
-
        g_object_unref (gda_conn_ref_db);
        g_object_unref (gda_conn_db);
 
index 2cb8c26c7f360cf3cf22a212e991a2b5ed61715e..4c2a966fbfe0a63f38d25a0f784942c2d7023ece 100644 (file)
Binary files a/tests/db.db and b/tests/db.db differ