method parseQuery documentation in bbn\Db\Languages\Sql

Parses an SQL query and return an array.

function(string $statement) { if ($this->_parser === null) { $this->_parser = new PHPSQLParser(); } $done = false; try { $r = $this->_parser->parse($statement); $done = 1; } catch (\Exception $e){ $this->log('Error while parsing the query '.$statement); } if ($done) { if (!$r || !count($r)) { $this->log('Impossible to parse the query '.$statement); return null; } if (isset($r['BRACKET']) && (\count($r) === 1)) { /** @todo Is it impossible to parse queries with brackets ? */ //throw new \Exception('Bracket in the query '.$statement); return null; } return $r; } return null; }

Parses an SQL query and return an array. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.