return$this->build($query,"n=n+1 if v==nil then v=0 end v=v+redis.call('HGET','$key:a:' .. pk,'$field')",'v/n');// TODO quote
return$this->build($query,"n=n+1 if v==nil then v=0 end v=v+redis.call('HGET',$key .. pk,".$this->quoteValue($column).")",'v/n');// TODO properly hash pk
}
}
publicfunctionbuildMin($query,$field)
/**
* Builds a Lua script for finding the min value of a column
* @param ActiveQuery $query the query used to build the script