Package com.winvector.util

Examples of com.winvector.util.TrivialReader$TrivialIterator


    }
    final TableControl tableControl = new TableControl(props,tableName);
    for(int argi=firstSourceArg;argi<args.length;++argi) {
      final URI inURI = new URI(args[argi]);
      System.out.println("\tscan source URI:\t" + inURI);
      final Iterable<BurstMap> source = new TrivialReader(inURI,sep,null,true,null, false);
      tableControl.scanForDefs(inURI.toString(),source, null);
    }
    tableControl.buildSQLStatements();
    tableControl.createTable(handle);
    final Random rand = new Random(42);
    long nInserted = 0;
    for(int argi=firstSourceArg;argi<args.length;++argi) {
      final URI inURI = new URI(args[argi]);
      System.out.println("\tload source URI:\t" + inURI);
      final Iterable<BurstMap> source = new TrivialReader(inURI,sep,null,true,null, false);
      final long nI = tableControl.loadData(inURI.toString(),now,rand,source, null, handle);
      System.out.println("\tinserted " + nI + " rows");
      nInserted += nI;
    }
    handle.conn.close();
View Full Code Here


    }
    try {
      handle.conn.setAutoCommit(false);
    } catch (Exception ex) {
    }
    final Iterable<BurstMap> source = new TrivialReader(inURI,sep,null,true,null, false);
    final String sourceName = inURI.toString();
    final TableControl tableControl = new TableControl(props,tableName);
    tableControl.scanForDefs(sourceName,source, null);
    tableControl.buildSQLStatements();
    tableControl.createTable(handle);
View Full Code Here

    System.out.println("\tDBProperties XML:\t" + propsURI.toString());
    System.out.println("\ttableName:\t" + tableName);
    final Properties props = DBUtil.loadProps(propsURI);
    final DBHandle handle = DBUtil.buildConnection(propsURI.toString(),props,false);
    System.out.println("\tdb:\t" + handle);
    final ArrayList<FixedFieldDef> origFieldDefs = readFieldDefs(new TrivialReader(fieldSpecURI,'\t',null,true,null, false));
    final ArrayList<FixedFieldDef> fieldDefs = notCoveredBySingles(origFieldDefs);
    try {
      handle.conn.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
    } catch (Exception ex) {
    }
View Full Code Here

    }
    final TableControl tableControl = new TableControl(tableName);
    for(int argi=firstSourceArg;argi<args.length;++argi) {
      final URI inURI = new URI(args[argi]);
      System.out.println("\tscan source URI:\t" + inURI);
      final Iterable<BurstMap> source = new TrivialReader(inURI,sep,null,true,null, false);
      tableControl.scanForDefs(inURI.toString(),source, null);
    }
    tableControl.buildSQLStatements();
    tableControl.createTable(handle);
    final Random rand = new Random();
    long nInserted = 0;
    for(int argi=firstSourceArg;argi<args.length;++argi) {
      final URI inURI = new URI(args[argi]);
      System.out.println("\tload source URI:\t" + inURI);
      final Iterable<BurstMap> source = new TrivialReader(inURI,sep,null,true,null, false);
      final long nI = tableControl.loadData(inURI.toString(),now,rand,source, null, handle);
      System.out.println("\tinserted " + nI + " rows");
      nInserted += nI;
    }
    handle.conn.close();
View Full Code Here

    }
    try {
      handle.conn.setAutoCommit(false);
    } catch (Exception ex) {
    }
    final Iterable<BurstMap> source = new TrivialReader(inURI,sep,null,true,null, false);
    String sourceName = inURI.toString();
    final TableControl tableControl = new TableControl(tableName);
    tableControl.scanForDefs(sourceName,source, null);
    tableControl.buildSQLStatements();
    tableControl.createTable(handle);
View Full Code Here

TOP

Related Classes of com.winvector.util.TrivialReader$TrivialIterator

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.