typedef struct {
char *key;
char *value;
- bongo_record_tag_t *next;
+ struct bongo_record_tag_t *next;
} bongo_record_tag_t;
typedef struct {
bongo_record_tag_t *tags;
- bongo_record_node_t *next;
+ struct bongo_record_node_t *next;
} bongo_record_node_t;
typedef struct {
bongo_database_node_t *databases;
} bongo_client_t;
-bongo_client_t *bongo_client_new(void);
-bongo_database_node_t *bongo_database_node_new(bongo_client_t *bongo_client, const char *db_name);
-bongo_collection_node_t *bongo_collection_node_new(bongo_database_node_t *bongo_database_node, const char *col_name);
-bongo_database_node_t *bongo_database_node_search(bongo_client_t *bongo_client, const char *db_name);
-bongo_collection_node_t *bongo_collection_node_search(bongo_database_node_t *bongo_database_node, const char *col_name);
-void bongo_collection_node_destroy(bongo_collection_node_t *bongo_collection_node);
-void bongo_database_node_destroy(bongo_database_node_t *bongo_database_node);
-void bongo_client_destroy(bongo_client_t *bongo_client);
+bongo_client_t *
+bongo_client_new (void);
+
+bongo_database_node_t *
+bongo_database_node_new (bongo_client_t *client,
+ const char *db_name);
+
+bongo_collection_node_t *
+bongo_collection_node_new (bongo_database_node_t *database_node,
+ const char *col_name);
+
+bongo_database_node_t *
+bongo_database_node_search (bongo_client_t *client,
+ const char *db_name);
+
+bongo_collection_node_t *
+bongo_collection_node_search (bongo_database_node_t *database_node,
+ const char *col_name);
+
+void
+bongo_collection_node_destroy (bongo_collection_node_t *collection_node);
+
+void
+bongo_database_node_destroy (bongo_database_node_t *database_node);
+
+void
+bongo_client_destroy (bongo_client_t *client);
/* BongoDB Database */
bongo_database_node_t *database_node;
} bongo_database_t;
-bongo_database_t *bongo_client_get_database(bongo_client_t *bongo_client, const char *db_name);
-void bongo_database_destroy(bongo_database_t *bongo_database);
+bongo_database_t *
+bongo_client_get_database (bongo_client_t *client,
+ const char *db_name);
+
+void
+bongo_database_destroy (bongo_database_t *database);
/* BongoDB Collection */
bongo_collection_node_t *collection_node;
} bongo_collection_t;
-bongo_collection_t *bongo_client_get_collection(bongo_client_t *bongo_client, const char *db_name, const char *col_name);
-void bongo_collection_destroy(bongo_collection_t *bongo_collection);
+bongo_collection_t *
+bongo_client_get_collection (bongo_client_t *client,
+ const char *db_name,
+ const char *col_name);
+
+bool
+bongo_collection_insert (bongo_collection_t *collection,
+ bongo_insert_flags_t flags,
+ const char *document,
+ const bongo_write_concern_t *write_concern,
+ bongo_error_t *error);
+
+void
+bongo_collection_destroy (bongo_collection_t *collection);
#endif /* __BONGODB_H_ */