@Override public void bufferRef(JPNode idAST) { LOG.trace("Entering bufferRef {}", idAST); TableBuffer tableBuffer = currentScope.lookupBuffer(idAST.getText()); if (tableBuffer != null) { tableBuffer.noteReference(ContextQualifier.SYMBOL); } }
@Override public void bufferRef(JPNode idAST) { LOG.trace("Entering bufferRef {}", idAST); TableBuffer tableBuffer = currentScope.lookupBuffer(idAST.getText()); if (tableBuffer != null) { tableBuffer.noteReference(ContextQualifier.SYMBOL); } }
|| (!dbPart.isEmpty() && (symbol.getTable().getStoretype() == IConstants.ST_TTABLE))) { if (parentScope != null) { TableBuffer tb = parentScope.lookupBuffer(inName); if (tb != null) { return tb;
|| (!dbPart.isEmpty() && (symbol.getTable().getStoretype() == IConstants.ST_TTABLE))) { if (parentScope != null) { TableBuffer tb = parentScope.lookupBuffer(inName); if (tb != null) { return tb;
/** * Lookup a Table or a BufferSymbol, schema table first. It seems to work like this: unabbreviated schema name, then * buffer/temp/work name, then abbreviated schema names. Sheesh. */ public TableBuffer lookupTableOrBufferSymbol(String inName) { String tblName = inName.indexOf('.') == -1 ? inName : inName.substring(inName.indexOf('.') + 1); ITable table = getRootScope().getRefactorSession().getSchema().lookupTable(tblName); if ((table != null) && tblName.equalsIgnoreCase(table.getName())) return getUnnamedBuffer(table); TableBuffer ret2 = lookupBuffer(tblName); if (ret2 != null) return ret2; if (table != null) return getUnnamedBuffer(table); if (parentScope == null) return null; return parentScope.lookupTableOrBufferSymbol(inName); }
/** * Lookup a Table or a BufferSymbol, schema table first. It seems to work like this: unabbreviated schema name, then * buffer/temp/work name, then abbreviated schema names. Sheesh. */ public TableBuffer lookupTableOrBufferSymbol(String inName) { String tblName = inName.indexOf('.') == -1 ? inName : inName.substring(inName.indexOf('.') + 1); ITable table = getRootScope().getRefactorSession().getSchema().lookupTable(tblName); if ((table != null) && tblName.equalsIgnoreCase(table.getName())) return getUnnamedBuffer(table); TableBuffer ret2 = lookupBuffer(tblName); if (ret2 != null) return ret2; if (table != null) return getUnnamedBuffer(table); if (parentScope == null) return null; return parentScope.lookupTableOrBufferSymbol(inName); }
/** Given a name, find a BufferSymbol (or create if necessary for unnamed buffer). */ public TableBuffer getBufferSymbol(String inName) { TableBuffer symbol = lookupBuffer(inName); if (symbol != null) return symbol; // The default buffer for temp and work tables was defined at // the time that the table was defined. So, lookupBuffer() would have found // temp/work table references, and all we have to search now is schema. ITable table = getRootScope().getRefactorSession().getSchema().lookupTable(inName); if (table == null) return null; return getUnnamedBuffer(table); }
/** Given a name, find a BufferSymbol (or create if necessary for unnamed buffer). */ public TableBuffer getBufferSymbol(String inName) { TableBuffer symbol = lookupBuffer(inName); if (symbol != null) return symbol; // The default buffer for temp and work tables was defined at // the time that the table was defined. So, lookupBuffer() would have found // temp/work table references, and all we have to search now is schema. ITable table = getRootScope().getRefactorSession().getSchema().lookupTable(inName); if (table == null) return null; return getUnnamedBuffer(table); }
ITable table; boolean isDefault; TableBuffer tableBuffer = currentScope.lookupBuffer(buffName); if (tableBuffer != null) { table = tableBuffer.getTable();
ITable table; boolean isDefault; TableBuffer tableBuffer = currentScope.lookupBuffer(buffName); if (tableBuffer != null) { table = tableBuffer.getTable();
@Override public TableBuffer lookupBuffer(String name) { TableBuffer buff = super.lookupBuffer(name); if (buff != null) { return buff; } ITypeInfo info = typeInfo; while (info != null) { if (info.hasBuffer(name)) { IBufferElement elem = info.getBuffer(name); ITable tbl = null; if (!Strings.isNullOrEmpty(elem.getDatabaseName())) { tbl = refSession.getSchema().lookupTable(elem.getDatabaseName(), elem.getTableName()); } else { tbl = lookupTempTable(elem.getTableName()).getTable(); } if (tbl == null) { // Defaults to fake temp-table tbl = new Table(name, IConstants.ST_TTABLE); } return new TableBuffer(name, this, tbl); } info = refSession.getTypeInfo(info.getParentTypeName()); } return null; }
@Override public TableBuffer lookupBuffer(String name) { TableBuffer buff = super.lookupBuffer(name); if (buff != null) { return buff; } ITypeInfo info = typeInfo; while (info != null) { if (info.hasBuffer(name)) { IBufferElement elem = info.getBuffer(name); ITable tbl = null; if (!Strings.isNullOrEmpty(elem.getDatabaseName())) { tbl = refSession.getSchema().lookupTable(elem.getDatabaseName(), elem.getTableName()); } else { tbl = lookupTempTable(elem.getTableName()).getTable(); } if (tbl == null) { // Defaults to fake temp-table tbl = new Table(name, IConstants.ST_TTABLE); } return new TableBuffer(name, this, tbl); } info = refSession.getTypeInfo(info.getParentTypeName()); } return null; }