|
@@ -15,23 +15,27 @@ class DummyDatasource(object):
|
15
|
15
|
## @brief update an existing LeObject
|
16
|
16
|
# @param lodel_id (int) : list of lodel_id
|
17
|
17
|
# @param checked_data dict
|
18
|
|
- def update(self, lodel_id, checked_data):
|
19
|
|
- print ("DummyDatasource.update: ", lodel_id, checked_data)
|
|
18
|
+ # @param filters
|
|
19
|
+ # @param relational_filters
|
|
20
|
+ def update(self, lodel_id, checked_data, filters, relational_filters):
|
|
21
|
+ print ("DummyDatasource.update: ", lodel_id, checked_data, filters, relational_filters)
|
20
|
22
|
return True
|
21
|
23
|
|
22
|
24
|
## @brief create a new LeObject
|
23
|
|
- # @param typename string
|
24
|
|
- # @param classname string
|
|
25
|
+ # @param letype LeType
|
|
26
|
+ # @param leclass LeClass
|
25
|
27
|
# @param data dict: a dictionnary of field:value to save
|
26
|
28
|
# @return lodel_id int: new lodel_id of the newly created LeObject
|
27
|
|
- def insert(self, typename, classname, **datas):
|
28
|
|
- print("DummyDatasource.insert: ", typename, classname, datas)
|
|
29
|
+ def insert(self, letype, leclass, **datas):
|
|
30
|
+ print("DummyDatasource.insert: ", letype, leclass, datas)
|
29
|
31
|
return 42
|
30
|
32
|
|
31
|
33
|
## @brief delete an existing LeObject
|
32
|
34
|
# @param lodel_id int | (int): lodel_id of the object(s) to delete
|
|
35
|
+ # @param filters list : list of tuples formatted as (FIELD, OPERATOR, VALUE)
|
|
36
|
+ # @param relational_filters list
|
33
|
37
|
# @return okay bool: True on success, it will raise on failure
|
34
|
|
- def delete(self, lodel_id):
|
|
38
|
+ def delete(self, lodel_id, filters, relational_filters):
|
35
|
39
|
print("DummyDatasource.delete: ", lodel_id)
|
36
|
40
|
return True
|
37
|
41
|
|
|
@@ -40,7 +44,7 @@ class DummyDatasource(object):
|
40
|
44
|
# @param emtype LeType : LeType instance
|
41
|
45
|
# @param field_list list : list of fields to get from the datasource
|
42
|
46
|
# @param filters list : list of tuples formatted as (FIELD, OPERATOR, VALUE)
|
43
|
|
- # @param relational_filters
|
|
47
|
+ # @param relational_filters list
|
44
|
48
|
# @return responses ({string:*}): a list of dict with field:value
|
45
|
49
|
def get(self, emclass, emtype, field_list, filters, relational_filters):
|
46
|
50
|
print("DummyDatasource.get: ", emclass, emtype, field_list, filters, relational_filters)
|