sphinx\QueryBuilder buildCompositeInCondition()

buildCompositeInCondition() protected method protected string buildCompositeInCondition ( $indexes, $operator, $columns, $values, &$params )$indexes yii\sphinx\IndexSchema[] List of indexes, which affected by query $operator string The operator to use (e.g. IN or NOT IN) $columns array $values array $params array The binding parameters to be populated return string The generated SQL expression

sphinx\QueryBuilder buildColumns()

buildColumns() public method Processes columns and properly quote them if necessary. It will join all columns into a string with comma as separators. public string buildColumns ( $columns )$columns string|array The columns to be processed return string The processing result

sphinx\QueryBuilder buildAndCondition()

buildAndCondition() public method Connects two or more SQL expressions with the AND or OR operator. public string buildAndCondition ( $indexes, $operator, $operands, &$params )$indexes yii\sphinx\IndexSchema[] List of indexes, which affected by query $operator string The operator to use for connecting the given operands $operands array The SQL expressions to connect. $params array The binding parameters to be populated return string The generated SQL expression

sphinx\QueryBuilder buildBetweenCondition()

buildBetweenCondition() public method Creates an SQL expressions with the BETWEEN operator. public string buildBetweenCondition ( $indexes, $operator, $operands, &$params )$indexes yii\sphinx\IndexSchema[] List of indexes, which affected by query $operator string The operator to use (e.g. BETWEEN or NOT BETWEEN) $operands array The first operand is the column name. The second and third operands describe the interval that column value should be in. $params array The binding par

sphinx\QueryBuilder build()

build() public method Generates a SELECT SQL statement from a yii\sphinx\Query object. public array build ( $query, $params = [] )$query yii\sphinx\Query The yii\sphinx\Query object from which the SQL statement will be generated $params array The parameters to be bound to the generated SQL statement. These parameters will be included in the result with the additional parameters generated during the query building process. return array The generated SQL statement (the first array elem

sphinx\QueryBuilder batchInsert()

batchInsert() public method Generates a batch INSERT SQL statement. For example, $sql = $queryBuilder->batchInsert('idx_user', ['id', 'name', 'age'], [ [1, 'Tom', 30], [2, 'Jane', 20], [3, 'Linda', 25], ], $params); Note that the values in each row must match the corresponding column names. public string batchInsert ( $index, $columns, $rows, &$params )$index string The index that new rows will be inserted into. $columns array The column names $rows array The rows

sphinx\QueryBuilder $separator

$separator public property The separator between different fragments of a SQL statement. Defaults to an empty space. This is mainly used by build() when generating a SQL statement. public string $separator = " "

sphinx\QueryBuilder batchReplace()

batchReplace() public method Generates a batch REPLACE SQL statement. For example, $sql = $queryBuilder->batchReplace('idx_user', ['id', 'name', 'age'], [ [1, 'Tom', 30], [2, 'Jane', 20], [3, 'Linda', 25], ], $params); Note that the values in each row must match the corresponding column names. public string batchReplace ( $index, $columns, $rows, &$params )$index string The index that new rows will be replaced. $columns array The column names $rows array The rows

sphinx\QueryBuilder $db

$db public property The Sphinx connection. public yii\sphinx\Connection $db = null

sphinx\QueryBuilder $querySeparator

$querySeparator public property Separator between different SQL queries. This is mainly used by build() when generating a SQL statement. public string $querySeparator = "; "