| 401 | } |
| 402 | |
| 403 | static int test_column_ops(cachedb_funcs *api, cachedb_con *con1, |
| 404 | cachedb_con *con2, const char *cachedb_name) |
| 405 | { |
| 406 | cdb_dict_t cols; |
| 407 | cachedb_con *con; |
| 408 | |
| 409 | if (con2) |
| 410 | con = con2; |
| 411 | else |
| 412 | con = con1; |
| 413 | |
| 414 | if (CACHEDB_CAPABILITY(api, CACHEDB_CAP_TRUNCATE)) |
| 415 | ok(api->truncate(con) == 0, "truncate"); |
| 416 | |
| 417 | if (!ok(test_update(api, con, &cols), "test update-set") |
| 418 | || !ok(test_query(api, con, &cols), "test query-set") |
| 419 | || !ok(test_update_unset(api, con, &cols), "test update-unset") |
| 420 | || !ok(test_query_unset(api, con, &cols, cachedb_name), "test query-unset")) |
| 421 | return 0; |
| 422 | |
| 423 | if (CACHEDB_CAPABILITY(api, CACHEDB_CAP_TRUNCATE)) |
| 424 | ok(api->truncate(con) == 0, "truncate"); |
| 425 | |
| 426 | cdb_free_entries(&cols, osips_pkg_free); |
| 427 | |
| 428 | if (con2) |
| 429 | con = con1; |
| 430 | |
| 431 | if (CACHEDB_CAPABILITY(api, CACHEDB_CAP_TRUNCATE)) |
| 432 | ok(api->truncate(con) == 0, "truncate"); |
| 433 | |
| 434 | if (!ok(test_query_filters(api, con, cachedb_name), "test query filters")) |
| 435 | return 0; |
| 436 | |
| 437 | if (CACHEDB_CAPABILITY(api, CACHEDB_CAP_TRUNCATE)) |
| 438 | ok(api->truncate(con) == 0, "truncate"); |
| 439 | |
| 440 | return 1; |
| 441 | } |
| 442 | |
| 443 | static int test_map_set(cachedb_funcs *api, cachedb_con *con, |
| 444 | cdb_dict_t *out_pairs1, cdb_dict_t *out_pairs2) |
no test coverage detected