redis\ActiveQuery __construct()

__construct() public method Constructor. public void __construct ( $modelClass, $config = [] )$modelClass array The model class associated with this query $config array Configurations to be applied to the newly created query object

redis\ActiveQuery sum()

sum() public method Returns the number of records. public integer sum ( $column, $db = null )$column string The column to sum up $db yii\redis\Connection The database connection used to execute the query. If this parameter is not given, the db application component will be used. return integer Number of records

redis\ActiveQuery scalar()

scalar() public method Returns the query result as a scalar value. The value returned will be the specified attribute in the first record of the query results. public string scalar ( $attribute, $db = null )$attribute string Name of the attribute to select $db yii\redis\Connection The database connection used to execute the query. If this parameter is not given, the db application component will be used. return string The value of the specified attribute in the first record of the qu

redis\ActiveQuery one()

one() public method Executes the query and returns a single row of result. public yii\redis\ActiveRecord|array|null one ( $db = null )$db yii\redis\Connection The database connection used to execute the query. If this parameter is not given, the db application component will be used. return yii\redis\ActiveRecord|array|null A single row of query result. Depending on the setting of asArray(), the query result may be either an array or an ActiveRecord object. Null will be returned if t

redis\ActiveQuery min()

min() public method Returns the minimum of the specified column values. public integer min ( $column, $db = null )$column string The column name or expression. Make sure you properly quote column names in the expression. $db yii\redis\Connection The database connection used to execute the query. If this parameter is not given, the db application component will be used. return integer The minimum of the specified column values.

redis\ActiveQuery max()

max() public method Returns the maximum of the specified column values. public integer max ( $column, $db = null )$column string The column name or expression. Make sure you properly quote column names in the expression. $db yii\redis\Connection The database connection used to execute the query. If this parameter is not given, the db application component will be used. return integer The maximum of the specified column values.

redis\ActiveQuery init()

init() public method Initializes the object. This method is called at the end of the constructor. The default implementation will trigger an EVENT_INIT event. If you override this method, make sure you call the parent implementation at the end to ensure triggering of the event. public void init ( )

redis\ActiveQuery exists()

exists() public method Returns a value indicating whether the query result contains any row of data. public boolean exists ( $db = null )$db yii\redis\Connection The database connection used to execute the query. If this parameter is not given, the db application component will be used. return boolean Whether the query result contains any row of data.

redis\ActiveQuery executeScript()

executeScript() protected method Executes a script created by yii\redis\LuaScriptBuilder protected array|boolean|null|string executeScript ( $db, $type, $columnName = null )$db yii\redis\Connection|null The database connection used to execute the query. If this parameter is not given, the db application component will be used. $type string The type of the script to generate $columnName string throws yii\base\NotSupportedException

redis\ActiveQuery EVENT_INIT

EVENT_INIT event of type \yii\redis\Event An event that is triggered when the query is initialized via init().