- public bool @foreach (CacheDeletedFlag deleted_flag, string? where_clause, CacheForeachFunc func, Cancellable? cancellable = null) throws Error
Calls func for each found object, which satisfies the
criteria for both deleted_flag and where_clause.
- public string? @get (string uid, out string? out_revision, out CacheColumnValues? out_other_columns, Cancellable? cancellable = null) throws Error
Returns an object with the given uid.
- public void @lock (CacheLockType lock_type)
Locks the this thus other threads
cannot use it.
- public void @unlock (CacheUnlockAction action)
Unlocks the cache which was previouly locked with
@lock.
- public virtual bool before_put_impl (string uid, string revision, string object, CacheColumnValues other_columns, bool is_replace, Cancellable? cancellable = null) throws Error
- public virtual bool before_remove_impl (string uid, Cancellable? cancellable = null) throws Error
- public void change_revision ()
Instructs the this to change its
revision.
- public bool clear_offline_changes (Cancellable? cancellable = null) throws Error
Marks all objects as being fully synchronized with the server and
removes those which are marked as locally deleted.
- public virtual bool clear_offline_changes_locked (Cancellable? cancellable = null) throws Error
- public bool contains (string uid, CacheDeletedFlag deleted_flag)
Checkes whether the this contains an
object with the given uid.
- public void copy_missing_to_column_values (string[] column_names, string[] column_values, ref CacheColumnValues other_columns)
Adds every column value which is not part of the other_columns
to it, except of E_CACHE_COLUMN_UID, E_CACHE_COLUMN_REVISION, E_CACHE_COLUMN_OBJECT and E_CACHE_COLUMN_STATE columns.
- public string dup_key (string key) throws Error
- public string dup_revision ()
- public virtual void erase ()
Erases the cache and all of its content from the disk.
- public bool foreach_update (CacheDeletedFlag deleted_flag, string? where_clause, CacheUpdateFunc func, Cancellable? cancellable = null) throws Error
Calls func for each found object, which satisfies the
criteria for both deleted_flag and where_clause, letting the caller update values where necessary.
- public void freeze_revision_change ()
Freezes automatic revision change for the
this.
- public uint get_count (CacheDeletedFlag deleted_flag, Cancellable? cancellable = null) throws Error
- public unowned string get_filename ()
- public int get_key_int (string key) throws Error
Reads the user key value as an integer.
- public string? get_object_include_deleted (string uid, out string? out_revision, out CacheColumnValues? out_other_columns, Cancellable? cancellable = null) throws Error
The same as @get, only
considers also locally deleted objects.
- public bool get_objects (CacheDeletedFlag deleted_flag, out SList<string> out_objects, out SList<string>? out_revisions, Cancellable? cancellable = null) throws Error
Gets a list of objects stored in the this
, optionally together with their revisions.
- public SList<CacheOfflineChange> get_offline_changes (Cancellable? cancellable = null) throws Error
Gathers the list of all offline changes being done so far.
- public OfflineState get_offline_state (string uid, Cancellable? cancellable = null) throws Error
- public void* get_sqlitedb ()
- public bool get_uids (CacheDeletedFlag deleted_flag, out SList<string> out_uids, out SList<string>? out_revisions, Cancellable? cancellable = null) throws Error
Gets a list of unique object identifiers stored in the
this, optionally together with their revisions.
- public int get_version ()
- public bool initialize_sync (string filename, SList<CacheColumnInfo>? other_columns, Cancellable? cancellable = null) throws Error
Initializes the this and opens the
filename database.
- public bool is_revision_change_frozen ()
- public bool put (string uid, string? revision, string object, CacheColumnValues? other_columns, CacheOfflineFlag offline_flag, Cancellable? cancellable = null) throws Error
Stores an object into the cache.
- public virtual bool put_locked (string uid, string revision, string object, CacheColumnValues other_columns, OfflineState offline_state, bool is_replace, Cancellable? cancellable = null) throws Error
- public bool remove (string uid, CacheOfflineFlag offline_flag, Cancellable? cancellable = null) throws Error
Removes the object with the given uid from the
this.
- public bool remove_all (Cancellable? cancellable = null) throws Error
Removes all objects from the this in
one call.
- public virtual bool remove_locked (string uid, Cancellable? cancellable = null) throws Error
- public bool set_key (string key, string? value) throws Error
Sets a value of the user key, or deletes it,
if the value is null.
- public bool set_key_int (string key, int value) throws Error
Sets an integer value for the user key.
- public bool set_offline_state (string uid, OfflineState state, Cancellable? cancellable = null) throws Error
Sets an offline state for the object identified by
uid.
- public void set_revision (string? revision)
Sets the revision of the whole
this.
- public void set_version (int version)
Sets a cache data version.
- public bool sqlite_exec (string sql_stmt, Cancellable? cancellable = null) throws Error
Executes an SQLite statement.
- public bool sqlite_maybe_vacuum (Cancellable? cancellable = null) throws Error
Runs vacuum (compacts the database file), if needed.
- public bool sqlite_select (string sql_stmt, CacheSelectFunc func, Cancellable? cancellable = null) throws Error
Executes a SELECT statement sql_stmt and calls func
for each row of the result.
- public void thaw_revision_change ()
Thaws automatic revision change for the
this.