GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
utest-gnc-backend-sql.c
1 /********************************************************************
2  * utest-gnc-backend-sql.c: *
3  * GLib g_test test suite for gnc-backend-sql.c. *
4  * Copyright 2012 John Ralls <[email protected]> *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA [email protected] *
22 ********************************************************************/
23 #include "config.h"
24 #include <string.h>
25 #include <glib.h>
26 #include <unittest-support.h>
27 /* Add specific headers for this class */
28 #include "../gnc-backend-sql.h"
29 
30 static const gchar *suitename = "/backend/sql/gnc-backend-sql";
31 void test_suite_gnc_backend_sql (void);
32 
33 /* gnc_sql_init
34 void
35 gnc_sql_init (GncSqlBackend* be)// C: 1 */
36 /* static void
37 test_gnc_sql_init (Fixture *fixture, gconstpointer pData)
38 {
39 }*/
40 /* create_tables_cb
41 static void
42 create_tables_cb (const gchar* type, gpointer data_p, gpointer be_p)// 2
43 */
44 /* static void
45 test_create_tables_cb (Fixture *fixture, gconstpointer pData)
46 {
47 }*/
48 /* gnc_sql_set_load_order
49 void
50 gnc_sql_set_load_order (const gchar** load_order)// 2
51 */
52 /* static void
53 test_gnc_sql_set_load_order (Fixture *fixture, gconstpointer pData)
54 {
55 }*/
56 /* initial_load_cb
57 static void
58 initial_load_cb (const gchar* type, gpointer data_p, gpointer be_p)// 2
59 */
60 /* static void
61 test_initial_load_cb (Fixture *fixture, gconstpointer pData)
62 {
63 }*/
64 /* gnc_sql_load
65 void
66 gnc_sql_load (GncSqlBackend* be, QofBook *book, QofBackendLoadType loadType)// C: 1 */
67 /* static void
68 test_gnc_sql_load (Fixture *fixture, gconstpointer pData)
69 {
70 }*/
71 /* write_account_tree
72 static gboolean
73 write_account_tree (GncSqlBackend* be, Account* root)// 3
74 */
75 /* static void
76 test_write_account_tree (Fixture *fixture, gconstpointer pData)
77 {
78 }*/
79 /* write_accounts
80 static gboolean
81 write_accounts (GncSqlBackend* be)// 2
82 */
83 /* static void
84 test_write_accounts (Fixture *fixture, gconstpointer pData)
85 {
86 }*/
87 /* write_tx
88 static int
89 write_tx (Transaction* tx, gpointer data)// 3
90 */
91 /* static void
92 test_write_tx (Fixture *fixture, gconstpointer pData)
93 {
94 }*/
95 /* write_transactions
96 static gboolean
97 write_transactions (GncSqlBackend* be)// 2
98 */
99 /* static void
100 test_write_transactions (Fixture *fixture, gconstpointer pData)
101 {
102 }*/
103 /* write_template_transactions
104 static gboolean
105 write_template_transactions (GncSqlBackend* be)// 2
106 */
107 /* static void
108 test_write_template_transactions (Fixture *fixture, gconstpointer pData)
109 {
110 }*/
111 /* write_schedXactions
112 static gboolean
113 write_schedXactions (GncSqlBackend* be)// 2
114 */
115 /* static void
116 test_write_schedXactions (Fixture *fixture, gconstpointer pData)
117 {
118 }*/
119 /* write_cb
120 static void
121 write_cb (const gchar* type, gpointer data_p, gpointer be_p)// 2
122 */
123 /* static void
124 test_write_cb (Fixture *fixture, gconstpointer pData)
125 {
126 }*/
127 /* update_progress
128 static void
129 update_progress (GncSqlBackend* be)// 17
130 */
131 /* static void
132 test_update_progress (Fixture *fixture, gconstpointer pData)
133 {
134 }*/
135 /* finish_progress
136 static void
137 finish_progress (GncSqlBackend* be)// 4
138 */
139 /* static void
140 test_finish_progress (Fixture *fixture, gconstpointer pData)
141 {
142 }*/
143 /* gnc_sql_sync_all
144 void
145 gnc_sql_sync_all (GncSqlBackend* be, QofBook *book)// C: 2 in 1 */
146 /* static void
147 test_gnc_sql_sync_all (Fixture *fixture, gconstpointer pData)
148 {
149 }*/
150 /* gnc_sql_begin_edit
151 void
152 gnc_sql_begin_edit (GncSqlBackend *be, QofInstance *inst)// C: 1 */
153 /* static void
154 test_gnc_sql_begin_edit (Fixture *fixture, gconstpointer pData)
155 {
156 }*/
157 /* gnc_sql_rollback_edit
158 void
159 gnc_sql_rollback_edit (GncSqlBackend *be, QofInstance *inst)// C: 1 */
160 /* static void
161 test_gnc_sql_rollback_edit (Fixture *fixture, gconstpointer pData)
162 {
163 }*/
164 /* commit_cb
165 static void
166 commit_cb (const gchar* type, gpointer data_p, gpointer be_data_p)// 2
167 */
168 /* static void
169 test_commit_cb (Fixture *fixture, gconstpointer pData)
170 {
171 }*/
172 /* gnc_sql_commit_edit
173 void
174 gnc_sql_commit_edit (GncSqlBackend *be, QofInstance *inst)// C: 1 */
175 static void
176 test_dirty_cb (QofBook* book, gboolean dirty, gpointer data)
177 {
178  g_assert (data != NULL);
179  if (dirty)
180  ++*(guint*)data;
181  else if (*(guint*)data)
182  --*(guint*)data;
183 }
184 
185 static gboolean
186 fake_connection_function (GncSqlConnection *conn)
187 {
188  return TRUE;
189 }
190 
191 static void
192 test_gnc_sql_commit_edit (void)
193 {
194  GncSqlBackend be;
195  QofInstance *inst;
196  guint dirty_called = 0;
197  GncSqlConnection conn;
198  gchar *msg1 = "[gnc_sql_commit_edit()] gnc_sql_commit_edit(): Unknown object type 'null'\n";
199  gchar *msg2 = "[gnc_sql_commit_edit()] gnc_sql_commit_edit(): Unknown object type 'Book'\n";
200  guint loglevel = G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL;
201  gchar *logdomain = "gnc.backend.sql";
202  TestErrorStruct check1 = { loglevel, logdomain, msg1, 0 };
203  TestErrorStruct check2 = { loglevel, logdomain, msg2, 0 };
204  guint hdlr1;
205 
206  test_add_error (&check1);
207  test_add_error (&check2);
208  hdlr1 = g_log_set_handler (logdomain, loglevel,
209  (GLogFunc)test_list_handler, NULL);
210  g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_list_handler, NULL);
211 
212  qof_object_initialize ();
213  be.book = qof_book_new ();
214  be.conn = &conn;
215  conn.beginTransaction = fake_connection_function;
216  conn.rollbackTransaction = fake_connection_function;
217  conn.commitTransaction = fake_connection_function;
218  inst = g_object_new (QOF_TYPE_INSTANCE, NULL);
219  qof_instance_init_data (inst, QOF_ID_NULL, be.book);
220  be.loading = FALSE;
221  qof_book_set_dirty_cb (be.book, test_dirty_cb, &dirty_called);
222  qof_instance_set_dirty_flag (inst, TRUE);
224 
225  g_assert (qof_instance_get_dirty_flag (inst));
226  g_assert (qof_book_session_not_saved (be.book));
227  g_assert_cmpint (dirty_called, == , 1);
228  gnc_sql_commit_edit (&be, inst);
229  g_assert (!qof_instance_get_dirty_flag (inst));
230  g_assert (!qof_book_session_not_saved (be.book));
231  g_assert_cmpint (dirty_called, == , 0);
232  g_assert_cmpint (check1.hits, ==, 2);
233  g_assert_cmpint (check2.hits, ==, 0);
234 
236 
237  g_assert (!qof_instance_get_dirty_flag (QOF_INSTANCE (be.book)));
238  g_assert (qof_book_session_not_saved (be.book));
239  g_assert_cmpint (dirty_called, == , 1);
240  gnc_sql_commit_edit (&be, QOF_INSTANCE (be.book));
241  g_assert (!qof_instance_get_dirty_flag (QOF_INSTANCE (be.book)));
242  g_assert (qof_book_session_not_saved (be.book));
243  g_assert_cmpint (dirty_called, == , 1);
244  g_assert_cmpint (check1.hits, ==, 2);
245  g_assert_cmpint (check2.hits, ==, 0);
246 
247  qof_instance_set_dirty_flag (QOF_INSTANCE (be.book), TRUE);
248 
249  g_assert (qof_instance_get_dirty_flag (QOF_INSTANCE (be.book)));
250  g_assert (qof_book_session_not_saved (be.book));
251  g_assert_cmpint (dirty_called, == , 1);
252  gnc_sql_commit_edit (&be, QOF_INSTANCE (be.book));
253  g_assert (!qof_instance_get_dirty_flag (QOF_INSTANCE (be.book)));
254  g_assert (!qof_book_session_not_saved (be.book));
255  g_assert_cmpint (dirty_called, == , 0);
256  g_assert_cmpint (check1.hits, ==, 2);
257  g_assert_cmpint (check2.hits, ==, 2);
258 
259  g_log_remove_handler (logdomain, hdlr1);
260  g_object_unref (inst);
261  g_object_unref (be.book);
262 }
263 /* handle_and_term
264 static void
265 handle_and_term (QofQueryTerm* pTerm, GString* sql)// 2
266 */
267 /* static void
268 test_handle_and_term (Fixture *fixture, gconstpointer pData)
269 {
270 }*/
271 /* compile_query_cb
272 static void
273 compile_query_cb (const gchar* type, gpointer data_p, gpointer be_data_p)// 2
274 */
275 /* static void
276 test_compile_query_cb (Fixture *fixture, gconstpointer pData)
277 {
278 }*/
279 // Make Static
280 /* gnc_sql_compile_query
281 gpointer
282 gnc_sql_compile_query (QofBackend* pBEnd, QofQuery* pQuery)// 4
283 */
284 /* static void
285 test_gnc_sql_compile_query (Fixture *fixture, gconstpointer pData)
286 {
287 }*/
288 /* convert_search_obj
289 static const gchar*
290 convert_search_obj (QofIdType objType)// 3
291 */
292 /* static void
293 test_convert_search_obj (Fixture *fixture, gconstpointer pData)
294 {
295 }*/
296 // Make Static
297 /* gnc_sql_compile_query_to_sql
298 gchar*
299 gnc_sql_compile_query_to_sql (GncSqlBackend* be, QofQuery* query)// 3
300 */
301 /* static void
302 test_gnc_sql_compile_query_to_sql (Fixture *fixture, gconstpointer pData)
303 {
304 }*/
305 /* free_query_cb
306 static void
307 free_query_cb (const gchar* type, gpointer data_p, gpointer be_data_p)// 2
308 */
309 /* static void
310 test_free_query_cb (Fixture *fixture, gconstpointer pData)
311 {
312 }*/
313 // Not Used
314 /* gnc_sql_free_query
315 void
316 gnc_sql_free_query (QofBackend* pBEnd, gpointer pQuery)// 1
317 */
318 /* static void
319 test_gnc_sql_free_query (Fixture *fixture, gconstpointer pData)
320 {
321 }*/
322 /* run_query_cb
323 static void
324 run_query_cb (const gchar* type, gpointer data_p, gpointer be_data_p)// 2
325 */
326 /* static void
327 test_run_query_cb (Fixture *fixture, gconstpointer pData)
328 {
329 }*/
330 // Not Used
331 /* gnc_sql_run_query
332 void
333 gnc_sql_run_query (QofBackend* pBEnd, gpointer pQuery)// 1
334 */
335 /* static void
336 test_gnc_sql_run_query (Fixture *fixture, gconstpointer pData)
337 {
338 }*/
339 /* business_core_sql_init
340 static void
341 business_core_sql_init(void)// 2
342 */
343 /* static void
344 test_business_core_sql_init (Fixture *fixture, gconstpointer pData)
345 {
346 }*/
347 /* gnc_sql_init_object_handlers
348 static void
349 gnc_sql_init_object_handlers (void)// 3
350 */
351 /* static void
352 test_gnc_sql_init_object_handlers (Fixture *fixture, gconstpointer pData)
353 {
354 }*/
355 /* gnc_sql_get_integer_value
356 gint64
357 gnc_sql_get_integer_value (const GValue* value)// C: 1 */
358 /* static void
359 test_gnc_sql_get_integer_value (Fixture *fixture, gconstpointer pData)
360 {
361 }*/
362 // Make Static
363 /* get_autoinc_id
364 get_autoinc_id()// 2
365 */
366 /* static void
367 test_get_autoinc_id (Fixture *fixture, gconstpointer pData)
368 {
369 }*/
370 /* set_autoinc_id
371 static void
372 set_autoinc_id()// 2
373 */
374 /* static void
375 test_set_autoinc_id (Fixture *fixture, gconstpointer pData)
376 {
377 }*/
378 /* gnc_sql_get_getter
379 gnc_sql_get_getter (QofIdTypeConst obj_name, const GncSqlColumnTableEntry* table_row)// C: 3 in 2 */
380 /* static void
381 test_gnc_sql_get_getter (Fixture *fixture, gconstpointer pData)
382 {
383 }*/
384 // Make Static
385 /* gnc_sql_add_colname_to_list
386 void
387 gnc_sql_add_colname_to_list (const GncSqlColumnTableEntry* table_row, GList** pList)// 9
388 */
389 /* static void
390 test_gnc_sql_add_colname_to_list (Fixture *fixture, gconstpointer pData)
391 {
392 }*/
393 /* gnc_sql_add_subtable_colnames_to_list
394 void
395 gnc_sql_add_subtable_colnames_to_list (const GncSqlColumnTableEntry* table_row, const GncSqlColumnTableEntry* subtable,
396 GList** pList)// C: 1 */
397 /* static void
398 test_gnc_sql_add_subtable_colnames_to_list (Fixture *fixture, gconstpointer pData)
399 {
400 }*/
401 /* create_column_info
402 static GncSqlColumnInfo*
403 create_column_info (const GncSqlColumnTableEntry* table_row, GncSqlBasicColumnType type,
404 gint size, gboolean is_unicode)// 9
405 */
406 /* static void
407 test_create_column_info (Fixture *fixture, gconstpointer pData)
408 {
409 }*/
410 /* load_string
411 static void
412 load_string (const GncSqlBackend* be, GncSqlRow* row,
413 const GncSqlColumnTableEntry* table_row)// 2
414 */
415 /* static void
416 test_load_string (Fixture *fixture, gconstpointer pData)
417 {
418 }*/
419 /* add_string_col_info_to_list
420 static void
421 add_string_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,
422 GList** pList)// 2
423 */
424 /* static void
425 test_add_string_col_info_to_list (Fixture *fixture, gconstpointer pData)
426 {
427 }*/
428 /* add_gvalue_string_to_slist
429 static void
430 add_gvalue_string_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,
431 const gpointer pObject, const GncSqlColumnTableEntry* table_row, GSList** pList)// 2
432 */
433 /* static void
434 test_add_gvalue_string_to_slist (Fixture *fixture, gconstpointer pData)
435 {
436 }*/
437 /* load_int
438 static void
439 load_int (const GncSqlBackend* be, GncSqlRow* row,// 4
440 */
441 /* static void
442 test_load_int (Fixture *fixture, gconstpointer pData)
443 {
444 }*/
445 /* add_int_col_info_to_list
446 static void
447 add_int_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,// 2
448 */
449 /* static void
450 test_add_int_col_info_to_list (Fixture *fixture, gconstpointer pData)
451 {
452 }*/
453 /* add_gvalue_int_to_slist
454 static void
455 add_gvalue_int_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 2
456 */
457 /* static void
458 test_add_gvalue_int_to_slist (Fixture *fixture, gconstpointer pData)
459 {
460 }*/
461 /* load_boolean
462 static void
463 load_boolean (const GncSqlBackend* be, GncSqlRow* row,// 2
464 */
465 /* static void
466 test_load_boolean (Fixture *fixture, gconstpointer pData)
467 {
468 }*/
469 /* add_boolean_col_info_to_list
470 static void
471 add_boolean_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,// 2
472 */
473 /* static void
474 test_add_boolean_col_info_to_list (Fixture *fixture, gconstpointer pData)
475 {
476 }*/
477 /* add_gvalue_boolean_to_slist
478 static void
479 add_gvalue_boolean_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 2
480 */
481 /* static void
482 test_add_gvalue_boolean_to_slist (Fixture *fixture, gconstpointer pData)
483 {
484 }*/
485 /* load_int64
486 static void
487 load_int64 (const GncSqlBackend* be, GncSqlRow* row,// 2
488 */
489 /* static void
490 test_load_int64 (Fixture *fixture, gconstpointer pData)
491 {
492 }*/
493 /* add_int64_col_info_to_list
494 static void
495 add_int64_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,// 2
496 */
497 /* static void
498 test_add_int64_col_info_to_list (Fixture *fixture, gconstpointer pData)
499 {
500 }*/
501 /* add_gvalue_int64_to_slist
502 static void
503 add_gvalue_int64_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 2
504 */
505 /* static void
506 test_add_gvalue_int64_to_slist (Fixture *fixture, gconstpointer pData)
507 {
508 }*/
509 /* load_double
510 static void
511 load_double (const GncSqlBackend* be, GncSqlRow* row,// 2
512 */
513 /* static void
514 test_load_double (Fixture *fixture, gconstpointer pData)
515 {
516 }*/
517 /* add_double_col_info_to_list
518 static void
519 add_double_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,// 2
520 */
521 /* static void
522 test_add_double_col_info_to_list (Fixture *fixture, gconstpointer pData)
523 {
524 }*/
525 /* add_gvalue_double_to_slist
526 static void
527 add_gvalue_double_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 2
528 */
529 /* static void
530 test_add_gvalue_double_to_slist (Fixture *fixture, gconstpointer pData)
531 {
532 }*/
533 /* load_guid
534 static void
535 load_guid (const GncSqlBackend* be, GncSqlRow* row,// 3
536 */
537 /* static void
538 test_load_guid (Fixture *fixture, gconstpointer pData)
539 {
540 }*/
541 /* add_guid_col_info_to_list
542 static void
543 add_guid_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,// 3
544 */
545 /* static void
546 test_add_guid_col_info_to_list (Fixture *fixture, gconstpointer pData)
547 {
548 }*/
549 /* add_gvalue_guid_to_slist
550 static void
551 add_gvalue_guid_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 2
552 */
553 /* static void
554 test_add_gvalue_guid_to_slist (Fixture *fixture, gconstpointer pData)
555 {
556 }*/
557 // Not Used
558 /* gnc_sql_add_gvalue_objectref_guid_to_slist
559 void
560 gnc_sql_add_gvalue_objectref_guid_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 1
561 */
562 /* static void
563 test_gnc_sql_add_gvalue_objectref_guid_to_slist (Fixture *fixture, gconstpointer pData)
564 {
565 }*/
566 // Not Used
567 /* gnc_sql_add_objectref_guid_col_info_to_list
568 void
569 gnc_sql_add_objectref_guid_col_info_to_list (const GncSqlBackend* be,// 1
570 */
571 /* static void
572 test_gnc_sql_add_objectref_guid_col_info_to_list (Fixture *fixture, gconstpointer pData)
573 {
574 }*/
575 /* gnc_sql_convert_timespec_to_string
576 gchar*
577 gnc_sql_convert_timespec_to_string (const GncSqlBackend* be, Timespec ts)// C: 1 */
578 static Timespec*
579 gnc_date_string_to_timespec_gmt (gchar *datestr)
580 {
581  Timespec *ts = g_slice_new0 (Timespec);
582  gint yr, mo, da, hr, min;
583  gdouble sec;
584  GDateTime *dt = NULL;
585 
586  sscanf (datestr, "%04d-%02d-%02d %02d:%02d:%02lf",
587  &yr, &mo, &da, &hr, &min, &sec);
588  g_assert_cmpint (1, <=, yr);
589  g_assert_cmpint (9999, >=, yr);
590  g_assert_cmpint (1, <=, mo);
591  g_assert_cmpint (12, >=, mo);
592  g_assert_cmpint (1, <=, da);
593  if (mo == 1 || mo == 3 || mo == 5 || mo == 7
594  || mo == 8 || mo == 10 || mo == 12)
595  g_assert_cmpint (31, >=, da);
596  else if (mo != 2)
597  g_assert_cmpint (30, >=, da);
598  else if (yr % 4 == 0 && !(yr % 400 == 0 && yr % 2000 != 0))
599  g_assert_cmpint (29, >=, da);
600  else
601  g_assert_cmpint (28, >=, da);
602  g_assert_cmpint (0, <=, hr);
603  g_assert_cmpint (60, >=, hr);
604  g_assert_cmpint (0, <=, min);
605  g_assert_cmpint (60, >=, min);
606  g_assert_cmpfloat (0.0, <=, sec);
607  g_assert_cmpfloat (60.0, >=, sec);
608  dt = g_date_time_new_utc (yr, mo, da, hr, min, sec);
609  ts->tv_sec = g_date_time_to_unix (dt);
610  ts->tv_nsec = g_date_time_get_microsecond (dt) * 1000;
611  g_date_time_unref (dt);
612  return ts;
613 }
614 
615 #define numtests 6
616 static void
617 test_gnc_sql_convert_timespec_to_string ()
618 {
619  GncSqlBackend be = {{
620  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
621  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
622  0, NULL, 0, "", NULL, 0, "", NULL, NULL
623  },
624  NULL, NULL, FALSE, FALSE, FALSE, 0, 0, NULL,
625  "%4d-%02d-%02d %02d:%02d:%02d"
626  };
627  gchar *date[numtests] = {"1995-03-11 19:17:26",
628  "2001-04-20 11:44:07",
629  "1964-02-29 09:15:23",
630  "1959-04-02 00:00:00",
631  "2043-11-22 05:32:45",
632  "2153-12-18 01:15:30"
633  };
634  int i;
635  for (i = 0; i < numtests; i++)
636  {
637 
638  Timespec *ts = gnc_date_string_to_timespec_gmt (date[i]);
639  gchar *datestr = gnc_sql_convert_timespec_to_string (&be, *ts);
640  g_assert_cmpstr (date[i], ==, datestr);
641 
642  g_free (datestr);
643  g_slice_free (Timespec, ts);
644  }
645 
646 }
647 /* load_timespec
648 static void
649 load_timespec (const GncSqlBackend* be, GncSqlRow* row,// 2
650 */
651 /* static void
652 test_load_timespec (Fixture *fixture, gconstpointer pData)
653 {
654 }*/
655 /* add_timespec_col_info_to_list
656 static void
657 add_timespec_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,// 2
658 */
659 /* static void
660 test_add_timespec_col_info_to_list (Fixture *fixture, gconstpointer pData)
661 {
662 }*/
663 /* add_gvalue_timespec_to_slist
664 static void
665 add_gvalue_timespec_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 2
666 */
667 /* static void
668 test_add_gvalue_timespec_to_slist (Fixture *fixture, gconstpointer pData)
669 {
670 }*/
671 /* load_date
672 static void
673 load_date (const GncSqlBackend* be, GncSqlRow* row,// 2
674 */
675 /* static void
676 test_load_date (Fixture *fixture, gconstpointer pData)
677 {
678 }*/
679 /* add_date_col_info_to_list
680 static void
681 add_date_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,// 2
682 */
683 /* static void
684 test_add_date_col_info_to_list (Fixture *fixture, gconstpointer pData)
685 {
686 }*/
687 /* add_gvalue_date_to_slist
688 static void
689 add_gvalue_date_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 2
690 */
691 /* static void
692 test_add_gvalue_date_to_slist (Fixture *fixture, gconstpointer pData)
693 {
694 }*/
695 /* load_numeric
696 static void
697 load_numeric (const GncSqlBackend* be, GncSqlRow* row,// 2
698 */
699 /* static void
700 test_load_numeric (Fixture *fixture, gconstpointer pData)
701 {
702 }*/
703 /* add_numeric_col_info_to_list
704 static void
705 add_numeric_col_info_to_list (const GncSqlBackend* be, const GncSqlColumnTableEntry* table_row,// 2
706 */
707 /* static void
708 test_add_numeric_col_info_to_list (Fixture *fixture, gconstpointer pData)
709 {
710 }*/
711 /* add_numeric_colname_to_list
712 static void
713 add_numeric_colname_to_list (const GncSqlColumnTableEntry* table_row, GList** pList)// 2
714 */
715 /* static void
716 test_add_numeric_colname_to_list (Fixture *fixture, gconstpointer pData)
717 {
718 }*/
719 /* add_gvalue_numeric_to_slist
720 static void
721 add_gvalue_numeric_to_slist (const GncSqlBackend* be, QofIdTypeConst obj_name,// 2
722 */
723 /* static void
724 test_add_gvalue_numeric_to_slist (Fixture *fixture, gconstpointer pData)
725 {
726 }*/
727 /* get_handler
728 get_handler (const GncSqlColumnTableEntry* table_row)// C: 1 */
729 /* static void
730 test_get_handler (Fixture *fixture, gconstpointer pData)
731 {
732 }*/
733 /* register_standard_col_type_handlers
734 static void
735 register_standard_col_type_handlers (void)// 3
736 */
737 /* static void
738 test_register_standard_col_type_handlers (Fixture *fixture, gconstpointer pData)
739 {
740 }*/
741 // Make Static
742 /* _retrieve_guid_
743 void
744 _retrieve_guid_ (gpointer pObject, gpointer pValue)// 3
745 */
746 /* static void
747 test__retrieve_guid_ (Fixture *fixture, gconstpointer pData)
748 {
749 }*/
750 /* gnc_sql_load_guid
751 const GncGUID*
752 gnc_sql_load_guid (const GncSqlBackend* be, GncSqlRow* row)// C: 15 in 14 */
753 /* static void
754 test_gnc_sql_load_guid (Fixture *fixture, gconstpointer pData)
755 {
756 }*/
757 // Not Used
758 /* gnc_sql_load_tx_guid
759 const GncGUID*
760 gnc_sql_load_tx_guid (const GncSqlBackend* be, GncSqlRow* row)// 1
761 */
762 /* static void
763 test_gnc_sql_load_tx_guid (Fixture *fixture, gconstpointer pData)
764 {
765 }*/
766 /* gnc_sql_load_object
767 void
768 gnc_sql_load_object (const GncSqlBackend* be, GncSqlRow* row,// C: 29 in 19 */
769 /* static void
770 test_gnc_sql_load_object (Fixture *fixture, gconstpointer pData)
771 {
772 }*/
773 /* gnc_sql_create_select_statement
774 gnc_sql_create_select_statement (GncSqlBackend* be, const gchar* table_name)// C: 16 in 16 */
775 /* static void
776 test_gnc_sql_create_select_statement (Fixture *fixture, gconstpointer pData)
777 {
778 }*/
779 // Make Static
780 /* create_single_col_select_statement
781 create_single_col_select_statement (GncSqlBackend* be,// 2
782 */
783 /* static void
784 test_create_single_col_select_statement (Fixture *fixture, gconstpointer pData)
785 {
786 }*/
787 /* gnc_sql_execute_select_statement
788 gnc_sql_execute_select_statement (GncSqlBackend* be, GncSqlStatement* stmt)// C: 25 in 19 */
789 /* static void
790 test_gnc_sql_execute_select_statement (Fixture *fixture, gconstpointer pData)
791 {
792 }*/
793 /* gnc_sql_create_statement_from_sql
794 gnc_sql_create_statement_from_sql (GncSqlBackend* be, const gchar* sql)// C: 11 in 3 */
795 /* static void
796 test_gnc_sql_create_statement_from_sql (Fixture *fixture, gconstpointer pData)
797 {
798 }*/
799 /* gnc_sql_execute_select_sql
800 gnc_sql_execute_select_sql (GncSqlBackend* be, const gchar* sql)// C: 1 */
801 /* static void
802 test_gnc_sql_execute_select_sql (Fixture *fixture, gconstpointer pData)
803 {
804 }*/
805 /* gnc_sql_execute_nonselect_sql
806 gint
807 gnc_sql_execute_nonselect_sql (GncSqlBackend* be, const gchar* sql)// C: 1 */
808 /* static void
809 test_gnc_sql_execute_nonselect_sql (Fixture *fixture, gconstpointer pData)
810 {
811 }*/
812 /* execute_statement_get_count
813 static guint
814 execute_statement_get_count (GncSqlBackend* be, GncSqlStatement* stmt)// 2
815 */
816 /* static void
817 test_execute_statement_get_count (Fixture *fixture, gconstpointer pData)
818 {
819 }*/
820 /* gnc_sql_append_guid_list_to_sql
821 guint
822 gnc_sql_append_guid_list_to_sql (GString* sql, GList* list, guint maxCount)// C: 2 in 2 */
823 /* static void
824 test_gnc_sql_append_guid_list_to_sql (Fixture *fixture, gconstpointer pData)
825 {
826 }*/
827 /* gnc_sql_object_is_it_in_db
828 gboolean
829 gnc_sql_object_is_it_in_db (GncSqlBackend* be, const gchar* table_name,// C: 1 */
830 /* static void
831 test_gnc_sql_object_is_it_in_db (Fixture *fixture, gconstpointer pData)
832 {
833 }*/
834 /* gnc_sql_do_db_operation
835 gboolean
836 gnc_sql_do_db_operation (GncSqlBackend* be,// C: 22 in 12 */
837 /* static void
838 test_gnc_sql_do_db_operation (Fixture *fixture, gconstpointer pData)
839 {
840 }*/
841 /* create_gslist_from_values
842 static GSList*
843 create_gslist_from_values (GncSqlBackend* be,// 3
844 */
845 /* static void
846 test_create_gslist_from_values (Fixture *fixture, gconstpointer pData)
847 {
848 }*/
849 /* gnc_sql_get_sql_value
850 gchar*
851 gnc_sql_get_sql_value (const GncSqlConnection* conn, const GValue* value)// C: 1 */
852 /* static void
853 test_gnc_sql_get_sql_value (Fixture *fixture, gconstpointer pData)
854 {
855 }*/
856 /* free_gvalue_list
857 static void
858 free_gvalue_list (GSList* list)// 4
859 */
860 /* static void
861 test_free_gvalue_list (Fixture *fixture, gconstpointer pData)
862 {
863 }*/
864 // Make Static
865 /* build_insert_statement
866 build_insert_statement (GncSqlBackend* be,// 3
867 */
868 /* static void
869 test_build_insert_statement (Fixture *fixture, gconstpointer pData)
870 {
871 }*/
872 // Make Static
873 /* build_update_statement
874 build_update_statement (GncSqlBackend* be,// 3
875 */
876 /* static void
877 test_build_update_statement (Fixture *fixture, gconstpointer pData)
878 {
879 }*/
880 // Make Static
881 /* build_delete_statement
882 build_delete_statement (GncSqlBackend* be,// 3
883 */
884 /* static void
885 test_build_delete_statement (Fixture *fixture, gconstpointer pData)
886 {
887 }*/
888 /* gnc_sql_commit_standard_item
889 gboolean
890 gnc_sql_commit_standard_item (GncSqlBackend* be, QofInstance* inst, const gchar* tableName,// C: 7 in 7 */
891 /* static void
892 test_gnc_sql_commit_standard_item (Fixture *fixture, gconstpointer pData)
893 {
894 }*/
895 /* do_create_table
896 static gboolean
897 do_create_table (const GncSqlBackend* be, const gchar* table_name,// 5
898 */
899 /* static void
900 test_do_create_table (Fixture *fixture, gconstpointer pData)
901 {
902 }*/
903 /* gnc_sql_create_table
904 gboolean
905 gnc_sql_create_table (GncSqlBackend* be, const gchar* table_name,// C: 22 in 19 */
906 /* static void
907 test_gnc_sql_create_table (Fixture *fixture, gconstpointer pData)
908 {
909 }*/
910 // Make Static
911 /* gnc_sql_create_temp_table
912 gboolean
913 gnc_sql_create_temp_table (const GncSqlBackend* be, const gchar* table_name,// 2
914 */
915 /* static void
916 test_gnc_sql_create_temp_table (Fixture *fixture, gconstpointer pData)
917 {
918 }*/
919 /* gnc_sql_create_index
920 gboolean
921 gnc_sql_create_index (const GncSqlBackend* be, const gchar* index_name,// C: 7 in 2 */
922 /* static void
923 test_gnc_sql_create_index (Fixture *fixture, gconstpointer pData)
924 {
925 }*/
926 /* gnc_sql_get_table_version
927 gint
928 gnc_sql_get_table_version (const GncSqlBackend* be, const gchar* table_name)// C: 24 in 20 */
929 /* static void
930 test_gnc_sql_get_table_version (Fixture *fixture, gconstpointer pData)
931 {
932 }*/
933 /* gnc_sql_upgrade_table
934 void
935 gnc_sql_upgrade_table (GncSqlBackend* be, const gchar* table_name,// C: 12 in 10 */
936 /* static void
937 test_gnc_sql_upgrade_table (Fixture *fixture, gconstpointer pData)
938 {
939 }*/
940 /* gnc_sql_add_columns_to_table
941 gboolean gnc_sql_add_columns_to_table (GncSqlBackend* be, const gchar* table_name,// C: 1 */
942 /* static void
943 test_gnc_sql_add_columns_to_table (Fixture *fixture, gconstpointer pData)
944 {
945 }*/
946 /* gnc_sql_init_version_info
947 void
948 gnc_sql_init_version_info (GncSqlBackend* be)// C: 1 */
949 /* static void
950 test_gnc_sql_init_version_info (Fixture *fixture, gconstpointer pData)
951 {
952 }*/
953 /* reset_version_info
954 static gboolean
955 reset_version_info (GncSqlBackend* be)// 3
956 */
957 /* static void
958 test_reset_version_info (Fixture *fixture, gconstpointer pData)
959 {
960 }*/
961 /* gnc_sql_finalize_version_info
962 void
963 gnc_sql_finalize_version_info (GncSqlBackend* be)// C: 1 */
964 /* static void
965 test_gnc_sql_finalize_version_info (Fixture *fixture, gconstpointer pData)
966 {
967 }*/
968 /* gnc_sql_set_table_version
969 gboolean
970 gnc_sql_set_table_version (GncSqlBackend* be, const gchar* table_name, gint version)// C: 12 in 10 */
971 /* static void
972 test_gnc_sql_set_table_version (Fixture *fixture, gconstpointer pData)
973 {
974 }*/
975 
976 
977 void
978 test_suite_gnc_backend_sql (void)
979 {
980 
981 // GNC_TEST_ADD (suitename, "gnc sql init", Fixture, NULL, test_gnc_sql_init, teardown);
982 // GNC_TEST_ADD (suitename, "create tables cb", Fixture, NULL, test_create_tables_cb, teardown);
983 // GNC_TEST_ADD (suitename, "gnc sql set load order", Fixture, NULL, test_gnc_sql_set_load_order, teardown);
984 // GNC_TEST_ADD (suitename, "initial load cb", Fixture, NULL, test_initial_load_cb, teardown);
985 // GNC_TEST_ADD (suitename, "gnc sql load", Fixture, NULL, test_gnc_sql_load, teardown);
986 // GNC_TEST_ADD (suitename, "write account tree", Fixture, NULL, test_write_account_tree, teardown);
987 // GNC_TEST_ADD (suitename, "write accounts", Fixture, NULL, test_write_accounts, teardown);
988 // GNC_TEST_ADD (suitename, "write tx", Fixture, NULL, test_write_tx, teardown);
989 // GNC_TEST_ADD (suitename, "write transactions", Fixture, NULL, test_write_transactions, teardown);
990 // GNC_TEST_ADD (suitename, "write template transactions", Fixture, NULL, test_write_template_transactions, teardown);
991 // GNC_TEST_ADD (suitename, "write schedXactions", Fixture, NULL, test_write_schedXactions, teardown);
992 // GNC_TEST_ADD (suitename, "write cb", Fixture, NULL, test_write_cb, teardown);
993 // GNC_TEST_ADD (suitename, "update progress", Fixture, NULL, test_update_progress, teardown);
994 // GNC_TEST_ADD (suitename, "finish progress", Fixture, NULL, test_finish_progress, teardown);
995 // GNC_TEST_ADD (suitename, "gnc sql sync all", Fixture, NULL, test_gnc_sql_sync_all, teardown);
996 // GNC_TEST_ADD (suitename, "gnc sql begin edit", Fixture, NULL, test_gnc_sql_begin_edit, teardown);
997 // GNC_TEST_ADD (suitename, "gnc sql rollback edit", Fixture, NULL, test_gnc_sql_rollback_edit, teardown);
998 // GNC_TEST_ADD (suitename, "commit cb", Fixture, NULL, test_commit_cb, teardown);
999  GNC_TEST_ADD_FUNC (suitename, "gnc sql commit edit", test_gnc_sql_commit_edit);
1000 // GNC_TEST_ADD (suitename, "handle and term", Fixture, NULL, test_handle_and_term, teardown);
1001 // GNC_TEST_ADD (suitename, "compile query cb", Fixture, NULL, test_compile_query_cb, teardown);
1002 // GNC_TEST_ADD (suitename, "gnc sql compile query", Fixture, NULL, test_gnc_sql_compile_query, teardown);
1003 // GNC_TEST_ADD (suitename, "convert search obj", Fixture, NULL, test_convert_search_obj, teardown);
1004 // GNC_TEST_ADD (suitename, "gnc sql compile query to sql", Fixture, NULL, test_gnc_sql_compile_query_to_sql, teardown);
1005 // GNC_TEST_ADD (suitename, "free query cb", Fixture, NULL, test_free_query_cb, teardown);
1006 // GNC_TEST_ADD (suitename, "gnc sql free query", Fixture, NULL, test_gnc_sql_free_query, teardown);
1007 // GNC_TEST_ADD (suitename, "run query cb", Fixture, NULL, test_run_query_cb, teardown);
1008 // GNC_TEST_ADD (suitename, "gnc sql run query", Fixture, NULL, test_gnc_sql_run_query, teardown);
1009 // GNC_TEST_ADD (suitename, "business core sql init", Fixture, NULL, test_business_core_sql_init, teardown);
1010 // GNC_TEST_ADD (suitename, "gnc sql init object handlers", Fixture, NULL, test_gnc_sql_init_object_handlers, teardown);
1011 // GNC_TEST_ADD (suitename, "gnc sql get integer value", Fixture, NULL, test_gnc_sql_get_integer_value, teardown);
1012 // GNC_TEST_ADD (suitename, "get autoinc id", Fixture, NULL, test_get_autoinc_id, teardown);
1013 // GNC_TEST_ADD (suitename, "set autoinc id", Fixture, NULL, test_set_autoinc_id, teardown);
1014 // GNC_TEST_ADD (suitename, "gnc sql get getter", Fixture, NULL, test_gnc_sql_get_getter, teardown);
1015 // GNC_TEST_ADD (suitename, "gnc sql add colname to list", Fixture, NULL, test_gnc_sql_add_colname_to_list, teardown);
1016 // GNC_TEST_ADD (suitename, "gnc sql add subtable colnames to list", Fixture, NULL, test_gnc_sql_add_subtable_colnames_to_list, teardown);
1017 // GNC_TEST_ADD (suitename, "create column info", Fixture, NULL, test_create_column_info, teardown);
1018 // GNC_TEST_ADD (suitename, "load string", Fixture, NULL, test_load_string, teardown);
1019 // GNC_TEST_ADD (suitename, "add string col info to list", Fixture, NULL, test_add_string_col_info_to_list, teardown);
1020 // GNC_TEST_ADD (suitename, "add gvalue string to slist", Fixture, NULL, test_add_gvalue_string_to_slist, teardown);
1021 // GNC_TEST_ADD (suitename, "load int", Fixture, NULL, test_load_int, teardown);
1022 // GNC_TEST_ADD (suitename, "add int col info to list", Fixture, NULL, test_add_int_col_info_to_list, teardown);
1023 // GNC_TEST_ADD (suitename, "add gvalue int to slist", Fixture, NULL, test_add_gvalue_int_to_slist, teardown);
1024 // GNC_TEST_ADD (suitename, "load boolean", Fixture, NULL, test_load_boolean, teardown);
1025 // GNC_TEST_ADD (suitename, "add boolean col info to list", Fixture, NULL, test_add_boolean_col_info_to_list, teardown);
1026 // GNC_TEST_ADD (suitename, "add gvalue boolean to slist", Fixture, NULL, test_add_gvalue_boolean_to_slist, teardown);
1027 // GNC_TEST_ADD (suitename, "load int64", Fixture, NULL, test_load_int64, teardown);
1028 // GNC_TEST_ADD (suitename, "add int64 col info to list", Fixture, NULL, test_add_int64_col_info_to_list, teardown);
1029 // GNC_TEST_ADD (suitename, "add gvalue int64 to slist", Fixture, NULL, test_add_gvalue_int64_to_slist, teardown);
1030 // GNC_TEST_ADD (suitename, "load double", Fixture, NULL, test_load_double, teardown);
1031 // GNC_TEST_ADD (suitename, "add double col info to list", Fixture, NULL, test_add_double_col_info_to_list, teardown);
1032 // GNC_TEST_ADD (suitename, "add gvalue double to slist", Fixture, NULL, test_add_gvalue_double_to_slist, teardown);
1033 // GNC_TEST_ADD (suitename, "load guid", Fixture, NULL, test_load_guid, teardown);
1034 // GNC_TEST_ADD (suitename, "add guid col info to list", Fixture, NULL, test_add_guid_col_info_to_list, teardown);
1035 // GNC_TEST_ADD (suitename, "add gvalue guid to slist", Fixture, NULL, test_add_gvalue_guid_to_slist, teardown);
1036 // GNC_TEST_ADD (suitename, "gnc sql add gvalue objectref guid to slist", Fixture, NULL, test_gnc_sql_add_gvalue_objectref_guid_to_slist, teardown);
1037 // GNC_TEST_ADD (suitename, "gnc sql add objectref guid col info to list", Fixture, NULL, test_gnc_sql_add_objectref_guid_col_info_to_list, teardown);
1038  GNC_TEST_ADD_FUNC (suitename, "gnc sql convert timespec to string", test_gnc_sql_convert_timespec_to_string);
1039 // GNC_TEST_ADD (suitename, "load timespec", Fixture, NULL, test_load_timespec, teardown);
1040 // GNC_TEST_ADD (suitename, "add timespec col info to list", Fixture, NULL, test_add_timespec_col_info_to_list, teardown);
1041 // GNC_TEST_ADD (suitename, "add gvalue timespec to slist", Fixture, NULL, test_add_gvalue_timespec_to_slist, teardown);
1042 // GNC_TEST_ADD (suitename, "load date", Fixture, NULL, test_load_date, teardown);
1043 // GNC_TEST_ADD (suitename, "add date col info to list", Fixture, NULL, test_add_date_col_info_to_list, teardown);
1044 // GNC_TEST_ADD (suitename, "add gvalue date to slist", Fixture, NULL, test_add_gvalue_date_to_slist, teardown);
1045 // GNC_TEST_ADD (suitename, "load numeric", Fixture, NULL, test_load_numeric, teardown);
1046 // GNC_TEST_ADD (suitename, "add numeric col info to list", Fixture, NULL, test_add_numeric_col_info_to_list, teardown);
1047 // GNC_TEST_ADD (suitename, "add numeric colname to list", Fixture, NULL, test_add_numeric_colname_to_list, teardown);
1048 // GNC_TEST_ADD (suitename, "add gvalue numeric to slist", Fixture, NULL, test_add_gvalue_numeric_to_slist, teardown);
1049 // GNC_TEST_ADD (suitename, "get handler", Fixture, NULL, test_get_handler, teardown);
1050 // GNC_TEST_ADD (suitename, "register standard col type handlers", Fixture, NULL, test_register_standard_col_type_handlers, teardown);
1051 // GNC_TEST_ADD (suitename, " retrieve guid ", Fixture, NULL, test__retrieve_guid_, teardown);
1052 // GNC_TEST_ADD (suitename, "gnc sql load guid", Fixture, NULL, test_gnc_sql_load_guid, teardown);
1053 // GNC_TEST_ADD (suitename, "gnc sql load tx guid", Fixture, NULL, test_gnc_sql_load_tx_guid, teardown);
1054 // GNC_TEST_ADD (suitename, "gnc sql load object", Fixture, NULL, test_gnc_sql_load_object, teardown);
1055 // GNC_TEST_ADD (suitename, "gnc sql create select statement", Fixture, NULL, test_gnc_sql_create_select_statement, teardown);
1056 // GNC_TEST_ADD (suitename, "create single col select statement", Fixture, NULL, test_create_single_col_select_statement, teardown);
1057 // GNC_TEST_ADD (suitename, "gnc sql execute select statement", Fixture, NULL, test_gnc_sql_execute_select_statement, teardown);
1058 // GNC_TEST_ADD (suitename, "gnc sql create statement from sql", Fixture, NULL, test_gnc_sql_create_statement_from_sql, teardown);
1059 // GNC_TEST_ADD (suitename, "gnc sql execute select sql", Fixture, NULL, test_gnc_sql_execute_select_sql, teardown);
1060 // GNC_TEST_ADD (suitename, "gnc sql execute nonselect sql", Fixture, NULL, test_gnc_sql_execute_nonselect_sql, teardown);
1061 // GNC_TEST_ADD (suitename, "execute statement get count", Fixture, NULL, test_execute_statement_get_count, teardown);
1062 // GNC_TEST_ADD (suitename, "gnc sql append guid list to sql", Fixture, NULL, test_gnc_sql_append_guid_list_to_sql, teardown);
1063 // GNC_TEST_ADD (suitename, "gnc sql object is it in db", Fixture, NULL, test_gnc_sql_object_is_it_in_db, teardown);
1064 // GNC_TEST_ADD (suitename, "gnc sql do db operation", Fixture, NULL, test_gnc_sql_do_db_operation, teardown);
1065 // GNC_TEST_ADD (suitename, "create gslist from values", Fixture, NULL, test_create_gslist_from_values, teardown);
1066 // GNC_TEST_ADD (suitename, "gnc sql get sql value", Fixture, NULL, test_gnc_sql_get_sql_value, teardown);
1067 // GNC_TEST_ADD (suitename, "free gvalue list", Fixture, NULL, test_free_gvalue_list, teardown);
1068 // GNC_TEST_ADD (suitename, "build insert statement", Fixture, NULL, test_build_insert_statement, teardown);
1069 // GNC_TEST_ADD (suitename, "build update statement", Fixture, NULL, test_build_update_statement, teardown);
1070 // GNC_TEST_ADD (suitename, "build delete statement", Fixture, NULL, test_build_delete_statement, teardown);
1071 // GNC_TEST_ADD (suitename, "gnc sql commit standard item", Fixture, NULL, test_gnc_sql_commit_standard_item, teardown);
1072 // GNC_TEST_ADD (suitename, "do create table", Fixture, NULL, test_do_create_table, teardown);
1073 // GNC_TEST_ADD (suitename, "gnc sql create table", Fixture, NULL, test_gnc_sql_create_table, teardown);
1074 // GNC_TEST_ADD (suitename, "gnc sql create temp table", Fixture, NULL, test_gnc_sql_create_temp_table, teardown);
1075 // GNC_TEST_ADD (suitename, "gnc sql create index", Fixture, NULL, test_gnc_sql_create_index, teardown);
1076 // GNC_TEST_ADD (suitename, "gnc sql get table version", Fixture, NULL, test_gnc_sql_get_table_version, teardown);
1077 // GNC_TEST_ADD (suitename, "gnc sql upgrade table", Fixture, NULL, test_gnc_sql_upgrade_table, teardown);
1078 // GNC_TEST_ADD (suitename, "gnc sql add columns to table", Fixture, NULL, test_gnc_sql_add_columns_to_table, teardown);
1079 // GNC_TEST_ADD (suitename, "gnc sql init version info", Fixture, NULL, test_gnc_sql_init_version_info, teardown);
1080 // GNC_TEST_ADD (suitename, "reset version info", Fixture, NULL, test_reset_version_info, teardown);
1081 // GNC_TEST_ADD (suitename, "gnc sql finalize version info", Fixture, NULL, test_gnc_sql_finalize_version_info, teardown);
1082 // GNC_TEST_ADD (suitename, "gnc sql set table version", Fixture, NULL, test_gnc_sql_set_table_version, teardown);
1083 
1084 }
gboolean loading
void qof_book_set_dirty_cb(QofBook *book, QofBookDirtyCB cb, gpointer user_data)
QofBook * qof_book_new(void)
Use a 64-bit unsigned int timespec.
Definition: gnc-date.h:299
GncSqlConnection * conn
QofBook * book
void qof_instance_init_data(QofInstance *, QofIdType, QofBook *)
gboolean qof_instance_get_dirty_flag(gconstpointer ptr)
gboolean qof_book_session_not_saved(const QofBook *book)
void qof_book_mark_session_dirty(QofBook *book)
void gnc_sql_commit_edit(GncSqlBackend *be, QofInstance *inst)
gboolean(* rollbackTransaction)(GncSqlConnection *)
gboolean(* beginTransaction)(GncSqlConnection *)
gboolean(* commitTransaction)(GncSqlConnection *)
gchar * gnc_sql_convert_timespec_to_string(const GncSqlBackend *be, Timespec ts)