示例#1
0
 private function parseTableQuery(QueryContext $context)
 {
     $context->schema($this->schema);
     switch ($this->queryType) {
         case self::QUERY_SELECT:
             return TableQueryExecutor::makeSelect($this->schema, $this->softDeleteLess, $this->selectFields, $this->conditions, $this->joins, $this->orders, $this->groups, $this->havings, $this->selectQuerySettings);
         case self::QUERY_UPDATE:
             return TableQueryExecutor::makeUpdate($this->schema, $this->updates, $this->conditions);
         case self::QUERY_DELETE:
             return TableQueryExecutor::makeDelete($this->schema, $this->conditions, $this->forceDelete);
         case self::QUERY_INSERT:
             return TableQueryExecutor::makeInsert($this->schema, $this->inserts, $this->insertGetId);
     }
     return null;
 }