public static function eq(Query $query, $prefix = null) { if ($prefix === null) { $trace = debug_backtrace(); $prefix = basename($trace[0]['file']) . ':' . $trace[0]['line']; } error_log($prefix . ": " . $query->toDialectString(DBPool::me()->getLink()->getDialect())); }
public final function query(Query $query) { $result = $this->queryRaw($query->toDialectString($this->getDialect())); if ($query instanceof InsertQuery && !empty($this->sequencePool[$name = $query->getTable() . '_id'])) { $id = current($this->sequencePool[$name]); Assert::isTrue($id instanceof Identifier, 'identifier was lost in the way'); $id->setId($this->getInsertId())->finalize(); unset($this->sequencePool[$name][key($this->sequencePool[$name])]); } return $result; }
public function queryNull(Query $query) { if ($query instanceof SelectQuery) { throw new WrongArgumentException('only non-select queries supported'); } if ($this->toQueue) { $this->queue[] = $query->toDialectString($this->getDialect()); return true; } else { return $this->query($query); } }