Package org.teiid.query.sql.lang.TextTable

Examples of org.teiid.query.sql.lang.TextTable.TextColumn


        visitNode(obj.getFile());
        append(SPACE);
        append(NonReserved.COLUMNS);

        for (Iterator<TextColumn> cols = obj.getColumns().iterator(); cols.hasNext();) {
            TextColumn col = cols.next();
            append(SPACE);
            outputDisplayName(col.getName());
            append(SPACE);
            append(col.getType());
            if (col.getWidth() != null) {
                append(SPACE);
                append(NonReserved.WIDTH);
                append(SPACE);
                append(col.getWidth());
            }
            if (cols.hasNext()) {
                append(","); //$NON-NLS-1$
            }
        }
View Full Code Here


     
      List<String> vals = parseLine(line);
     
      List<Object> tuple = new ArrayList<Object>(projectionIndexes.length);
      for (int output : projectionIndexes) {
        TextColumn col = table.getColumns().get(output);
        String val = null;
        int index = output;
        if (nameIndexes != null) {
          index = nameIndexes.get(col.getName());
        }
        if (index >= vals.size()) {
          throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.no_value", col.getName(), textLine, systemId)); //$NON-NLS-1$
        }
        val = vals.get(index);
        try {
          tuple.add(DataTypeManager.transformValue(val, table.getColumns().get(output).getSymbol().getType()));
        } catch (TransformationException e) {
          throw new TeiidProcessingException(e, QueryPlugin.Util.getString("TextTableNode.conversion_error", col.getName(), textLine, systemId)); //$NON-NLS-1$
        }
      }
      addBatchRow(tuple);
    }
   
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.lang.TextTable.TextColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.