Callbacks¶
| CacheForeachFunc(cache, uid, revision, object, offline_state, column_names, column_values, *user_data) | |
| CacheSelectFunc(cache, column_names, column_values, *user_data) | |
| CacheUpdateFunc(cache, uid, revision, object, offline_state, column_names, column_values, *user_data) | 
Details¶
- 
EBackend.CacheForeachFunc(cache, uid, revision, object, offline_state, column_names, column_values, *user_data)¶
- Parameters: - cache (EBackend.Cache) – anEBackend.Cache
- uid (str) – a unique object identifier
- revision (str) – the object revision
- object (str) – the object itself
- offline_state (EBackend.OfflineState) – objects offline state, one ofEBackend.OfflineState
- column_names ([str]) – column names
- column_values ([str]) – column values
- user_data (objectorNone) – user data, as used inEBackend.Cache.foreach()
 - Returns: - Return type: - A callback called for each object row when using - EBackend.Cache.foreach() function.- New in version 3.26. 
- cache (
- 
EBackend.CacheSelectFunc(cache, column_names, column_values, *user_data)¶
- Parameters: - cache (EBackend.Cache) – anEBackend.Cache
- column_names ([str]) – column names
- column_values ([str]) – column values
- user_data (objectorNone) – user data, as used inEBackend.Cache.sqlite_select()
 - Returns: - Return type: - A callback called for each row of a SELECT statement executed with - EBackend.Cache.sqlite_select() function.- New in version 3.26. 
- cache (
- 
EBackend.CacheUpdateFunc(cache, uid, revision, object, offline_state, column_names, column_values, *user_data)¶
- Parameters: - cache (EBackend.Cache) – anEBackend.Cache
- uid (str) – a unique object identifier
- revision (str) – the object revision
- object (str) – the object itself
- offline_state (EBackend.OfflineState) – objects offline state, one ofEBackend.OfflineState
- column_names ([str]) – column names
- column_values ([str]) – column values
- user_data (objectorNone) – user data, as used inEBackend.Cache.foreach_update()
 - Returns: - Trueto continue,- Falseto stop walk through.- out_revision: - the new object revision to set; keep it untouched to not change - out_object: - the new object to set; keep it untouched to not change - out_offline_state: - the offline state to set; the default is the same as offline_state - out_other_columns: - an - EBackend.CacheColumnValueswith other columns to set; keep it untouched to not change any- Return type: - ( - bool, out_revision:- str, out_object:- str, out_offline_state:- EBackend.OfflineState, out_other_columns:- EBackend.CacheColumnValues)- A callback called for each object row when using - EBackend.Cache.foreach_update() function. When all out parameters are left untouched, then the row is not changed.- New in version 3.26. 
- cache (