String colName = column.getName(); if (column.getNameInSource() != null) { colName = column.getNameInSource();
/** * Utility method to convert expression to the appropriate string value for LDAP. * @param e expression to evaluate * @return LDAP-specific string equivalent of the expression */ // GHH 20080326 - found that code to fall back on Name if NameInSource // was null wasn't working properly, so replaced with tried and true // code from another custom connector. private String getExpressionQueryString(Expression e) throws TranslatorException { String expressionName = null; // GHH 20080326 - changed around the IElement handling here // - the rest of this method is unchanged if(e instanceof ColumnReference) { Column mdIDElement = ((ColumnReference)e).getMetadataObject(); expressionName = mdIDElement.getNameInSource(); if(expressionName == null || expressionName.equals("")) { //$NON-NLS-1$ expressionName = mdIDElement.getName(); } } else if(e instanceof Literal) { expressionName = getLiteralString((Literal)e); } else { final String msg = LDAPPlugin.Util.getString("IQueryToLdapSearchParser.unsupportedElementError", e.getClass().getSimpleName()); //$NON-NLS-1$ throw new TranslatorException(msg + e.toString()); } expressionName = escapeReservedChars(expressionName); return expressionName; }
for (Iterator<Column> colIter = columns.iterator(); colIter.hasNext();) { Column column = colIter.next(); if(column.getNameInSource().equals(relationship.getField())) { col = column;
continue; String name = element.getNameInSource(); int seqIndex = name.indexOf(SEQUENCE); if (seqIndex == -1) {
continue; String exprString = c.getNameInSource(); Expression ex = QueryParser.getQueryParser().parseExpression(exprString); Integer index = newExprs.get(ex);
continue; String exprString = c.getNameInSource(); Expression ex = QueryParser.getQueryParser().parseExpression(exprString); Integer index = newExprs.get(ex);
public void visit(Update obj) { worksheetTitle = obj.getTable().getName(); changes = new ArrayList<UpdateSet>(); String columnName; if (obj.getTable().getMetadataObject().getNameInSource() != null) { this.worksheetTitle = obj.getTable().getMetadataObject().getNameInSource(); } for (SetClause s : obj.getChanges()) { if(s.getSymbol().getMetadataObject().getNameInSource()!=null){ columnName=s.getSymbol().getMetadataObject().getNameInSource(); }else{ columnName=s.getSymbol().getMetadataObject().getName(); } changes.add(new UpdateSet(columnName, getStringValue(s.getValue()))); } translateWhere(obj.getWhere()); }
continue; String exprString = c.getNameInSource(); Expression ex = QueryParser.getQueryParser().parseExpression(exprString); Integer index = newExprs.get(ex);
c.setProperty(RELATION_PROPERTY, attr.getName()); c.setProperty(RELATION_KEY, column.getName()); c.setNameInSource(column.getNameInSource()); keys.add(fk);
private void addColumns(List<Column> columns, boolean includeType) { append(LPAREN); boolean first = true; for (Column c:columns) { if (first) { first = false; } else { append(COMMA).append(SPACE); } if (includeType) { appendColumn(c, true, includeType); appendColumnOptions(c); } else if (c.getParent() instanceof KeyRecord) { //function based column append(c.getNameInSource()); } else { append(SQLStringVisitor.escapeSinglePart(c.getName())); } } append(RPAREN); }
private void addColumns(List<Column> columns, boolean includeType) { append(LPAREN); boolean first = true; for (Column c:columns) { if (first) { first = false; } else { append(COMMA).append(SPACE); } if (includeType) { appendColumn(c, true, includeType); appendColumnOptions(c); } else if (c.getParent() instanceof KeyRecord) { //function based column append(c.getNameInSource()); } else { append(SQLStringVisitor.escapeSinglePart(c.getName())); } } append(RPAREN); }
private void addColumns(List<Column> columns, boolean includeType) { append(LPAREN); boolean first = true; for (Column c:columns) { if (first) { first = false; } else { append(COMMA).append(SPACE); } if (includeType) { appendColumn(c, true, includeType); appendColumnOptions(c); } else if (c.getParent() instanceof KeyRecord) { //function based column append(c.getNameInSource()); } else { append(SQLStringVisitor.escapeSinglePart(c.getName())); } } append(RPAREN); }
if (column.getNameInSource() != null) { addStringAnnotation(property, "teiid.NAMEINSOURCE", column.getNameInSource());
row.add(key.getName()); row.add(key.getAnnotation()); row.add(key.getNameInSource()); row.add(key.getType().toString()); row.add(false);
row.add(key.getName()); row.add(key.getAnnotation()); row.add(key.getNameInSource()); row.add(key.getType().toString()); row.add(false);
row.add(key.getName()); row.add(key.getAnnotation()); row.add(key.getNameInSource()); row.add(key.getType().toString()); row.add(false);
continue; String exprString = c.getNameInSource(); try { Expression ex = parser.parseExpression(exprString);
continue; String exprString = c.getNameInSource(); try { Expression ex = parser.parseExpression(exprString);
continue; String exprString = c.getNameInSource(); try { Expression ex = parser.parseExpression(exprString);
assertEquals(true, e5.isAutoIncremented()); assertEquals("uuid", e5.getUUID()); assertEquals("nis", e5.getNameInSource()); assertEquals(false, e5.isSelectable()); assertEquals("index", e5, table.getIndexes().get(0).getColumns().get(0));