public function query($query)
    {
        $this->errorInfo = null;
        $this->errorCode = null;
        $query = trim(strtolower($query));
        if ($query === 'show tables') {
            $data = array();
            foreach ($this->tables as $k => $table) {
                $data[] = array('name' => $k);
            }
            return new Cursor($data);
        }
        $this->errorInfo = 'Invalid query';
        $this->errorCode = self::ERROR_QUERY;
    }
public function query($query)
    {
        $this->errorInfo = null;
        $this->errorCode = null;
        $query = trim(strtolower($query));
        if ($query === 'show tables') {
            $data = array();
            foreach ($this->tables as $k => $table) {
                $data[] = array('name' => $k);
            }
            return new Cursor($data);
        }
        $this->errorInfo = 'Invalid query';
        $this->errorCode = self::ERROR_QUERY;
    }
public function query ( $ query ) { $ this -> errorInfo = null ; $ this -> errorCode = null ; $ query = trim ( strtolower ( $ query ) ) ; if ( $ query === 'show tables' ) { $ data = array ( ) ; foreach ( $ this -> tables as $ k => $ table ) { $ data [ ] = array ( 'name' => $ k ) ; } return new Cursor ( $ data ) ; } $ this -> errorInfo = 'Invalid query' ; $ this -> errorCode = self :: ERROR_QUERY ; }
Performs a query

@param string $query
@return \go\DB\Implementations\TestBase\Cursor
Performs a query