OpenDNSSEC-enforcer 2.1.13
|
#include "db_configuration.h"
#include "db_backend.h"
#include "db_result.h"
#include "db_object.h"
#include "db_join.h"
#include "db_clause.h"
Go to the source code of this file.
Data Structures | |
struct | db_connection |
Typedefs | |
typedef struct db_connection | db_connection_t |
typedef struct db_connection db_connection_t |
Definition at line 34 of file db_connection.h.
|
extern |
Connect to the database.
[in] | connection | a db_connection_t pointer. |
Definition at line 88 of file db_connection.c.
References db_connection::backend, db_connection::configuration_list, db_backend_connect(), and DB_ERROR_UNKNOWN.
Referenced by get_database_connection(), test_class_db_connection(), and test_initialization_connection().
|
extern |
Count objects from the database. Return the count in count
.
[in] | connection | a db_connection_t pointer. |
[in] | object | a db_object_t pointer. |
[in] | join_list | a db_join_list_t pointer. |
[in] | clause_list | a db_clause_list_t pointer. |
[out] | count | a size_t pointer. |
Definition at line 170 of file db_connection.c.
References db_connection::backend, db_backend_count(), and DB_ERROR_UNKNOWN.
Referenced by db_object_count(), and test_class_db_connection().
|
extern |
Create an object in the database. The object
refer to the database object begin created, the object_field_list
describes the fields that should be set in the object and the value_set
has the values for each field.
[in] | connection | a db_connection_t pointer. |
[in] | object | a db_object_t pointer. |
[in] | object_field_list | a db_object_field_list_t pointer. |
[in] | value_set | a db_value_set_t pointer. |
Definition at line 102 of file db_connection.c.
References db_connection::backend, db_backend_create(), and DB_ERROR_UNKNOWN.
Referenced by db_object_create(), and test_class_db_connection().
|
extern |
Delete an object or objects from the database.
[in] | connection | a db_connection_t pointer. |
[in] | object | a db_object_t pointer. |
[in] | clause_list | a db_clause_list_t pointer. |
Definition at line 156 of file db_connection.c.
References db_connection::backend, db_backend_delete(), and DB_ERROR_UNKNOWN.
Referenced by db_object_delete(), and test_class_db_connection().
|
extern |
Delete a database connection and the database backend within.
[in] | connection | a db_connection_t pointer. |
Definition at line 45 of file db_connection.c.
References db_connection::backend, and db_backend_free().
Referenced by autostart(), clean_suite_classes(), clean_suite_database_operations(), clean_suite_initialization(), enforce_task_flush_all(), engine_setup(), engine_stop_workers(), get_database_connection(), and test_class_end().
|
extern |
Create a new database connection.
Definition at line 38 of file db_connection.c.
Referenced by get_database_connection(), test_class_db_connection(), and test_initialization_connection().
|
extern |
Read an object or objects from the database.
[in] | connection | a db_connection_t pointer. |
[in] | object | a db_object_t pointer. |
[in] | join_list | a db_join_list_t pointer. |
[in] | clause_list | a db_clause_list_t pointer. |
Definition at line 122 of file db_connection.c.
References db_connection::backend, and db_backend_read().
Referenced by db_object_read(), and test_class_db_connection().
|
extern |
Set the database configuration list for a database connection.
[in] | connection | a db_connection_t pointer. |
[in] | configuration_list | a db_configuration_list_t pointer. |
Definition at line 54 of file db_connection.c.
References db_connection::configuration_list, DB_ERROR_UNKNOWN, and DB_OK.
Referenced by get_database_connection(), test_class_db_connection(), and test_initialization_connection().
|
extern |
Setup the database connection, this verifies the information in the database configuration list and allocated a database backend.
[in] | connection | a db_connection_t pointer. |
Definition at line 66 of file db_connection.c.
References db_connection::backend, db_connection::configuration_list, db_backend_factory_get_backend(), db_configuration_list_find(), db_configuration_value(), DB_ERROR_UNKNOWN, and DB_OK.
Referenced by get_database_connection(), test_class_db_connection(), and test_initialization_connection().
|
extern |
Update an object or objects in the database.
[in] | connection | a db_connection_t pointer. |
[in] | object | a db_object_t pointer. |
[in] | object_field_list | a db_object_field_list_t pointer. |
[in] | value_set | a db_value_set_t pointer. |
[in] | clause_list | a db_clause_list_t pointer. |
Definition at line 136 of file db_connection.c.
References db_connection::backend, db_backend_update(), and DB_ERROR_UNKNOWN.
Referenced by db_object_update(), and test_class_db_connection().