C# Class Microsoft.WindowsAzure.MobileServices.SQLiteStore.MobileServiceSQLiteStore

SQLite based implementation of IMobileServiceLocalStore
Inheritance: Microsoft.WindowsAzure.MobileServices.Sync.MobileServiceLocalStore
显示文件 Open project: Azure/azure-mobile-apps-net-client Class Usage Examples

Public Methods

Method Description
DefineTable ( string tableName, Newtonsoft.Json.Linq.JObject item ) : void

Defines the local table on the store.

DeleteAsync ( Microsoft.WindowsAzure.MobileServices.Query.MobileServiceTableQueryDescription query ) : Task

Deletes items from local table that match the given query.

DeleteAsync ( string tableName, IEnumerable ids ) : Task

Deletes items from local table with the given list of ids

LookupAsync ( string tableName, string id ) : Task

Executes a lookup against a local table.

MobileServiceSQLiteStore ( string fileName ) : System

Initializes a new instance of MobileServiceSQLiteStore

ReadAsync ( Microsoft.WindowsAzure.MobileServices.Query.MobileServiceTableQueryDescription query ) : Task

Reads data from local store by executing the query.

UpsertAsync ( string tableName, IEnumerable items, bool ignoreMissingColumns ) : Task

Updates or inserts data in local table.

Protected Methods

Method Description
Dispose ( bool disposing ) : void
ExecuteNonQuery ( string sql, object>.IDictionary parameters ) : void

Executes a sql statement on a given table in local SQLite database.

ExecuteQuery ( TableDefinition table, string sql, object>.IDictionary parameters ) : IList
ExecuteQuery ( string tableName, string sql, object>.IDictionary parameters ) : IList

Executes a sql statement on a given table in local SQLite database.

MobileServiceSQLiteStore ( ) : System
OnInitialize ( ) : Task

Private Methods

Method Description
AddParameter ( Newtonsoft.Json.Linq.JObject item, object>.Dictionary parameters, Microsoft.WindowsAzure.MobileServices.SQLiteStore.ColumnDefinition column ) : string
AppendInsertValuesSql ( StringBuilder sql, object>.Dictionary parameters, List columns, Newtonsoft.Json.Linq.JObject item ) : void
BatchInsert ( string tableName, IEnumerable items, List columns ) : void
BatchUpdate ( string tableName, IEnumerable items, List columns ) : void
CreateAllTables ( ) : void
CreateParameter ( object>.Dictionary parameters, object value ) : string
CreateTableFromObject ( string tableName, IEnumerable columns ) : void
GetSystemProperties ( Newtonsoft.Json.Linq.JObject item ) : MobileServiceSystemProperties
GetTable ( string tableName ) : TableDefinition
InitializeConfig ( ) : Task
ReadRow ( TableDefinition table, SQLitePCL.sqlite3_stmt statement ) : Newtonsoft.Json.Linq.JObject
SaveSetting ( string name, string value ) : Task
UpsertAsyncInternal ( string tableName, IEnumerable items, bool ignoreMissingColumns ) : Task
ValidateParameterCount ( int parametersCount ) : int

Method Details

DefineTable() public method

Defines the local table on the store.
public DefineTable ( string tableName, Newtonsoft.Json.Linq.JObject item ) : void
tableName string Name of the local table.
item Newtonsoft.Json.Linq.JObject An object that represents the structure of the table.
return void

DeleteAsync() public method

Deletes items from local table that match the given query.
public DeleteAsync ( Microsoft.WindowsAzure.MobileServices.Query.MobileServiceTableQueryDescription query ) : Task
query Microsoft.WindowsAzure.MobileServices.Query.MobileServiceTableQueryDescription A query to find records to delete.
return Task

DeleteAsync() public method

Deletes items from local table with the given list of ids
public DeleteAsync ( string tableName, IEnumerable ids ) : Task
tableName string Name of the local table.
ids IEnumerable A list of ids of the items to be deleted
return Task

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

ExecuteNonQuery() protected method

Executes a sql statement on a given table in local SQLite database.
protected ExecuteNonQuery ( string sql, object>.IDictionary parameters ) : void
sql string
parameters object>.IDictionary The query parameters.
return void

ExecuteQuery() protected method

protected ExecuteQuery ( TableDefinition table, string sql, object>.IDictionary parameters ) : IList
table TableDefinition
sql string
parameters object>.IDictionary
return IList

ExecuteQuery() protected method

Executes a sql statement on a given table in local SQLite database.
protected ExecuteQuery ( string tableName, string sql, object>.IDictionary parameters ) : IList
tableName string The name of the table.
sql string The SQL query to execute.
parameters object>.IDictionary The query parameters.
return IList

LookupAsync() public method

Executes a lookup against a local table.
public LookupAsync ( string tableName, string id ) : Task
tableName string Name of the local table.
id string The id of the item to lookup.
return Task

MobileServiceSQLiteStore() protected method

protected MobileServiceSQLiteStore ( ) : System
return System

MobileServiceSQLiteStore() public method

Initializes a new instance of MobileServiceSQLiteStore
public MobileServiceSQLiteStore ( string fileName ) : System
fileName string Name of the local SQLite database file.
return System

OnInitialize() protected method

protected OnInitialize ( ) : Task
return Task

ReadAsync() public method

Reads data from local store by executing the query.
public ReadAsync ( Microsoft.WindowsAzure.MobileServices.Query.MobileServiceTableQueryDescription query ) : Task
query Microsoft.WindowsAzure.MobileServices.Query.MobileServiceTableQueryDescription The query to execute on local store.
return Task

UpsertAsync() public method

Updates or inserts data in local table.
public UpsertAsync ( string tableName, IEnumerable items, bool ignoreMissingColumns ) : Task
tableName string Name of the local table.
items IEnumerable A list of items to be inserted.
ignoreMissingColumns bool true if the extra properties on item can be ignored; false otherwise.
return Task