Package com.winvector.util

Examples of com.winvector.util.BurstMap


            if(null==field) { // belt and suspenders version
              field = SQLTypeAdapter.stringExtracter.getField(rs,i);
            }
            mp.put(colNames[i],field);
          }
          next = new BurstMap("db",mp);
          if(!rs.next()) {
            rs = null;
          }
        } catch (SQLException ex) {
          if(rs!=null) {
View Full Code Here


    @Override
    public BurstMap next() {
      if(!hasNext()) {
        throw new NoSuchElementException("RSIterator");
      }
      final BurstMap ret = next;
      advance();
      return ret;
    }
View Full Code Here

      final ArrayList<BurstMap> source = new ArrayList<BurstMap>();
      final TreeMap<String, Object> mp = new TreeMap<String,Object>();
      mp.put("A",1.2);
      mp.put("B",5);
      mp.put("C","XXX");
      source.add(new BurstMap("test",mp));
      final TableControl tableControl = new TableControl(p,"TESTTABLE");
      tableControl.scanForDefs(sourceName,source, null);
      tableControl.buildSQLStatements();
      tableControl.createTable(dbhandle);
      final Date now = new Date();
View Full Code Here

    final RSIterator source = new RSIterator(stmt.executeQuery(query));
    final String sep = "\t";
    boolean first = true;
    long rowNum = 0;
    while(source.hasNext()) {
      final BurstMap row = source.next();
      if(first) {
        boolean firstCol = true;
        for(final String ki: row.keySet()) {
          if(firstCol) {
            firstCol = false;
          } else {
            p.print(sep);
          }
          //final TypeInfo columnInfo = source.getJavaClassName(ki);
          p.print(TrivialReader.safeStr(ki) /* + ":" + columnInfo.sqlColumnType */);
        }
        p.println();
        first = false;
      }
      boolean firstCol = true;
      for(final String ki: row.keySet()) {
        if(firstCol) {
          firstCol = false;
        } else {
          p.print(sep);
        }
        final String vi = row.getAsString(ki);
        p.print(TrivialReader.safeStr(vi));
      }
      p.println();
      ++rowNum;
      // System.out.println(row);
View Full Code Here

                } else {
                  map.put(fi.name,null);
                }
              }
              if(gotOne) {
                next = new BurstMap(line,map);
              }
            }
          }
        }
      }
View Full Code Here

      @Override
      public BurstMap next() {
        if(!hasNext()) {
          throw new NoSuchElementException();
        }
        final BurstMap r = next;
        try {
          advance();
        } catch (IOException ex) {
          throw new RuntimeException(ex);
        }
View Full Code Here

            default:
              mp.put(colNames[i],rs.getString(i+1));
              break;
            }
          }
          next = new BurstMap("db",mp);
          if(!rs.next()) {
            rs = null;
          }
        } catch (SQLException ex) {
          if(rs!=null) {
View Full Code Here

    @Override
    public BurstMap next() {
      if(!hasNext()) {
        throw new NoSuchElementException("RSIterator");
      }
      final BurstMap ret = next;
      advance();
      return ret;
    }
View Full Code Here

    final RSIterator source = new RSIterator(stmt.executeQuery(query));
    final String sep = "\t";
    boolean first = true;
    long rowNum = 0;
    while(source.hasNext()) {
      final BurstMap row = source.next();
      if(first) {
        boolean firstCol = true;
        for(final String ki: row.keySet()) {
          if(firstCol) {
            firstCol = false;
          } else {
            p.print(sep);
          }
          final TypeInfo columnInfo = source.getJavaClassName(ki);
          p.print(TrivialReader.safeStr(ki) + ":" + columnInfo.sqlColumnType);
        }
        p.println();
        first = false;
      }
      boolean firstCol = true;
      for(final String ki: row.keySet()) {
        if(firstCol) {
          firstCol = false;
        } else {
          p.print(sep);
        }
        final String vi = row.getAsString(ki);
        p.print(TrivialReader.safeStr(vi));
      }
      p.println();
      ++rowNum;
      // System.out.println(row);
View Full Code Here

TOP

Related Classes of com.winvector.util.BurstMap

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.