ISphinx QLExecutorExecute Non Query Async(String, Object) Method
Asynchronously executes a non-query command.
Definition
Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
The number of rows affected by the statement.
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
C#
Task<int> ExecuteNonQueryAsync(
string commandText,
Object parameters = null
)VB
Function ExecuteNonQueryAsync (
commandText As String,
Optional parameters As Object = Nothing
) As Task(Of Integer)Parameters
- commandText String
- The command to execute.
- parameters Object (Optional)
- Optional parameters for the command.
Return Value
TaskInt32The number of rows affected by the statement.
Example
C#
using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
ISphinxQLExecutor sphinxQLExecutor = fulltextSession.Advanced.CreateSphinxQLExecutor();
int rowsAffected = await sphinxQLExecutor.ExecuteNonQueryAsync("DELETE FROM index WHERE id IN @ids", new { ids = new [] { 1, 2, 3 } });
}