public function querySafe($query) {
        if ($this->state === self::STATE_SHEDULED) {
            $this->state = self::STATE_STARTED;
            $this->begin();
        }
        return $this->query($query);
    }