mirror of
https://github.com/yweber/lodel2.git
synced 2025-11-21 13:19:16 +01:00
[#61] changed params in the dummy data source class
This commit is contained in:
parent
e064173359
commit
96fbc2f45e
1 changed files with 12 additions and 8 deletions
|
|
@ -15,23 +15,27 @@ class DummyDatasource(object):
|
||||||
## @brief update an existing LeObject
|
## @brief update an existing LeObject
|
||||||
# @param lodel_id (int) : list of lodel_id
|
# @param lodel_id (int) : list of lodel_id
|
||||||
# @param checked_data dict
|
# @param checked_data dict
|
||||||
def update(self, lodel_id, checked_data):
|
# @param filters
|
||||||
print ("DummyDatasource.update: ", lodel_id, checked_data)
|
# @param relational_filters
|
||||||
|
def update(self, lodel_id, checked_data, filters, relational_filters):
|
||||||
|
print ("DummyDatasource.update: ", lodel_id, checked_data, filters, relational_filters)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
## @brief create a new LeObject
|
## @brief create a new LeObject
|
||||||
# @param typename string
|
# @param letype LeType
|
||||||
# @param classname string
|
# @param leclass LeClass
|
||||||
# @param data dict: a dictionnary of field:value to save
|
# @param data dict: a dictionnary of field:value to save
|
||||||
# @return lodel_id int: new lodel_id of the newly created LeObject
|
# @return lodel_id int: new lodel_id of the newly created LeObject
|
||||||
def insert(self, typename, classname, **datas):
|
def insert(self, letype, leclass, **datas):
|
||||||
print("DummyDatasource.insert: ", typename, classname, datas)
|
print("DummyDatasource.insert: ", letype, leclass, datas)
|
||||||
return 42
|
return 42
|
||||||
|
|
||||||
## @brief delete an existing LeObject
|
## @brief delete an existing LeObject
|
||||||
# @param lodel_id int | (int): lodel_id of the object(s) to delete
|
# @param lodel_id int | (int): lodel_id of the object(s) to delete
|
||||||
|
# @param filters list : list of tuples formatted as (FIELD, OPERATOR, VALUE)
|
||||||
|
# @param relational_filters list
|
||||||
# @return okay bool: True on success, it will raise on failure
|
# @return okay bool: True on success, it will raise on failure
|
||||||
def delete(self, lodel_id):
|
def delete(self, lodel_id, filters, relational_filters):
|
||||||
print("DummyDatasource.delete: ", lodel_id)
|
print("DummyDatasource.delete: ", lodel_id)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
@ -40,7 +44,7 @@ class DummyDatasource(object):
|
||||||
# @param emtype LeType : LeType instance
|
# @param emtype LeType : LeType instance
|
||||||
# @param field_list list : list of fields to get from the datasource
|
# @param field_list list : list of fields to get from the datasource
|
||||||
# @param filters list : list of tuples formatted as (FIELD, OPERATOR, VALUE)
|
# @param filters list : list of tuples formatted as (FIELD, OPERATOR, VALUE)
|
||||||
# @param relational_filters
|
# @param relational_filters list
|
||||||
# @return responses ({string:*}): a list of dict with field:value
|
# @return responses ({string:*}): a list of dict with field:value
|
||||||
def get(self, emclass, emtype, field_list, filters, relational_filters):
|
def get(self, emclass, emtype, field_list, filters, relational_filters):
|
||||||
print("DummyDatasource.get: ", emclass, emtype, field_list, filters, relational_filters)
|
print("DummyDatasource.get: ", emclass, emtype, field_list, filters, relational_filters)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue