More work on the query parser

This commit is contained in:
Kijin Sung 2020-06-26 16:52:41 +09:00
parent 92ff69591f
commit 6eca8736c1
6 changed files with 422 additions and 76 deletions

View file

@ -45,11 +45,11 @@ class DBQueryParser
{
$query->name = $query->alias;
}
$query->type = strtoupper($xml['action']) ?: null;
$query->type = strtoupper($xml['action']) ?: 'SELECT';
// Load attributes that only apply to subqueries in the <conditions> block.
$query->operation = trim($xml['operation']) ?: null;
$query->column = trim($xml['column']) ?: null;
$query->column = preg_replace('/[^a-z0-9_\.]/i', '', $xml['column']) ?: null;
$query->pipe = strtoupper($xml['pipe']) ?: 'AND';
// Load tables.