 | ISphinxQLExecutorExecuteNonQueryAsync Method (String, Object) |
Asynchronously executes a non-query command.
Namespace:
SphinxConnector.FluentApi
Assembly:
SphinxConnector (in SphinxConnector.dll) Version: 5.4.1
SyntaxTask<int> ExecuteNonQueryAsync(
string commandText,
Object parameters = null
)
Function ExecuteNonQueryAsync (
commandText As String,
Optional parameters As Object = Nothing
) As Task(Of Integer)
Parameters
- commandText
- Type: SystemString
The command to execute. - parameters (Optional)
- Type: SystemObject
Optional parameters for the command.
Return Value
Type:
TaskInt32The number of rows affected by the statement.
Examplesusing (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 } });
}
See Also