/** * Registers a new namespace, and adds it as a child of its parent scope. * Derived class can override this method to tinker with namespaces as they * are created. * * @param usingScope Parent scope (which will want to look for things in * this namespace) * @param alias Alias by which parent will refer to this namespace * @param ns Namespace * @param forceNullable Whether to force the type of namespace to be nullable */ protected void registerNamespace( SqlValidatorScope usingScope, String alias, SqlValidatorNamespace ns, boolean forceNullable) { namespaces.put(ns.getNode(), ns); if (usingScope != null) { usingScope.addChild(ns, alias, forceNullable); } }
public void addChild(SqlValidatorNamespace ns, String alias, boolean nullable) { super.addChild(ns, alias, nullable); if ((usingScope != null) && (usingScope != parent)) { // We're looking at a join within a join. Recursively add this // child to its parent scope too. Example: // // select * // from (a join b on expr1) // join c on expr2 // where expr3 // // 'a' is a child namespace of 'a join b' and also of // 'a join b join c'. usingScope.addChild(ns, alias, nullable); } }
public void addChild(SqlValidatorNamespace ns, String alias, boolean nullable) { super.addChild(ns, alias, nullable); if ((usingScope != null) && (usingScope != parent)) { // We're looking at a join within a join. Recursively add this // child to its parent scope too. Example: // // select * // from (a join b on expr1) // join c on expr2 // where expr3 // // 'a' is a child namespace of 'a join b' and also of // 'a join b join c'. usingScope.addChild(ns, alias, nullable); } }
/** * Registers a new namespace, and adds it as a child of its parent scope. * Derived class can override this method to tinker with namespaces as they * are created. * * @param usingScope Parent scope (which will want to look for things in * this namespace) * @param alias Alias by which parent will refer to this namespace * @param ns Namespace * @param forceNullable Whether to force the type of namespace to be nullable */ protected void registerNamespace( SqlValidatorScope usingScope, String alias, SqlValidatorNamespace ns, boolean forceNullable) { namespaces.put(ns.getNode(), ns); if (usingScope != null) { usingScope.addChild(ns, alias, forceNullable); } }
/** * Registers a new namespace, and adds it as a child of its parent scope. * Derived class can override this method to tinker with namespaces as they * are created. * * @param usingScope Parent scope (which will want to look for things in * this namespace) * @param alias Alias by which parent will refer to this namespace * @param ns Namespace * @param forceNullable Whether to force the type of namespace to be nullable */ protected void registerNamespace( SqlValidatorScope usingScope, String alias, SqlValidatorNamespace ns, boolean forceNullable) { namespaces.put(ns.getNode(), ns); if (usingScope != null) { usingScope.addChild(ns, alias, forceNullable); } }