lithium\data\source\http\adapter\CouchDb::_autoBuild PHP Method

_autoBuild() protected method

Helper used for auto building a CouchDB database.
protected _autoBuild ( string $result )
$result string A query result.
    protected function _autoBuild($result)
    {
        $hasError = isset($result['error']) && isset($result['reason']) && $result['reason'] === "no_db_file";
        if ($hasError) {
            $this->connection->put($this->_config['database']);
            return true;
        }
        return false;
    }