Cake\Database\Query::type PHP Метод

type() публичный Метод

Returns the type of this query (select, insert, update, delete)
public type ( ) : string
Результат string
    public function type()
    {
        return $this->_type;
    }

Usage Example

Пример #1
0
 /**
  * Returns the SQL representation of the provided query after generating
  * the placeholders for the bound values using the provided generator
  *
  * @param \Cake\Database\Query $query The query that is being compiled
  * @param \Cake\Database\ValueBinder $generator the placeholder generator to be used in expressions
  * @return \Closure
  */
 public function compile(Query $query, ValueBinder $generator)
 {
     $sql = '';
     $type = $query->type();
     $query->traverse($this->_sqlCompiler($sql, $query, $generator), $this->{'_' . $type . 'Parts'});
     return $sql;
 }
All Usage Examples Of Cake\Database\Query::type