test_classes.c File Reference
`#include "../db_backend.h"`
`#include "../db_clause.h"`
`#include "../db_configuration.h"`
`#include "../db_connection.h"`
`#include "../db_join.h"`
`#include "../db_object.h"`
`#include "../db_result.h"`
`#include "../db_value.h"`
`#include "CUnit/Basic.h"`

Go to the source code of this file.

## Functions

int | init_suite_classes (void)
int | clean_suite_classes (void)
int | __db_backend_handle_initialize (void *data)
int | __db_backend_handle_shutdown (void *data)
int | __db_backend_handle_connect (void *data, const db_configuration_list_t *configuration_list)
int | __db_backend_handle_disconnect (void *data)
int | __db_backend_handle_create (void *data, const db_object_t *_object, const db_object_field_list_t *object_field_list, const db_value_set_t *value_set)
db_result_list_t * | __db_backend_handle_read (void *data, const db_object_t *_object, const db_join_list_t *join_list, const db_clause_list_t *clause_list)
int | __db_backend_handle_update (void *data, const db_object_t *_object, const db_object_field_list_t *object_field_list, const db_value_set_t *value_set, const db_clause_list_t *clause_list)
int | __db_backend_handle_delete (void *data, const db_object_t *_object, const db_clause_list_t *clause_list)
int | __db_backend_handle_count (void *data, const db_object_t *_object, const db_join_list_t *join_list, const db_clause_list_t *clause_list, size_t *count)
void | __db_backend_handle_free (void *data)
int | __db_backend_handle_transaction_begin (void *data)
int | __db_backend_handle_transaction_commit (void *data)
int | __db_backend_handle_transaction_rollback (void *data)
void | test_class_db_backend_handle (void)
void | test_class_db_backend (void)
void | test_class_db_clause (void)
void | test_class_db_clause_list (void)
void | test_class_db_configuration (void)
void | test_class_db_configuration_list (void)
void | test_class_db_connection (void)
void | test_class_db_object_field (void)
void | test_class_db_object_field_list (void)
void | test_class_db_object (void)
void | test_class_db_value_set (void)
void | test_class_db_result (void)
db_result_t * | __db_result_list_next (void *data, int finish)
void | test_class_db_result_list (void)
void | test_class_db_value (void)
void | test_class_end (void)

## Function Documentation

## __db_backend_handle_connect()

int __db_backend_handle_connect | ( | void * | data,
|  | const db_configuration_list_t * | configuration_list
| ) |  |

Definition at line 199 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_count()

int __db_backend_handle_count | ( | void * | data,
|  | const db_object_t * | _object,
|  | const db_join_list_t * | join_list,
|  | const db_clause_list_t * | clause_list,
|  | size_t * | count
| ) |  |

Definition at line 242 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_create()

int __db_backend_handle_create | ( | void * | data,
|  | const db_object_t * | _object,
|  | const db_object_field_list_t * | object_field_list,
|  | const db_value_set_t * | value_set
| ) |  |

Definition at line 210 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_delete()

int __db_backend_handle_delete | ( | void * | data,
|  | const db_object_t * | _object,
|  | const db_clause_list_t * | clause_list
| ) |  |

Definition at line 235 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_disconnect()

int __db_backend_handle_disconnect | ( | void * | data | ) |

Definition at line 205 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_free()

void __db_backend_handle_free | ( | void * | data | ) |

Definition at line 251 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_initialize()

int __db_backend_handle_initialize | ( | void * | data | ) |

Definition at line 189 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_read()

db_result_list_t* __db_backend_handle_read | ( | void * | data,
|  | const db_object_t * | _object,
|  | const db_join_list_t * | join_list,
|  | const db_clause_list_t * | clause_list
| ) |  |

Definition at line 218 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_shutdown()

int __db_backend_handle_shutdown | ( | void * | data | ) |

Definition at line 194 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_transaction_begin()

int __db_backend_handle_transaction_begin | ( | void * | data | ) |

Definition at line 255 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_transaction_commit()

int __db_backend_handle_transaction_commit | ( | void * | data | ) |

Definition at line 260 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_transaction_rollback()

int __db_backend_handle_transaction_rollback | ( | void * | data | ) |

Definition at line 265 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_backend_handle_update()

int __db_backend_handle_update | ( | void * | data,
|  | const db_object_t * | _object,
|  | const db_object_field_list_t * | object_field_list,
|  | const db_value_set_t * | value_set,
|  | const db_clause_list_t * | clause_list
| ) |  |

Definition at line 226 of file test_classes.c.

Referenced by test_class_db_backend_handle().

## __db_result_list_next()

db_result_t* __db_result_list_next | ( | void * | data,
|  | int | finish
| ) |  |

Definition at line 506 of file test_classes.c.

## clean_suite_classes()

int clean_suite_classes | ( | void |  | ) |

Definition at line 145 of file test_classes.c.

References db_backend_free(), db_backend_handle_free(), db_clause_free(), db_clause_list_free(), db_configuration_free(), db_configuration_list_free(), db_connection_free(), db_object_field_free(), db_object_field_list_free(), db_object_free(), db_result_free(), db_result_list_free(), db_value_free(), and db_value_set_free().

Referenced by main().

## init_suite_classes()

int init_suite_classes | ( | void |  | ) |

Definition at line 72 of file test_classes.c.

Referenced by main().

## test_class_db_backend()

void test_class_db_backend | ( | void |  | ) |

Definition at line 296 of file test_classes.c.

References db_backend_connect(), db_backend_initialize(), db_backend_new(), db_backend_set_handle(), and db_backend_set_name().

Referenced by main().

## test_class_db_backend_handle()

void test_class_db_backend_handle | ( | void |  | ) |

Definition at line 270 of file test_classes.c.

References __db_backend_handle_connect(), __db_backend_handle_count(), __db_backend_handle_create(), __db_backend_handle_delete(), __db_backend_handle_disconnect(), __db_backend_handle_free(), __db_backend_handle_initialize(), __db_backend_handle_read(), __db_backend_handle_shutdown(), __db_backend_handle_transaction_begin(), __db_backend_handle_transaction_commit(), __db_backend_handle_transaction_rollback(), __db_backend_handle_update(), db_backend_handle_new(), db_backend_handle_set_connect(), db_backend_handle_set_count(), db_backend_handle_set_create(), db_backend_handle_set_data(), db_backend_handle_set_delete(), db_backend_handle_set_disconnect(), db_backend_handle_set_free(), db_backend_handle_set_initialize(), db_backend_handle_set_read(), db_backend_handle_set_shutdown(), db_backend_handle_set_transaction_begin(), db_backend_handle_set_transaction_commit(), db_backend_handle_set_transaction_rollback(), and db_backend_handle_set_update().

Referenced by main().

## test_class_db_clause()

void test_class_db_clause | ( | void |  | ) |

Definition at line 311 of file test_classes.c.

References db_clause_field(), db_clause_get_value(), db_clause_new(), db_clause_next(), db_clause_not_empty(), DB_CLAUSE_NOT_EQUAL, db_clause_operator(), DB_CLAUSE_OPERATOR_OR, db_clause_set_field(), db_clause_set_operator(), db_clause_set_type(), db_clause_type(), db_clause_value(), and db_value_from_int32().

Referenced by main().

## test_class_db_clause_list()

void test_class_db_clause_list | ( | void |  | ) |

Definition at line 329 of file test_classes.c.

Referenced by main().

## test_class_db_configuration()

void test_class_db_configuration | ( | void |  | ) |

Definition at line 346 of file test_classes.c.

References db_configuration_new(), db_configuration_not_empty(), db_configuration_set_name(), db_configuration_set_value(), and db_configuration_value().

Referenced by main().

## test_class_db_configuration_list()

void test_class_db_configuration_list | ( | void |  | ) |

Definition at line 362 of file test_classes.c.

Referenced by main().

## test_class_db_connection()

void test_class_db_connection | ( | void |  | ) |

Definition at line 382 of file test_classes.c.

References db_connection_new(), and db_connection_set_configuration_list().

Referenced by main().

## test_class_db_object()

void test_class_db_object | ( | void |  | ) |

Definition at line 434 of file test_classes.c.

Referenced by main().

## test_class_db_object_field()

void test_class_db_object_field | ( | void |  | ) |

Definition at line 399 of file test_classes.c.

References db_object_field_name(), db_object_field_new(), db_object_field_not_empty(), db_object_field_set_enum_set(), db_object_field_set_name(), db_object_field_set_type(), db_object_field_type(), DB_TYPE_ENUM, and DB_TYPE_INT32.

Referenced by main().

## test_class_db_object_field_list()

void test_class_db_object_field_list | ( | void |  | ) |

Definition at line 418 of file test_classes.c.

Referenced by main().

## test_class_db_result()

void test_class_db_result | ( | void |  | ) |

Definition at line 489 of file test_classes.c.

Referenced by main().

## test_class_db_result_list()

void test_class_db_result_list | ( | void |  | ) |

Definition at line 538 of file test_classes.c.

Referenced by main().

## test_class_db_value()

void test_class_db_value | ( | void |  | ) |

Definition at line 572 of file test_classes.c.

References DB_TYPE_ENUM, DB_TYPE_INT32, DB_TYPE_INT64, DB_TYPE_TEXT, DB_TYPE_UINT32, DB_TYPE_UINT64, db_value_cmp(), db_value_copy(), db_value_enum_value(), db_value_free(), db_value_from_enum_value(), db_value_from_int32(), db_value_from_int64(), db_value_from_text(), db_value_from_uint32(), db_value_from_uint64(), db_value_new(), db_value_not_empty(), db_value_reset(), db_value_set_primary_key(), db_value_text(), db_value_to_enum_value(), db_value_to_int32(), db_value_to_int64(), db_value_to_text(), db_value_to_uint32(), db_value_to_uint64(), and db_value_type().

Referenced by main().

## test_class_db_value_set()

void test_class_db_value_set | ( | void |  | ) |

Definition at line 461 of file test_classes.c.

References db_value_set_at(), db_value_set_get(), db_value_set_new(), and db_value_set_size().

Referenced by main().

## test_class_end()

void test_class_end | ( | void |  | ) |

Definition at line 705 of file test_classes.c.

References db_backend_free(), db_connection_free(), db_object_field_list_free(), db_result_free(), and db_value_set_free().

Referenced by main().