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

SQLite based implementation of IMobileServiceLocalStore
Inheritance: Microsoft.WindowsAzure.MobileServices.Sync.MobileServiceLocalStore
Afficher le fichier Open project: Azure/azure-mobile-apps-net-client Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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.
Résultat void

DeleteAsync() public méthode

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.
Résultat Task

DeleteAsync() public méthode

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
Résultat Task

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

ExecuteNonQuery() protected méthode

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.
Résultat void

ExecuteQuery() protected méthode

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

ExecuteQuery() protected méthode

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.
Résultat IList

LookupAsync() public méthode

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.
Résultat Task

MobileServiceSQLiteStore() protected méthode

protected MobileServiceSQLiteStore ( ) : System
Résultat System

MobileServiceSQLiteStore() public méthode

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

OnInitialize() protected méthode

protected OnInitialize ( ) : Task
Résultat Task

ReadAsync() public méthode

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.
Résultat Task

UpsertAsync() public méthode

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.
Résultat Task