This method allows you to specify multiple (method chaining optional) options for SQL queries.
public setQueryOption ( string | array $options ) : MysqliDb | ||
$options | string | array | The optons name of the query. |
Результат | MysqliDb |
private function processHasOneWith() { if (count($this->_with) == 0) { return; } foreach ($this->_with as $name => $opts) { $relationType = strtolower($opts[0]); $modelName = $opts[1]; $key = null; if (isset($opts[2])) { $key = $opts[2]; } if ($relationType == 'hasone') { $this->db->setQueryOption("MYSQLI_NESTJOIN"); $this->join($modelName, $key); } } }