N°1213 - Allow NOT IN SELECT in OQL syntax - support of UNION requests

This commit is contained in:
Eric
2019-12-03 11:44:33 +01:00
parent c0ae983faa
commit b415b1eeae
4 changed files with 416 additions and 387 deletions

View File

@@ -1946,20 +1946,24 @@ class NestedQueryExpression extends Expression
return '('.$this->m_oNestedQuery->ToOQL(false, null, false).')';
}
}
/*TODO*/
public function Browse(Closure $callback)
{
$callback($this);
}
/**/
public function ApplyParameters($aArgs)
{
$this->m_oNestedQuery->ApplyParameters($aArgs);
}
/**/
public function GetUnresolvedFields($sAlias, &$aUnresolved)
{
}
/**/
public function Translate($aTranslationData, $bMatchAll = true, $bMarkFieldsAsResolved = true)
{
@@ -1969,6 +1973,7 @@ class NestedQueryExpression extends Expression
$this->m_oNestedQuery->AddConditionExpression($oExpression);
return clone $this;
}
/*TODO*/
public function ListRequiredFields()
{
@@ -1979,6 +1984,7 @@ class NestedQueryExpression extends Expression
}
return $aRes;
}
/*TODO */
public function CollectUsedParents(&$aTable)
{

File diff suppressed because it is too large Load Diff

View File

@@ -128,10 +128,12 @@ expression_prio4(A) ::= expression_prio4(X) operator4(Y) expression_prio3(Z). {
list(A) ::= PAR_OPEN list_items(X) PAR_CLOSE. {
A = new ListOqlExpression(X);
}
//added for IN (SELECT..)
list(A) ::= PAR_OPEN query(X) PAR_CLOSE. {
A = new NestedQueryOqlExpression(X);
}
}
list(A) ::= PAR_OPEN union(X) PAR_CLOSE. {
A = new NestedQueryOqlExpression(X);
}
list_items(A) ::= expression_prio4(X). {
A = array(X);
@@ -322,4 +324,4 @@ class OQLParser extends OQLParserRaw
}
}
}
}