sphinx\Query one()

one() public method Executes the query and returns a single row of result. public array|boolean one ( $db = null )$db yii\db\Connection The database connection used to generate the SQL statement. If this parameter is not given, the db application component will be used. return array|boolean The first row (in terms of an array) of the query result. False is returned if the query results in nothing.

sphinx\Query match()

match() public method Sets the fulltext query text. This text will be composed into MATCH operator inside the WHERE clause. Note: this value will be processed by yii\sphinx\Connection::escapeMatchValue(), if you need to compose complex match condition use yii\db\Expression: $query = new Query(); $query->from('my_index') ->match(new Expression(':match', ['match' => '@(content) ' . Yii::$app->sphinx->escapeMatchValue($matchValue)])) ->all(); public $this match ( $

sphinx\Query options()

options() public method Sets the query options. See also addOptions(). public $this options ( $options )$options array Query options in format: optionName => optionValue return $this The query object itself

sphinx\Query populate()

populate() public method Converts the raw query results into the format as specified by this query. This method is internally used to convert the data fetched from database into the format as required by this query. public array populate ( $rows )$rows array The raw query result from database return array The converted query result

sphinx\Query innerJoin()

innerJoin() public method Appends an INNER JOIN part to the query. public $this innerJoin ( $table, $on = '', $params = [] )$table string|array The table to be joined. Use a string to represent the name of the table to be joined. The table name can contain a schema prefix (e.g. 'public.user') and/or table alias (e.g. 'user u'). The method will automatically quote the table name unless it contains some parenthesis (which means the table is given as a sub-query or DB expression). Use an

sphinx\Query join()

join() public method Appends a JOIN part to the query. The first parameter specifies what type of join it is. public $this join ( $type, $table, $on = '', $params = [] )$type string The type of join, such as INNER JOIN, LEFT JOIN. $table string|array The table to be joined. Use a string to represent the name of the table to be joined. The table name can contain a schema prefix (e.g. 'public.user') and/or table alias (e.g. 'user u'). The method will automatically quote the table name

sphinx\Query leftJoin()

leftJoin() public method Appends a LEFT OUTER JOIN part to the query. public $this leftJoin ( $table, $on = '', $params = [] )$table string|array The table to be joined. Use a string to represent the name of the table to be joined. The table name can contain a schema prefix (e.g. 'public.user') and/or table alias (e.g. 'user u'). The method will automatically quote the table name unless it contains some parenthesis (which means the table is given as a sub-query or DB expression). Use a

sphinx\Query groupLimit()

groupLimit() public method (available since version 2.0.6) Sets groups limit: to return (no more than) N top matches for each group. This option will take effect only if groupBy() is set. public $this groupLimit ( $limit )$limit integer Group limit. return $this The query object itself.

sphinx\Query getConnection()

getConnection() public method public yii\sphinx\Connection getConnection ( )return yii\sphinx\Connection Sphinx connection instance

sphinx\Query fillUpSnippets()

fillUpSnippets() protected method Fills the query result rows with the snippets built from source determined by snippetCallback() result. protected array|yii\sphinx\ActiveRecord[] fillUpSnippets ( $rows )$rows array Raw query result rows. return array|yii\sphinx\ActiveRecord[] Query result rows with filled up snippets.