fix handling of subqueries in query design
- don't remove parentheses around subqueries (without the parentheses, it is not valid SQL) * when saving a Field (name value) typed by the user interactively * when parsing SQL and constructing the initial Query Design view - automatically add the necessary parentheses when a SELECT statement is entered as column name Also: In code saving a Field (name value) typed by the user interactively, factorise some common code Assorted minor fixes (typos in comments, etc) Change-Id: I3843258323c903cba23238b0730ec4eb5875f792
This commit is contained in:
@@ -2202,7 +2202,8 @@ namespace
|
||||
pColumnRef = pColumnRef->getChild(0);
|
||||
OTableFieldDescRef aInfo = new OTableFieldDesc();
|
||||
|
||||
if ( pColumnRef->count() == 3 &&
|
||||
if ( pColumnRef->getKnownRuleID() != OSQLParseNode::subquery &&
|
||||
pColumnRef->count() == 3 &&
|
||||
SQL_ISPUNCTUATION(pColumnRef->getChild(0),"(") &&
|
||||
SQL_ISPUNCTUATION(pColumnRef->getChild(2),")")
|
||||
)
|
||||
|
Reference in New Issue
Block a user