Callbacks¶
|
|
|
|
|
|
|
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 identifierrevision (
str
) – the object revisionobject (
str
) – the object itselfoffline_state (
EBackend.OfflineState
) – objects offline state, one ofEBackend.OfflineState
column_names ([
str
]) – column namescolumn_values ([
str
]) – column valuesuser_data (
object
orNone
) – 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.
- EBackend.CacheKeysForeachFunc(self, key, value, ref_count, *user_data)¶
- Parameters:
self (
EBackend.CacheKeys
) – anEBackend.CacheKeys
key (
str
) – the keyvalue (
str
) – the valueref_count (
int
) – the reference count for the keyuser_data (
object
orNone
) – user data, as used inEBackend.CacheKeys.foreach_sync
()
- Returns:
- Return type:
A callback called for each row of the self table when using
EBackend.CacheKeys.foreach_sync
() function.New in version 3.48.
- EBackend.CacheSelectFunc(cache, column_names, column_values, *user_data)¶
- Parameters:
cache (
EBackend.Cache
) – anEBackend.Cache
column_names ([
str
]) – column namescolumn_values ([
str
]) – column valuesuser_data (
object
orNone
) – 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.
- 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 identifierrevision (
str
) – the object revisionobject (
str
) – the object itselfoffline_state (
EBackend.OfflineState
) – objects offline state, one ofEBackend.OfflineState
column_names ([
str
]) – column namescolumn_values ([
str
]) – column valuesuser_data (
object
orNone
) – user data, as used inEBackend.Cache.foreach_update
()
- Returns:
True
to continue,False
to 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.CacheColumnValues
with 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.