aboutsummaryrefslogtreecommitdiff
path: root/db/uobject.h
blob: 05336618ef951d961c491c78f705c2d765999583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef Uobject_H_
#define Uobject_H_

#include <bsoncxx/builder/stream/document.hpp>
#include <bsoncxx/builder/basic/kvp.hpp>
#include <bsoncxx/oid.hpp>

#include <bsoncxx/json.hpp>

#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>

#include <mongocxx/client.hpp>
#include <mongocxx/stdx.hpp>
#include <mongocxx/uri.hpp>

#include <json-c/json.h>

#include "../shared.h"
#include "../db/mongo_access.h"

namespace uobject {
    std::string retrieveAll(std::string collection, struct json_object* jsonObjects);
    std::string add(std::string collection, struct json_object* jsonObjects, const char * body);
    std::string remove(std::string collection, std::string oid, struct json_object* jsonObjects);
    std::string searchKeyValue(std::string collection, std::string key, std::string value, struct json_object* jsonArray);
}

#endif