1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-11-21 13:19:16 +01:00

[#61] Corrected the headers of update and delete methods in dummy datasource

This commit is contained in:
Roland Haroutiounian 2015-10-22 11:29:08 +02:00
commit e064173359
2 changed files with 5 additions and 6 deletions

View file

@ -15,9 +15,8 @@ class DummyDatasource(object):
## @brief update an existing LeObject
# @param lodel_id (int) : list of lodel_id
# @param checked_data dict
# @param datasource_filters (string)
def update(self, lodel_id, checked_data, datasource_filters):
print ("DummyDatasource.update: ", lodel_id, checked_data, datasource_filters)
def update(self, lodel_id, checked_data):
print ("DummyDatasource.update: ", lodel_id, checked_data)
return True
## @brief create a new LeObject
@ -31,10 +30,9 @@ class DummyDatasource(object):
## @brief delete an existing LeObject
# @param lodel_id int | (int): lodel_id of the object(s) to delete
# @param delete_filters string | (string): list of string of delete filters
# @return okay bool: True on success, it will raise on failure
def delete(self, lodel_id, delete_filters=None):
print("DummyDatasource.delete: ", lodel_id, delete_filters)
def delete(self, lodel_id):
print("DummyDatasource.delete: ", lodel_id)
return True
## @brief search for a collection of objects

View file

@ -21,6 +21,7 @@ class LeDataSourceSQL(DummyDatasource):
def get(self, emclass, emtype, field_list, filters, relational_filters):
tablename = emclass.name
where_filters = self._prepare_filters(filters)
rel_filters = self._prepare_filters(relational_filters)
query = select(tablename, where=where_filters, select=field_list)
self.db.execute(query)
return all_to_dicts(self.db)