final public function query($pattern, $data = null, $fetch = null, $prefix = null)
    {
        $query = $this->makeQuery($pattern, $data, $prefix);
        return $this->plainQuery($query, $fetch);
    }
final public function query($pattern, $data = null, $fetch = null, $prefix = null)
    {
        $query = $this->makeQuery($pattern, $data, $prefix);
        return $this->plainQuery($query, $fetch);
    }
final public function query ( $ pattern , $ data = null , $ fetch = null , $ prefix = null ) { $ query = $ this -> makeQuery ( $ pattern , $ data , $ prefix ) ; return $ this -> plainQuery ( $ query , $ fetch ) ; }
Performs a query on the database

@param string $pattern
the query pattern
@param array $data [optional]
the incoming data for the query pattern
@param string $fetch [optional]
the result format
@param string $prefix [optional]
a table prefix for the current query
@return \go\DB\Result
the query result in specified format
@throws \go\DB\Exceptions\Connect
an error of lazy connection
@throws \go\DB\Exceptions\Closed
the connection is closed
@throws \go\DB\Exceptions\Templater
an error of the templating system ($pattern or $data is invalid)
@throws \go\DB\Exceptions\Query
an error of the query
@throws \go\DB\Exceptions\Fetch
the result format is invalid for this query type
Performs a query on the database