|
@@ -21,31 +21,33 @@ class DummyDatasource(object):
|
21
|
21
|
instanciate=True):
|
22
|
22
|
pass
|
23
|
23
|
|
24
|
|
- ## @brief Deletes one record defined by its uid
|
25
|
|
- # @param target_cls Emclass : class of the record to delete
|
26
|
|
- # @param uid dict|list : a dictionary of fields and values composing the unique identifier of the record or a list of several dictionaries
|
27
|
|
- # @return int : number of deleted records
|
28
|
|
- def delete(self, target_cls, uid):
|
|
24
|
+ ##@brief Deletes records according to given filters
|
|
25
|
+ #@param target Emclass : class of the record to delete
|
|
26
|
+ #@param filters list : List of filters
|
|
27
|
+ #@param relational_filters list : List of relational filters
|
|
28
|
+ #@return int : number of deleted records
|
|
29
|
+ def delete(self, target, filters, relational_filters):
|
29
|
30
|
pass
|
30
|
31
|
|
31
|
|
- ## @brief updates one or a list of records
|
32
|
|
- # @param target_cls Emclass : class of the object to insert
|
33
|
|
- # @param uids list : list of uids to update
|
34
|
|
- # @param datas dict : datas to update (new values)
|
35
|
|
- # @return int : Number of updated records
|
36
|
|
- def update(self, target_cls, uids, **datas):
|
|
32
|
+ ## @brief updates records according to given filters
|
|
33
|
+ #@param target Emclass : class of the object to insert
|
|
34
|
+ #@param filters list : List of filters
|
|
35
|
+ #@param rel_filters list : List of relational filters
|
|
36
|
+ #@param upd_datas dict : datas to update (new values)
|
|
37
|
+ #@return int : Number of updated records
|
|
38
|
+ def update(self, target, filters, relational_filters, upd_datas):
|
37
|
39
|
pass
|
38
|
40
|
|
39
|
41
|
## @brief Inserts a record in a given collection
|
40
|
|
- # @param target_cls Emclass : class of the object to insert
|
41
|
|
- # @param datas dict : datas to insert
|
42
|
|
- # @return bool
|
43
|
|
- def insert(self, target_cls, **datas):
|
|
42
|
+ # @param target Emclass : class of the object to insert
|
|
43
|
+ # @param new_datas dict : datas to insert
|
|
44
|
+ # @return the inserted uid
|
|
45
|
+ def insert(self, target, new_datas):
|
44
|
46
|
pass
|
45
|
47
|
|
46
|
48
|
## @brief Inserts a list of records in a given collection
|
47
|
|
- # @param target_cls Emclass : class of the objects inserted
|
48
|
|
- # @param datas_list
|
|
49
|
+ # @param target Emclass : class of the objects inserted
|
|
50
|
+ # @param datas_list list : list of dict
|
49
|
51
|
# @return list : list of the inserted records' ids
|
50
|
|
- def insert_multi(self, target_cls, datas_list):
|
|
52
|
+ def insert_multi(self, target, datas_list):
|
51
|
53
|
pass
|