Package com.winvector.db.DBIterable

Examples of com.winvector.db.DBIterable.RSIterator


public class DBDump {
 
  public static long runQuery(final String query, final PrintStream p, final DBHandle handle) throws SQLException {
    final Statement stmt = handle.createReadStatement();
    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;
View Full Code Here


public class DBDump {
 
  public static long runQuery(final String query, final PrintStream p, final DBHandle handle) throws SQLException {
    final Statement stmt = handle.createReadStatement();
    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;
      }
View Full Code Here

TOP

Related Classes of com.winvector.db.DBIterable.RSIterator

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.