Callbacks

CacheForeachFunc (cache, uid, revision, object, offline_state, column_names, column_values, *user_data)

CacheKeysForeachFunc (self, key, value, ref_count, *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:
Returns:

True to continue, False to stop walk through.

Return type:

bool

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:
Returns:

True to continue, False to stop walk through.

Return type:

bool

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:
Returns:

True to continue, False to stop walk through.

Return type:

bool

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:
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.