sphinx\QueryBuilder replace()

replace() public method Creates an REPLACE SQL statement. For example, $sql = $queryBuilder->replace('idx_user', [ 'name' => 'Sam', 'age' => 30, 'id' => 10, ], $params); The method will properly escape the index and column names. public string replace ( $index, $columns, &$params )$index string The index that new rows will be replaced. $columns array The column data (name => value) to be replaced in the index. $params array The binding parameters that

sphinx\QueryBuilder truncateIndex()

truncateIndex() public method Builds a SQL statement for truncating an index. public string truncateIndex ( $index )$index string The index to be truncated. The name will be properly quoted by the method. return string The SQL statement for truncating an index.

sphinx\QueryBuilder update()

update() public method Creates an UPDATE SQL statement. For example, $params = []; $sql = $queryBuilder->update('idx_user', ['status' => 1], 'age > 30', $params); The method will properly escape the index and column names. public string update ( $index, $columns, $condition, &$params, $options )$index string The index to be updated. $columns array The column data (name => value) to be updated. $condition array|string The condition that will be put in the WHERE part

sphinx\QueryBuilder insert()

insert() public method Creates an INSERT SQL statement. For example, $sql = $queryBuilder->insert('idx_user', [ 'name' => 'Sam', 'age' => 30, 'id' => 10, ], $params); The method will properly escape the index and column names. public string insert ( $index, $columns, &$params )$index string The index that new rows will be inserted into. $columns array The column data (name => value) to be inserted into the index. $params array The binding parameters th

sphinx\QueryBuilder generateInsertReplace()

generateInsertReplace() protected method Generates INSERT/REPLACE SQL statement. protected string generateInsertReplace ( $statement, $index, $columns, &$params )$statement string Statement ot be generated. $index string The affected index name. $columns array The column data (name => value). $params array The binding parameters that will be generated by this method. return string Generated SQL

sphinx\QueryBuilder getMatchBuilder()

getMatchBuilder() public method (available since version 2.0.6) public yii\sphinx\MatchBuilder getMatchBuilder ( )return yii\sphinx\MatchBuilder Match builder.

sphinx\QueryBuilder generateBatchInsertReplace()

generateBatchInsertReplace() protected method Generates a batch INSERT/REPLACE SQL statement. protected string generateBatchInsertReplace ( $statement, $index, $columns, $rows, &$params )$statement string Statement ot be generated. $index string The affected index name. $columns array The column data (name => value). $rows array The rows to be batch inserted into the index $params array The binding parameters that will be generated by this method. return string Generated

sphinx\QueryBuilder composeColumnValue()

composeColumnValue() protected method Composes column value for SQL, taking in account the column type. protected string composeColumnValue ( $indexes, $columnName, $value, &$params )$indexes yii\sphinx\IndexSchema[] List of indexes, which affected by query $columnName string Name of the column $value mixed Raw column value $params array The binding parameters to be populated return string SQL expression, which represents column value

sphinx\QueryBuilder delete()

delete() public method Creates a DELETE SQL statement. For example, $sql = $queryBuilder->delete('idx_user', 'status = 0'); The method will properly escape the index and column names. public string delete ( $index, $condition, &$params )$index string The index where the data will be deleted from. $condition array|string The condition that will be put in the WHERE part. Please refer to yii\sphinx\Query::where() on how to specify condition. $params array The binding parameter

sphinx\QueryBuilder buildWhere()

buildWhere() public method public string buildWhere ( $indexes, $condition, &$params, $match = null )$indexes string[] List of index names, which affected by query $condition string|array $params array The binding parameters to be populated $match string|yii\db\Expression|null return string The WHERE clause built from \yii\sphinx\query.