public boolean isTempGroupInsert() { return intoGroup.isTempGroupSymbol(); }
public boolean isTempGroupInsert() { return intoGroup.isTempGroupSymbol(); }
public boolean isTempGroupInsert() { return intoGroup.isTempGroupSymbol(); }
/** * Visit a language object and collect symbols. This method should <b>NOT</b> be * called directly. * @param obj Language object */ public void visit(GroupSymbol obj) { if(this.isIntoClauseGroup){ if (!obj.isTempGroupSymbol()) { // This is a physical group. Collect it. this.groups.add(obj); } this.isIntoClauseGroup = false; }else{ this.groups.add(obj); } }
/** * Visit a language object and collect symbols. This method should <b>NOT</b> be * called directly. * @param obj Language object */ public void visit(GroupSymbol obj) { if(this.isIntoClauseGroup){ if (!obj.isTempGroupSymbol()) { // This is a physical group. Collect it. this.groups.add(obj); } this.isIntoClauseGroup = false; }else{ this.groups.add(obj); } }
/** * Visit a language object and collect symbols. This method should <b>NOT</b> be * called directly. * @param obj Language object */ public void visit(GroupSymbol obj) { if(this.isIntoClauseGroup){ if (!obj.isTempGroupSymbol()) { // This is a physical group. Collect it. this.groups.add(obj); } this.isIntoClauseGroup = false; }else{ this.groups.add(obj); } }
public void testIsTempGroupSymbol() { GroupSymbol group = new GroupSymbol("g1"); //$NON-NLS-1$ assertFalse(group.isTempGroupSymbol()); group = new GroupSymbol("#temp"); //$NON-NLS-1$ assertTrue(group.isTempGroupSymbol()); }
public void testIsNotTempGroupSymbol() { GroupSymbol group = new GroupSymbol("g1"); //$NON-NLS-1$ assertFalse(group.isTempGroupSymbol()); group = new GroupSymbol("temp"); //$NON-NLS-1$ assertFalse(group.isTempGroupSymbol()); }
static void addToNameMap(Object metadataID, LanguageObject symbol, Map<String, LanguageObject> nameToSymbolMap, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { String fullName = metadata.getFullName(metadataID); Object modelId = metadata.getModelID(metadataID); String modelName = metadata.getFullName(modelId); if (!isSystemSchema(modelName)) { //foreign temp table full names are not schema qualified by default if (!metadata.isVirtualModel(modelId)) { GroupSymbol group = null; if (symbol instanceof ElementSymbol) { group = ((ElementSymbol)symbol).getGroupSymbol(); } else if (symbol instanceof GroupSymbol) { group = (GroupSymbol)symbol; } if (group != null && group.isTempGroupSymbol() && !group.isGlobalTable()) { fullName = modelName + AbstractMetadataRecord.NAME_DELIM_CHAR + modelId; } } nameToSymbolMap.put(fullName, symbol); } }
static void addToNameMap(Object metadataID, LanguageObject symbol, Map<String, LanguageObject> nameToSymbolMap, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { String fullName = metadata.getFullName(metadataID); Object modelId = metadata.getModelID(metadataID); String modelName = metadata.getFullName(modelId); if (!isSystemSchema(modelName)) { //foreign temp table full names are not schema qualified by default if (!metadata.isVirtualModel(modelId)) { GroupSymbol group = null; if (symbol instanceof ElementSymbol) { group = ((ElementSymbol)symbol).getGroupSymbol(); } else if (symbol instanceof GroupSymbol) { group = (GroupSymbol)symbol; } if (group != null && group.isTempGroupSymbol() && !group.isGlobalTable()) { fullName = modelName + AbstractMetadataRecord.NAME_DELIM_CHAR + modelId; } } nameToSymbolMap.put(fullName, symbol); } }
static void addToNameMap(Object metadataID, LanguageObject symbol, Map<String, LanguageObject> nameToSymbolMap, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException { String fullName = metadata.getFullName(metadataID); Object modelId = metadata.getModelID(metadataID); String modelName = metadata.getFullName(modelId); if (!isSystemSchema(modelName)) { //foreign temp table full names are not schema qualified by default if (!metadata.isVirtualModel(modelId)) { GroupSymbol group = null; if (symbol instanceof ElementSymbol) { group = ((ElementSymbol)symbol).getGroupSymbol(); } else if (symbol instanceof GroupSymbol) { group = (GroupSymbol)symbol; } if (group != null && group.isTempGroupSymbol() && !group.isGlobalTable()) { fullName = modelName + AbstractMetadataRecord.NAME_DELIM_CHAR + modelId; } } nameToSymbolMap.put(fullName, symbol); } }
public static Object getTrackableGroup(GroupSymbol group, QueryMetadataInterface metadata) throws TeiidComponentException, QueryMetadataException { Object metadataID = group.getMetadataID(); if (group.isTempGroupSymbol()) { QueryMetadataInterface qmi = metadata.getSessionMetadata(); try { //exclude proc scoped temp tables if (group.isGlobalTable()) { return metadataID; } if (qmi != null) { Object mid = qmi.getGroupID(group.getNonCorrelationName()); if (mid == metadataID || metadata.isVirtualGroup(metadataID)) { //global temp should use the session metadata reference instead return mid; } } } catch (QueryMetadataException e) { //not a session table } if (metadata.isVirtualGroup(metadataID)) { //global temp table return metadataID; } } else { return metadataID; } return null; }
public static Object getTrackableGroup(GroupSymbol group, QueryMetadataInterface metadata) throws TeiidComponentException, QueryMetadataException { Object metadataID = group.getMetadataID(); if (group.isTempGroupSymbol()) { QueryMetadataInterface qmi = metadata.getSessionMetadata(); try { //exclude proc scoped temp tables if (group.isGlobalTable()) { return metadataID; } if (qmi != null) { Object mid = qmi.getGroupID(group.getNonCorrelationName()); if (mid == metadataID || metadata.isVirtualGroup(metadataID)) { //global temp should use the session metadata reference instead return mid; } } } catch (QueryMetadataException e) { //not a session table } if (metadata.isVirtualGroup(metadataID)) { //global temp table return metadataID; } } else { return metadataID; } return null; }
public static Object getTrackableGroup(GroupSymbol group, QueryMetadataInterface metadata) throws TeiidComponentException, QueryMetadataException { Object metadataID = group.getMetadataID(); if (group.isTempGroupSymbol()) { QueryMetadataInterface qmi = metadata.getSessionMetadata(); try { //exclude proc scoped temp tables if (group.isGlobalTable()) { return metadataID; } if (qmi != null) { Object mid = qmi.getGroupID(group.getNonCorrelationName()); if (mid == metadataID || metadata.isVirtualGroup(metadataID)) { //global temp should use the session metadata reference instead return mid; } } } catch (QueryMetadataException e) { //not a session table } if (metadata.isVirtualGroup(metadataID)) { //global temp table return metadataID; } } else { return metadataID; } return null; }
if (!modelName.equals(TempMetadataAdapter.TEMP_MODEL.getID()) || !group.isTempGroupSymbol()) { return null;
if (!modelName.equals(TempMetadataAdapter.TEMP_MODEL.getID()) || !group.isTempGroupSymbol()) { return null;
column.setMetadataID(new TempMetadataID(column.getShortName(), column.getType())); } else if (dynamicCmd.getIntoGroup().isTempGroupSymbol()) { resolvedColumns = true; while (columns.hasNext()) {
column.setMetadataID(new TempMetadataID(column.getShortName(), column.getType())); } else if (dynamicCmd.getIntoGroup().isTempGroupSymbol()) { resolvedColumns = true; while (columns.hasNext()) {
column.setMetadataID(new TempMetadataID(column.getShortName(), column.getType())); } else if (dynamicCmd.getIntoGroup().isTempGroupSymbol()) { resolvedColumns = true; while (columns.hasNext()) {
if (!modelName.equals(TempMetadataAdapter.TEMP_MODEL.getID()) || !group.isTempGroupSymbol()) { return null;