 | ISphinxQLExecutor.ExecuteNonQuery Method |
Executes a non-query command.
Namespace: SphinxConnector.FluentApiAssembly: SphinxConnector (in SphinxConnector.dll) Version: 3.12.6
Syntaxint ExecuteNonQuery(
string command,
Object parameters = null
)
Function ExecuteNonQuery (
command As String,
Optional parameters As Object = Nothing
) As Integer
Parameters
- command
- Type: System.String
The command to execute. - parameters (Optional)
- Type: System.Object
Optional parameters for the command.
Return Value
Type:
Int32The number of rows affected by the statement.
Exceptions
Examplesusing (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
ISphinxQLExecutor sphinxQLExecutor = fulltextSession.Advanced.CreateSphinxQLExecutor();
int rowsAffected = sphinxQLExecutor.ExecuteNonQuery("DELETE FROM index WHERE id IN @ids", new { ids = new [] { 1, 2, 3 } });
}
See Also