Reorder and categorize query attributes for easy reference

This commit is contained in:
Kijin Sung 2020-06-27 01:25:05 +09:00
parent a1b946bae6
commit dcbd26e7f2
2 changed files with 19 additions and 8 deletions

View file

@ -40,12 +40,12 @@ class DBQueryParser
// Load basic information about this query.
$query = new DBQuery\Query;
$query->name = $name ?: null;
$query->type = strtoupper($xml['action']) ?: 'SELECT';
$query->alias = trim($xml['alias']) ?: null;
if ($query->alias && !$query->name)
{
$query->name = $query->alias;
}
$query->type = strtoupper($xml['action']) ?: 'SELECT';
// Load attributes that only apply to subqueries in the <conditions> block.
$query->operation = trim($xml['operation']) ?: null;