Class SQLiteCacheManager
SQLite cache manager.
Inheritance
Namespace: Kinvey
Assembly: Kinvey.dll
Syntax
public class SQLiteCacheManager : object, ICacheManager, IDisposable
Constructors
| Improve this Doc View SourceSQLiteCacheManager(String)
Initializes a new instance of the SQLiteCacheManager class.
Declaration
public SQLiteCacheManager(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | File path. |
Properties
| Improve this Doc View Sourcedbpath
Gets or sets the database file path.
Declaration
public string dbpath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The database file path. |
Methods
| Improve this Doc View SourceclearStorage()
Clears the storage.
Declaration
public void clearStorage()
DeleteQueryCacheItem(QueryCacheItem)
Deletes query cache item.
Declaration
public bool DeleteQueryCacheItem(QueryCacheItem item)
Parameters
Type | Name | Description |
---|---|---|
QueryCacheItem | item | Query cache item. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Dispose()
Performs all object cleanup, so the garbage collector no longer needs to call the objects Object.Finalize override.
Declaration
public void Dispose()
Dispose(Boolean)
Performs all object cleanup.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Indicates whether the method call comes from a Dispose method (its value is true) or from a finalizer (its value is false). |
Finalize()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
Declaration
protected void Finalize()
GetCache<T>(String)
Gets the cache.
Declaration
public ICache<T> GetCache<T>(string collectionName)
where T : class, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | Collection name. |
Returns
Type | Description |
---|---|
ICache<T> | The cache. |
Type Parameters
Name | Description |
---|---|
T | The type of an item. |
getCollectionTables()
Gets the collection tables.
Declaration
public List<string> getCollectionTables()
Returns
Type | Description |
---|---|
List<System.String> | The collection tables. |
getCollectionTablesAsync()
Gets the collection tables asynchronously.
Declaration
public Task<List<string>> getCollectionTablesAsync()
Returns
Type | Description |
---|---|
Task<List<System.String>> | The collection tables. |
GetQueryCacheItem(String, String, String)
Gets query cache item.
Declaration
public QueryCacheItem GetQueryCacheItem(string collectionName, string query, string lastRequest)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | Collection name. |
System.String | query | Query. |
System.String | lastRequest | The last request time. |
Returns
Type | Description |
---|---|
QueryCacheItem | Query cache item. |
GetSyncQueue(String)
Gets the synchronization queue.
Declaration
public ISyncQueue GetSyncQueue(string collectionName)
Parameters
Type | Name | Description |
---|---|---|
System.String | collectionName | Collection name. |
Returns
Type | Description |
---|---|
ISyncQueue | The synchronization queue. |
SetQueryCacheItem(QueryCacheItem)
Sets query cache item.
Declaration
public bool SetQueryCacheItem(QueryCacheItem item)
Parameters
Type | Name | Description |
---|---|---|
QueryCacheItem | item | Query cache item. |
Returns
Type | Description |
---|---|
System.Boolean |
|
TableExists<T>(SQLiteConnection)
Checks existing of a table.
Declaration
public static bool TableExists<T>(SQLiteConnection connection)
Parameters
Type | Name | Description |
---|---|---|
SQLite.SQLiteConnection | connection | SQLite connection. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type of an item. |