ISphinx QLExecutorExecute Non Query Method
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#
int ExecuteNonQuery(
string command,
Object parameters = null
)VB
Function ExecuteNonQuery (
command As String,
Optional parameters As Object = Nothing
) As IntegerParameters
- command String
- The command to execute.
- parameters Object (Optional)
- Optional parameters for the command.
Return Value
Int32The number of rows affected by the statement.
Example
C#
using (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 } });
}Exceptions
| ArgumentException | Occurs if command is empty. |
| ArgumentNullException | Occurs if command is null. |
| FulltextException | Occurs when there is an error during the execution of the command. |