sdk/dotnet/src/Microsoft.Datasync.Client.SQLiteStore/OfflineSQLiteStore.cs
/// <summary>
/// Executes a SQL query against the store.  This is usedul for running arbitrary queries that are supported
/// by SQLite but not the SDK LINQ provider.
/// </summary>
/// <remarks>
/// If doing a query on a single table, use <see cref="ExecuteQueryAsync(string, string, IDictionary{string, object}, CancellationToken)"/> instead.
/// </remarks>
/// <param name="definition">The definition of the result set.</param>
/// <param name="sqlStatement">The SQL statement to execute.</param>
/// <param name="parameters">A list of parameter values for referenced parameters in the SQL statement.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>The list of rows returned by the query.</returns>
Executes a SQL query against the store.  This is usedul for running arbitrary queries that are supported
by SQLite but not the SDK LINQ provider.
Executes a SQL query against the store . This is usedul for running arbitrary queries that are supported by SQLite but not the SDK LINQ provider .
public async Task<IList<JObject>> ExecuteQueryAsync(JObject definition, string sqlStatement, IDictionary<string, object> parameters = null, CancellationToken cancellationToken = default)
        {
            Arguments.IsNotNull(definition, nameof(definition));
            Arguments.IsNotNullOrWhitespace(sqlStatement, nameof(sqlStatement));
            await EnsureInitializedAsync(cancellationToken).ConfigureAwait(false);
            var tableDefinition = new TableDefinition("", definition);
            using (operationLock.AcquireLock())
            {
                return ExecuteQueryInternal(tableDefinition, sqlStatement, parameters);
            }
        }
public async Task < IList < JObject > > ExecuteQueryAsync ( JObject definition , string sqlStatement , IDictionary < string , object > parameters = null , CancellationToken cancellationToken = default ) { Arguments . IsNotNull ( definition , nameof ( definition ) ) ; Arguments . IsNotNullOrWhitespace ( sqlStatement , nameof ( sqlStatement ) ) ; await EnsureInitializedAsync ( cancellationToken ) . ConfigureAwait ( false ) ; var tableDefinition = new TableDefinition ( " " , definition ) ; using ( operationLock . AcquireLock ( ) ) { return ExecuteQueryInternal ( tableDefinition , sqlStatement , parameters ) ; } }
Executes a SQL query against the store.
Executes a SQL query against the store .
The list of rows returned by the query.
The list of rows returned by the query .
definition
JObject
The definition of the result set.
The definition of the result set .
sqlStatement
string
The SQL statement to execute.
The SQL statement to execute .
parameters
IDictionary<string, object>
A list of parameter values for referenced parameters in the SQL statement.
A list of parameter values for referenced parameters in the SQL statement .
cancellationToken
CancellationToken
A  to observe.
A to observe .
remarks
If doing a query on a single table, use  instead.
If doing a query on a single table use instead .