2 * BongoDB, an embedded document-based engine
3 * Copyright (C) 2015 by Javier Sancho Fernandez <jsf at jsancho dot org>
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 bongo_record_tag_t *next;
32 bongo_record_tag_t *tags;
33 bongo_record_node_t *next;
34 } bongo_record_node_t;
39 bongo_record_node_t *records;
40 struct bongo_collection_node_t *next;
41 } bongo_collection_node_t;
46 bongo_collection_node_t *collections;
47 struct bongo_database_node_t *next;
48 } bongo_database_node_t;
52 bongo_database_node_t *databases;
55 bongo_client_t *bongo_client_new(void);
56 bongo_database_node_t *bongo_database_node_new(bongo_client_t *bongo_client, const char *db_name);
57 bongo_collection_node_t *bongo_collection_node_new(bongo_database_node_t *bongo_database_node, const char *col_name);
58 bongo_database_node_t *bongo_database_node_search(bongo_client_t *bongo_client, const char *db_name);
59 bongo_collection_node_t *bongo_collection_node_search(bongo_database_node_t *bongo_database_node, const char *col_name);
60 void bongo_collection_node_destroy(bongo_collection_node_t *bongo_collection_node);
61 void bongo_database_node_destroy(bongo_database_node_t *bongo_database_node);
62 void bongo_client_destroy(bongo_client_t *bongo_client);
65 /* BongoDB Database */
68 bongo_database_node_t *database_node;
71 bongo_database_t *bongo_client_get_database(bongo_client_t *bongo_client, const char *db_name);
72 void bongo_database_destroy(bongo_database_t *bongo_database);
75 /* BongoDB Collection */
78 bongo_collection_node_t *collection_node;
81 bongo_collection_t *bongo_client_get_collection(bongo_client_t *bongo_client, const char *db_name, const char *col_name);
82 void bongo_collection_destroy(bongo_collection_t *bongo_collection);
85 #endif /* __BONGODB_H_ */