OpenDNSSEC-enforcer  2.1.6
db_connection.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Jerry Lundström <lundstrom.jerry@gmail.com>
3  * Copyright (c) 2014 .SE (The Internet Infrastructure Foundation).
4  * Copyright (c) 2014 OpenDNSSEC AB (svb)
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
22  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  */
29 
30 #ifndef __db_connection_h
31 #define __db_connection_h
32 
33 struct db_connection;
34 typedef struct db_connection db_connection_t;
35 
36 #include "db_configuration.h"
37 #include "db_backend.h"
38 #include "db_result.h"
39 #include "db_object.h"
40 #include "db_join.h"
41 #include "db_clause.h"
42 
46 struct db_connection {
49 };
50 
56 
61 void db_connection_free(db_connection_t* connection);
62 
69 int db_connection_set_configuration_list(db_connection_t* connection, const db_configuration_list_t* configuration_list);
70 
77 int db_connection_setup(db_connection_t* connection);
78 
84 int db_connection_connect(const db_connection_t* connection);
85 
96 int db_connection_create(const db_connection_t* connection, const db_object_t* object, const db_object_field_list_t* object_field_list, const db_value_set_t* value_set);
97 
107 db_result_list_t* db_connection_read(const db_connection_t* connection, const db_object_t* object, const db_join_list_t* join_list, const db_clause_list_t* clause_list);
108 
118 int db_connection_update(const db_connection_t* connection, 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);
119 
127 int db_connection_delete(const db_connection_t* connection, const db_object_t* object, const db_clause_list_t* clause_list);
128 
138 int db_connection_count(const db_connection_t* connection, const db_object_t* object, const db_join_list_t* join_list, const db_clause_list_t* clause_list, size_t* count);
139 
140 #endif
db_connection_setup
int db_connection_setup(db_connection_t *connection)
Definition: db_connection.c:66
db_join_list
Definition: db_join.h:94
db_object
Definition: db_object.h:201
db_connection_delete
int db_connection_delete(const db_connection_t *connection, const db_object_t *object, const db_clause_list_t *clause_list)
Definition: db_connection.c:156
db_connection_update
int db_connection_update(const db_connection_t *connection, 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: db_connection.c:136
db_clause_list
Definition: db_clause.h:226
db_connection::configuration_list
const db_configuration_list_t * configuration_list
Definition: db_connection.h:47
db_value_set
Definition: db_value.h:281
db_configuration.h
db_connection_create
int db_connection_create(const db_connection_t *connection, const db_object_t *object, const db_object_field_list_t *object_field_list, const db_value_set_t *value_set)
Definition: db_connection.c:102
db_connection_free
void db_connection_free(db_connection_t *connection)
Definition: db_connection.c:45
db_connection::backend
db_backend_t * backend
Definition: db_connection.h:48
db_clause.h
db_result_list
Definition: db_result.h:114
db_object_field_list
Definition: db_object.h:142
db_connection_set_configuration_list
int db_connection_set_configuration_list(db_connection_t *connection, const db_configuration_list_t *configuration_list)
Definition: db_connection.c:54
db_backend
Definition: db_backend.h:384
db_backend.h
db_join.h
db_connection_read
db_result_list_t * db_connection_read(const db_connection_t *connection, const db_object_t *object, const db_join_list_t *join_list, const db_clause_list_t *clause_list)
Definition: db_connection.c:122
db_configuration_list
Definition: db_configuration.h:93
db_result.h
db_connection
Definition: db_connection.h:46
db_connection_connect
int db_connection_connect(const db_connection_t *connection)
Definition: db_connection.c:88
db_connection_new
db_connection_t * db_connection_new(void)
Definition: db_connection.c:38
db_object.h
db_connection_count
int db_connection_count(const db_connection_t *connection, const db_object_t *object, const db_join_list_t *join_list, const db_clause_list_t *clause_list, size_t *count)
Definition: db_connection.c:170