// XXX Context API
// ------------------------------------------------------------------------
private final C visit0(QueryPart part) {
if (part != null) {
QueryPartInternal internal = (QueryPartInternal) part;
// If this is supposed to be a declaration section and the part isn't
// able to declare anything, then disable declaration temporarily
// We're declaring fields, but "part" does not declare fields
if (declareFields() && !internal.declaresFields()) {
declareFields(false);
visit0(internal);
declareFields(true);
}
// We're declaring tables, but "part" does not declare tables
else if (declareTables() && !internal.declaresTables()) {
declareTables(false);
visit0(internal);
declareTables(true);
}
// We're declaring windows, but "part" does not declare windows
else if (declareWindows() && !internal.declaresWindows()) {
declareWindows(false);
visit0(internal);
declareWindows(true);
}
// We're declaring cte, but "part" does not declare cte
else if (declareCTE() && !internal.declaresCTE()) {
declareCTE(false);
visit0(internal);
declareCTE(true);
}