Class JdbcUtils

java.lang.Object
com.landawn.abacus.jdbc.JdbcUtils

public final class JdbcUtils extends Object
Since:
0.8
Author:
Haiyang Li
See Also:
  • Method Details

    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Connection conn, String insertSQL) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, Connection conn, String insertSQL) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      selectColumnNames -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, Connection conn, String insertSQL) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      selectColumnNames -
      offset -
      count -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, Connection conn, String insertSQL, int batchSize, int batchInterval) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      selectColumnNames -
      offset -
      count -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      batchSize -
      batchInterval -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static <E extends Exception> int importData(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, com.landawn.abacus.util.Throwables.Predicate<? super Object[],E> filter, Connection conn, String insertSQL, int batchSize, int batchInterval) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from DataSet to database.
      Type Parameters:
      E -
      Parameters:
      dataset -
      selectColumnNames -
      offset -
      count -
      filter -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      batchSize -
      batchInterval -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Connection conn, String insertSQL, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, Connection conn, String insertSQL, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      offset -
      count -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, Connection conn, String insertSQL, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      offset -
      count -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static <E extends Exception> int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, com.landawn.abacus.util.Throwables.Predicate<? super Object[],E> filter, Connection conn, String insertSQL, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from DataSet to database.
      Type Parameters:
      E -
      Parameters:
      dataset -
      offset -
      count -
      filter -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Connection conn, String insertSQL, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, Connection conn, String insertSQL, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      offset -
      count -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, Connection conn, String insertSQL, int batchSize, int batchInterval, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      offset -
      count -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static <E extends Exception> int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, com.landawn.abacus.util.Throwables.Predicate<? super Object[],E> filter, Connection conn, String insertSQL, int batchSize, int batchInterval, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from DataSet to database.
      Type Parameters:
      E -
      Parameters:
      dataset -
      offset -
      count -
      filter -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
      
               List columnNameList = new ArrayList<>(dataset.columnNameList());
               columnNameList.retainAll(yourSelectColumnNames);
               String sql = RE.insert(columnNameList).into(tableName).sql();
       
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, PreparedStatement stmt) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, PreparedStatement stmt) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      selectColumnNames -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, PreparedStatement stmt) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      selectColumnNames -
      offset -
      count -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, PreparedStatement stmt, int batchSize, int batchInterval) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      selectColumnNames -
      offset -
      count -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      batchSize -
      batchInterval -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static <E extends Exception> int importData(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, com.landawn.abacus.util.Throwables.Predicate<? super Object[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from DataSet to database.
      Type Parameters:
      E -
      Parameters:
      dataset -
      selectColumnNames -
      offset -
      count -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      batchSize -
      batchInterval -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, PreparedStatement stmt, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, PreparedStatement stmt, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      offset -
      count -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, PreparedStatement stmt, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      offset -
      count -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static <E extends Exception> int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, com.landawn.abacus.util.Throwables.Predicate<? super Object[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from DataSet to database.
      Type Parameters:
      E -
      Parameters:
      dataset -
      offset -
      count -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, PreparedStatement stmt, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException
      Parameters:
      dataset -
      stmt -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, PreparedStatement stmt, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      offset -
      count -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, PreparedStatement stmt, int batchSize, int batchInterval, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException
      Imports the data from DataSet to database.
      Parameters:
      dataset -
      offset -
      count -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • importData

      public static <E extends Exception> int importData(com.landawn.abacus.util.DataSet dataset, int offset, int count, com.landawn.abacus.util.Throwables.Predicate<? super Object[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from DataSet to database.
      Type Parameters:
      E -
      Parameters:
      dataset -
      offset -
      count -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the DataSet.
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(File file, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      file -
      conn -
      insertSQL -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(File file, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      file -
      offset -
      count -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(File file, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      file -
      stmt -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(File file, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from file to database.
      Type Parameters:
      E -
      Parameters:
      file -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      func - convert line to the parameters for record insert. Returns a null array to skip the line.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(InputStream is, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      is -
      conn -
      insertSQL -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(InputStream is, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      is -
      offset -
      count -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(InputStream is, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws E
      Type Parameters:
      E -
      Parameters:
      is -
      stmt -
      func -
      Returns:
      Throws:
      E - the e
    • importData

      public static <E extends Exception> long importData(InputStream is, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from file to database.
      Type Parameters:
      E -
      Parameters:
      is -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      func - convert line to the parameters for record insert. Returns a null array to skip the line.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(Reader reader, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      reader -
      conn -
      insertSQL -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(Reader reader, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      reader -
      offset -
      count -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <E extends Exception> long importData(Reader reader, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws E
      Type Parameters:
      E -
      Parameters:
      reader -
      stmt -
      func -
      Returns:
      Throws:
      E - the e
    • importData

      public static <E extends Exception> long importData(Reader reader, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from file to database.
      Type Parameters:
      E -
      Parameters:
      reader -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      func - convert line to the parameters for record insert. Returns a null array to skip the line.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <T, E extends Exception> long importData(Iterator<T> iter, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<? super T,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      T -
      E -
      Parameters:
      iter -
      conn -
      insertSQL -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <T, E extends Exception> long importData(Iterator<T> iter, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<? super T,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      T -
      E -
      Parameters:
      iter -
      offset -
      count -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      func -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <T, E extends Exception> long importData(Iterator<T> iter, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<? super T,Object[],E> func) throws E
      Type Parameters:
      T -
      E -
      Parameters:
      iter -
      stmt -
      func -
      Returns:
      Throws:
      E - the e
    • importData

      public static <T, E extends Exception> long importData(Iterator<T> iter, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<? super T,Object[],E> func) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from Iterator to database.
      Type Parameters:
      T -
      E -
      Parameters:
      iter -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      func - convert element to the parameters for record insert. Returns a null array to skip the line.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <T> long importData(Iterator<T> iter, Connection conn, String insertSQL, Jdbc.BiParametersSetter<? super PreparedStatement,? super T> stmtSetter)
      Type Parameters:
      T -
      Parameters:
      iter -
      conn -
      insertSQL -
      stmtSetter -
      Returns:
    • importData

      public static <T> long importData(Iterator<T> iter, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, Jdbc.BiParametersSetter<? super PreparedStatement,? super T> stmtSetter)
      Type Parameters:
      T -
      Parameters:
      iter -
      offset -
      count -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
    • importData

      public static <T, E extends Exception> long importData(Iterator<T> iter, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<? super T,E> filter, Connection conn, String insertSQL, int batchSize, int batchInterval, Jdbc.BiParametersSetter<? super PreparedStatement,? super T> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      T -
      E -
      Parameters:
      iter -
      offset -
      count -
      filter -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • importData

      public static <T> long importData(Iterator<T> iter, PreparedStatement stmt, Jdbc.BiParametersSetter<? super PreparedStatement,? super T> stmtSetter)
      Type Parameters:
      T -
      Parameters:
      iter -
      stmt -
      stmtSetter -
      Returns:
    • importData

      public static <T> long importData(Iterator<T> iter, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, Jdbc.BiParametersSetter<? super PreparedStatement,? super T> stmtSetter)
      Type Parameters:
      T -
      Parameters:
      iter -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
    • importData

      public static <T, E extends Exception> long importData(Iterator<T> iter, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<? super T,E> filter, PreparedStatement stmt, int batchSize, int batchInterval, Jdbc.BiParametersSetter<? super PreparedStatement,? super T> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Imports the data from Iterator to database.
      Type Parameters:
      T -
      E -
      Parameters:
      iter -
      offset -
      count -
      filter -
      stmt -
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • exportCSV

      public static long exportCSV(File out, Connection conn, String querySQL) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS. Title will be added at the first line and columns will be quoted.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      conn -
      querySQL -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(File out, Connection conn, String querySQL, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      conn -
      querySQL -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(File out, Connection conn, String querySQL, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      conn -
      querySQL -
      selectColumnNames -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(File out, PreparedStatement stmt) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS. Title will be added at the first line and columns will be quoted.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      stmt -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(File out, PreparedStatement stmt, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      stmt -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(File out, PreparedStatement stmt, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      stmt -
      selectColumnNames -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(File out, ResultSet rs) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS. Title will be added at the first line and columns will be quoted.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(File out, ResultSet rs, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(File out, ResultSet rs, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      selectColumnNames -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(OutputStream out, ResultSet rs) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS. Title will be added at the first line and columns will be quoted.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(OutputStream out, ResultSet rs, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(OutputStream out, ResultSet rs, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      selectColumnNames -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(Writer out, ResultSet rs) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS. Title will be added at the first line and columns will be quoted.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(Writer out, ResultSet rs, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • exportCSV

      public static long exportCSV(Writer out, ResultSet rs, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Exports the data from database to CVS.
      Each line in the output file/Writer is an array of JSON String without root bracket.
      Parameters:
      out -
      rs -
      selectColumnNames -
      offset -
      count -
      writeTitle -
      quoted -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(File file, Connection conn, String insertSQL, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      conn -
      insertSQL -
      columnTypeList -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(File file, long offset, long count, boolean skipTitle, Connection conn, String insertSQL, int batchSize, int batchInterval, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      offset -
      count -
      skipTitle -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      columnTypeList -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(File file, long offset, long count, boolean skipTitle, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, Connection conn, String insertSQL, int batchSize, int batchInterval, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      file -
      offset -
      count -
      skipTitle -
      filter -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      columnTypeList - set the column type to null to skip the column in CSV.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(File file, PreparedStatement stmt, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      stmt -
      columnTypeList -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(File file, long offset, long count, boolean skipTitle, PreparedStatement stmt, int batchSize, int batchInterval, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      offset -
      count -
      skipTitle -
      stmt -
      batchSize -
      batchInterval -
      columnTypeList -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(File file, long offset, long count, boolean skipTitle, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      file -
      offset -
      count -
      skipTitle -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      columnTypeList - set the column type to null to skip the column in CSV.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(InputStream is, PreparedStatement stmt, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      is -
      stmt -
      columnTypeList -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(InputStream is, long offset, long count, boolean skipTitle, PreparedStatement stmt, int batchSize, int batchInterval, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      is -
      offset -
      count -
      skipTitle -
      stmt -
      batchSize -
      batchInterval -
      columnTypeList -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(InputStream is, long offset, long count, boolean skipTitle, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      is -
      offset -
      count -
      skipTitle -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      columnTypeList - set the column type to null to skip the column in CSV.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(Reader reader, PreparedStatement stmt, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      reader -
      stmt -
      columnTypeList -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(Reader reader, long offset, long count, boolean skipTitle, PreparedStatement stmt, int batchSize, int batchInterval, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      reader -
      offset -
      count -
      skipTitle -
      stmt -
      batchSize -
      batchInterval -
      columnTypeList -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(Reader reader, long offset, long count, boolean skipTitle, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, List<? extends com.landawn.abacus.type.Type> columnTypeList) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      reader -
      offset -
      count -
      skipTitle -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      columnTypeList - set the column type to null to skip the column in CSV.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(File file, Connection conn, String insertSQL, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Imports the data from CSV to database.
      Parameters:
      file -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the CSV file.
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(File file, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      offset -
      count -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(File file, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, Connection conn, String insertSQL, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Type Parameters:
      E -
      Parameters:
      file -
      offset -
      count -
      filter -
      conn -
      insertSQL - the column order in the sql must be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(File file, PreparedStatement stmt, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      stmt -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(File file, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(File file, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      file -
      offset -
      count -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(InputStream is, PreparedStatement stmt, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      is -
      stmt -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(InputStream is, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      is -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(InputStream is, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      is -
      offset -
      count -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(Reader reader, PreparedStatement stmt, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      reader -
      stmt -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(Reader reader, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      reader -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(Reader reader, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, Map<String,? extends com.landawn.abacus.type.Type> columnTypeMap) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      reader -
      offset -
      count -
      filter -
      stmt - the column order in the sql must be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      columnTypeMap -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(File file, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Imports the data from CSV to database.
      Parameters:
      file -
      conn -
      insertSQL - the column order in the sql should be consistent with the column order in the CSV file.
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(File file, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      offset -
      count -
      conn -
      insertSQL -
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(File file, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Type Parameters:
      E -
      Parameters:
      file -
      offset -
      count -
      filter -
      conn -
      insertSQL - the column order in the sql should be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(File file, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      stmt -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(File file, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      file -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(File file, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      file -
      offset -
      count -
      filter -
      stmt - the column order in the sql should be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(InputStream is, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      is -
      stmt -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(InputStream is, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      is -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(InputStream is, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      is -
      offset -
      count -
      filter -
      stmt - the column order in the sql should be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • importCSV

      public static long importCSV(Reader reader, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      reader -
      stmt -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static long importCSV(Reader reader, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException
      Parameters:
      reader -
      offset -
      count -
      stmt -
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
    • importCSV

      public static <E extends Exception> long importCSV(Reader reader, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<String[],E> filter, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement,? super String[],SQLException> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E
      Imports the data from CSV to database.
      Type Parameters:
      E -
      Parameters:
      reader -
      offset -
      count -
      filter -
      stmt - the column order in the sql should be consistent with the column order in the CSV file.
      batchSize -
      batchInterval -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      com.landawn.abacus.exception.UncheckedIOException - the unchecked IO exception
      E - the e
    • copy

      public static long copy(Connection sourceConn, String selectSql, Connection targetConn, String insertSql) throws com.landawn.abacus.exception.UncheckedSQLException
      Parameters:
      sourceConn -
      selectSql -
      targetConn -
      insertSql -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • copy

      public static long copy(Connection sourceConn, String selectSql, int fetchSize, long offset, long count, Connection targetConn, String insertSql, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter, int batchSize, int batchInterval, boolean inParallel) throws com.landawn.abacus.exception.UncheckedSQLException
      Parameters:
      sourceConn -
      selectSql -
      fetchSize -
      offset -
      count -
      targetConn -
      insertSql -
      stmtSetter -
      batchSize -
      batchInterval -
      inParallel - do the read and write in separated threads.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • copy

      public static long copy(PreparedStatement selectStmt, PreparedStatement insertStmt, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter) throws com.landawn.abacus.exception.UncheckedSQLException
      Parameters:
      selectStmt -
      insertStmt -
      stmtSetter -
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • copy

      public static long copy(PreparedStatement selectStmt, long offset, long count, PreparedStatement insertStmt, Jdbc.BiParametersSetter<? super PreparedStatement,? super Object[]> stmtSetter, int batchSize, int batchInterval, boolean inParallel) throws com.landawn.abacus.exception.UncheckedSQLException
      Parameters:
      selectStmt -
      offset -
      count -
      insertStmt -
      stmtSetter -
      batchSize -
      batchInterval -
      inParallel - do the read and write in separated threads.
      Returns:
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
    • parse

      public static <E extends Exception> void parse(Connection conn, String sql, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      conn -
      sql -
      rowParser -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(Connection conn, String sql, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Type Parameters:
      E -
      E2 -
      Parameters:
      conn -
      sql -
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2
    • parse

      public static <E extends Exception> void parse(Connection conn, String sql, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      conn -
      sql -
      offset -
      count -
      rowParser -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(Connection conn, String sql, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Type Parameters:
      E -
      E2 -
      Parameters:
      conn -
      sql -
      offset -
      count -
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2
    • parse

      public static <E extends Exception> void parse(Connection conn, String sql, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      conn -
      sql -
      offset -
      count -
      processThreadNum -
      queueSize -
      rowParser -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(Connection conn, String sql, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Parse the ResultSet obtained by executing query with the specified Connection and sql.
      Type Parameters:
      E -
      E2 -
      Parameters:
      conn -
      sql -
      offset -
      count -
      processThreadNum - new threads started to parse/process the lines/records
      queueSize - size of queue to save the processing records/lines loaded from source data. Default size is 1024.
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2
    • parse

      public static <E extends Exception> void parse(PreparedStatement stmt, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      stmt -
      rowParser -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(PreparedStatement stmt, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Type Parameters:
      E -
      E2 -
      Parameters:
      stmt -
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2
    • parse

      public static <E extends Exception> void parse(PreparedStatement stmt, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws E
      Type Parameters:
      E -
      Parameters:
      stmt -
      offset -
      count -
      rowParser -
      Throws:
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(PreparedStatement stmt, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Type Parameters:
      E -
      E2 -
      Parameters:
      stmt -
      offset -
      count -
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2
    • parse

      public static <E extends Exception> void parse(PreparedStatement stmt, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      stmt -
      offset -
      count -
      processThreadNum -
      queueSize -
      rowParser -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(PreparedStatement stmt, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Parse the ResultSet obtained by executing query with the specified PreparedStatement.
      Type Parameters:
      E -
      E2 -
      Parameters:
      stmt -
      offset -
      count -
      processThreadNum - new threads started to parse/process the lines/records
      queueSize - size of queue to save the processing records/lines loaded from source data. Default size is 1024.
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2
    • parse

      public static <E extends Exception> void parse(ResultSet rs, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      rs -
      rowParser -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(ResultSet rs, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Type Parameters:
      E -
      E2 -
      Parameters:
      rs -
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2
    • parse

      public static <E extends Exception> void parse(ResultSet rs, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      rs -
      offset -
      count -
      rowParser -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(ResultSet rs, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Type Parameters:
      E -
      E2 -
      Parameters:
      rs -
      offset -
      count -
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2
    • parse

      public static <E extends Exception> void parse(ResultSet rs, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser) throws com.landawn.abacus.exception.UncheckedSQLException, E
      Type Parameters:
      E -
      Parameters:
      rs -
      offset -
      count -
      processThreadNum -
      queueSize -
      rowParser -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
    • parse

      public static <E extends Exception, E2 extends Exception> void parse(ResultSet rs, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[],E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) throws com.landawn.abacus.exception.UncheckedSQLException, E, E2
      Parse the ResultSet.
      Type Parameters:
      E -
      E2 -
      Parameters:
      rs -
      offset -
      count -
      processThreadNum - new threads started to parse/process the lines/records
      queueSize - size of queue to save the processing records/lines loaded from source data. Default size is 1024.
      rowParser -
      onComplete -
      Throws:
      com.landawn.abacus.exception.UncheckedSQLException - the unchecked SQL exception
      E - the e
      E2 - the e2