Package com.landawn.abacus.jdbc
Class JdbcUtils
java.lang.Object
com.landawn.abacus.jdbc.JdbcUtils
- Since:
- 0.8
- Author:
- Haiyang Li
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
copy
(Connection sourceConn, String selectSql, int fetchSize, long offset, long count, Connection targetConn, String insertSql, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter, int batchSize, int batchInterval, boolean inParallel) static long
copy
(Connection sourceConn, String selectSql, int fetchSize, Connection targetConn, String insertSql, int batchSize, boolean inParallel) static long
copy
(Connection sourceConn, String selectSql, Connection targetConn, String insertSql) static long
copy
(PreparedStatement selectStmt, long offset, long count, PreparedStatement insertStmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter, int batchSize, int batchInterval, boolean inParallel) static long
copy
(PreparedStatement selectStmt, PreparedStatement insertStmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) static long
copy
(DataSource sourceDataSource, String selectSql, int fetchSize, DataSource targetDataSource, String insertSql, int batchSize, boolean inParallel) static long
copy
(DataSource sourceDataSource, String selectSql, DataSource targetDataSource, String insertSql) static long
copy2
(Connection sourceConn, String selectSql, int fetchSize, long offset, long count, Connection targetConn, String insertSql, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super ResultSet, SQLException> stmtSetter, int batchSize, int batchInterval) static long
copy2
(Connection sourceConn, String selectSql, Connection targetConn, String insertSql) static long
copy2
(PreparedStatement selectStmt, long offset, long count, PreparedStatement insertStmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super ResultSet, SQLException> stmtSetter, int batchSize, int batchInterval) static long
copy2
(PreparedStatement selectStmt, PreparedStatement insertStmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super ResultSet, SQLException> stmtSetter) static long
exportCSV
(File out, Connection conn, String querySQL) Exports the data from database to CVS.static long
exportCSV
(File out, Connection conn, String querySQL, long offset, long count, boolean writeTitle, boolean quoted) Exports the data from database to CVS.static long
exportCSV
(File out, Connection conn, String querySQL, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) Exports the data from database to CVS.static long
exportCSV
(File out, PreparedStatement stmt) Exports the data from database to CVS.static long
exportCSV
(File out, PreparedStatement stmt, long offset, long count, boolean writeTitle, boolean quoted) Exports the data from database to CVS.static long
exportCSV
(File out, PreparedStatement stmt, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) Exports the data from database to CVS.static long
Exports the data from database to CVS.static long
Exports the data from database to CVS.static long
exportCSV
(File out, ResultSet rs, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) Each line in the output file/Writer is an array of JSON String without root bracket.static long
exportCSV
(OutputStream out, ResultSet rs) Exports the data from database to CVS.static long
exportCSV
(OutputStream out, ResultSet rs, long offset, long count, boolean writeTitle, boolean quoted) Exports the data from database to CVS.static long
exportCSV
(OutputStream out, ResultSet rs, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) Exports the data from database to CVS.static long
Exports the data from database to CVS.static long
Exports the data from database to CVS.static long
exportCSV
(Writer out, ResultSet rs, Collection<String> selectColumnNames, long offset, long count, boolean writeTitle, boolean quoted) Exports the data from database to CVS.static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.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) 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) static <E extends Exception>
longimportCSV
(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) static <E extends Exception>
longimportCSV
(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) static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.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) 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) 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) static long
importCSV
(File file, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) static long
importCSV
(File file, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super String[], SQLException> stmtSetter) Imports the data from CSV to database.static long
importCSV
(File file, Connection conn, String insertSQL, List<? extends com.landawn.abacus.type.Type> columnTypeList) static long
importCSV
(File file, Connection conn, String insertSQL, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) Imports the data from CSV to database.static long
importCSV
(File file, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super String[], SQLException> stmtSetter) static long
importCSV
(File file, PreparedStatement stmt, List<? extends com.landawn.abacus.type.Type> columnTypeList) static long
importCSV
(File file, PreparedStatement stmt, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.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) static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.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) static long
importCSV
(InputStream is, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) static long
importCSV
(InputStream is, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super String[], SQLException> stmtSetter) static long
importCSV
(InputStream is, PreparedStatement stmt, List<? extends com.landawn.abacus.type.Type> columnTypeList) static long
importCSV
(InputStream is, PreparedStatement stmt, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.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) static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.static <E extends Exception>
longimportCSV
(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) Imports the data from CSV to database.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) static long
importCSV
(Reader reader, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) static long
importCSV
(Reader reader, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super String[], SQLException> stmtSetter) static long
importCSV
(Reader reader, PreparedStatement stmt, List<? extends com.landawn.abacus.type.Type> columnTypeList) static long
importCSV
(Reader reader, PreparedStatement stmt, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) static <E extends Exception>
intimportData
(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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
to database.static <E extends Exception>
intimportData
(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) Imports the data fromDataSet
to database.static <E extends Exception>
intimportData
(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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
to database.static <E extends Exception>
intimportData
(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) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, int offset, int count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
to database.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) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, int offset, int count, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
to database.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) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, int offset, int count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
to database.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) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, int offset, int count, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, int offset, int count, PreparedStatement stmt, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Connection conn, String insertSQL) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Connection conn, String insertSQL, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, PreparedStatement stmt) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) static int
importData
(com.landawn.abacus.util.DataSet dataset, PreparedStatement stmt, Map<String, ? extends com.landawn.abacus.type.Type> columnTypeMap) Imports the data fromDataSet
to database.static <E extends Exception>
intimportData
(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) Imports the data fromDataSet
to database.static <E extends Exception>
intimportData
(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) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, Connection conn, String insertSQL) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, Connection conn, String insertSQL, int batchSize, int batchInterval) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, PreparedStatement stmt) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, int offset, int count, PreparedStatement stmt, int batchSize, int batchInterval) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, Connection conn, String insertSQL) Imports the data fromDataSet
to database.static int
importData
(com.landawn.abacus.util.DataSet dataset, Collection<String> selectColumnNames, PreparedStatement stmt) Imports the data fromDataSet
to database.static <E extends Exception>
longimportData
(File file, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <E extends Exception>
longimportData
(File file, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) Imports the data from file to database.static <E extends Exception>
longimportData
(File file, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <E extends Exception>
longimportData
(File file, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <E extends Exception>
longimportData
(InputStream is, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <E extends Exception>
longimportData
(InputStream is, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) Imports the data from file to database.static <E extends Exception>
longimportData
(InputStream is, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <E extends Exception>
longimportData
(InputStream is, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <E extends Exception>
longimportData
(Reader reader, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <E extends Exception>
longimportData
(Reader reader, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) Imports the data from file to database.static <E extends Exception>
longimportData
(Reader reader, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <E extends Exception>
longimportData
(Reader reader, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String, Object[], E> func) static <T,
E extends Exception>
longimportData
(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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> stmtSetter) static <T,
E extends Exception>
longimportData
(Iterator<T> iter, long offset, long count, com.landawn.abacus.util.Throwables.Predicate<? super T, E> filter, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> stmtSetter) Imports the data from Iterator to database.static <T> long
importData
(Iterator<T> iter, long offset, long count, Connection conn, String insertSQL, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> stmtSetter) static <T,
E extends Exception>
longimportData
(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) static <T> long
importData
(Iterator<T> iter, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> stmtSetter) static <T,
E extends Exception>
longimportData
(Iterator<T> iter, long offset, long count, PreparedStatement stmt, int batchSize, int batchInterval, com.landawn.abacus.util.Throwables.Function<? super T, Object[], E> func) Imports the data from Iterator to database.static <T> long
importData
(Iterator<T> iter, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> stmtSetter) static <T,
E extends Exception>
longimportData
(Iterator<T> iter, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<? super T, Object[], E> func) static <T> long
importData
(Iterator<T> iter, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> stmtSetter) static <T,
E extends Exception>
longimportData
(Iterator<T> iter, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<? super T, Object[], E> func) static <E extends Exception>
voidparse
(Connection conn, String sql, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser) 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) Parse the ResultSet obtained by executing query with the specified Connection and sql.static <E extends Exception>
voidparse
(Connection conn, String sql, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser) 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) static <E extends Exception>
voidparse
(Connection conn, String sql, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser) parse
(Connection conn, String sql, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) static <E extends Exception>
voidparse
(PreparedStatement stmt, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser) 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) Parse the ResultSet obtained by executing query with the specified PreparedStatement.static <E extends Exception>
voidparse
(PreparedStatement stmt, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser) parse
(PreparedStatement stmt, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) static <E extends Exception>
voidparse
(PreparedStatement stmt, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser) parse
(PreparedStatement stmt, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) static <E extends Exception>
voidparse
(ResultSet rs, long offset, long count, int processThreadNum, int queueSize, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser) 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) Parse the ResultSet.static <E extends Exception>
voidparse
(ResultSet rs, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser) parse
(ResultSet rs, long offset, long count, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete) static <E extends Exception>
voidparse
(ResultSet rs, com.landawn.abacus.util.Throwables.Consumer<Object[], E> rowParser, com.landawn.abacus.util.Throwables.Runnable<E2> onComplete)
-
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 fromDataSet
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 fromDataSet
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 fromDataSet
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 fromDataSet
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, EImports the data fromDataSet
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 exceptionE
- 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.UncheckedSQLExceptionImports the data fromDataSet
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.UncheckedSQLExceptionImports the data fromDataSet
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.UncheckedSQLExceptionImports the data fromDataSet
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, throws com.landawn.abacus.exception.UncheckedSQLException, E? extends com.landawn.abacus.type.Type> columnTypeMap) Imports the data fromDataSet
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 exceptionE
- the e
-
importData
public static int importData(com.landawn.abacus.util.DataSet dataset, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter) Imports the data fromDataSet
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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter) Imports the data fromDataSet
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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter) Imports the data fromDataSet
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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, throws com.landawn.abacus.exception.UncheckedSQLException, E? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
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 exceptionE
- the e
-
importData
public static int importData(com.landawn.abacus.util.DataSet dataset, PreparedStatement stmt) throws com.landawn.abacus.exception.UncheckedSQLException Imports the data fromDataSet
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 fromDataSet
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 fromDataSet
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 fromDataSet
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, EImports the data fromDataSet
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 exceptionE
- 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.UncheckedSQLExceptionImports the data fromDataSet
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.UncheckedSQLExceptionImports the data fromDataSet
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.UncheckedSQLExceptionImports the data fromDataSet
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, throws com.landawn.abacus.exception.UncheckedSQLException, E? extends com.landawn.abacus.type.Type> columnTypeMap) Imports the data fromDataSet
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 exceptionE
- the e
-
importData
public static int importData(com.landawn.abacus.util.DataSet dataset, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter) - 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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter) Imports the data fromDataSet
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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter) Imports the data fromDataSet
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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, throws com.landawn.abacus.exception.UncheckedSQLException, E? super Object[], SQLException> stmtSetter) Imports the data fromDataSet
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 exceptionE
- the e
-
importData
public static <E extends Exception> long importData(File file, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String, Object[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
E
-- Parameters:
file
-conn
-insertSQL
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
E
-- Parameters:
file
-offset
-count
-conn
-insertSQL
-batchSize
-batchInterval
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- the e
-
importData
public static <E extends Exception> long importData(File file, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String, Object[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
E
-- Parameters:
file
-stmt
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) 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 anull
array to skip the line.- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- the e
-
importData
public static <E extends Exception> long importData(InputStream is, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String, Object[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
E
-- Parameters:
is
-conn
-insertSQL
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
E
-- Parameters:
is
-offset
-count
-conn
-insertSQL
-batchSize
-batchInterval
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- the e
-
importData
public static <E extends Exception> long importData(InputStream is, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String, Object[], throws EE> func) - 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) 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 anull
array to skip the line.- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- the e
-
importData
public static <E extends Exception> long importData(Reader reader, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.Function<String, Object[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
E
-- Parameters:
reader
-conn
-insertSQL
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
E
-- Parameters:
reader
-offset
-count
-conn
-insertSQL
-batchSize
-batchInterval
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- the e
-
importData
public static <E extends Exception> long importData(Reader reader, PreparedStatement stmt, com.landawn.abacus.util.Throwables.Function<String, Object[], throws EE> func) - 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) 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 anull
array to skip the line.- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
T
-E
-- Parameters:
iter
-conn
-insertSQL
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) - Type Parameters:
T
-E
-- Parameters:
iter
-offset
-count
-conn
-insertSQL
-batchSize
-batchInterval
-func
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- 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[], throws EE> func) - 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[], throws com.landawn.abacus.exception.UncheckedSQLException, EE> func) 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 anull
array to skip the line.- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- the e
-
importData
public static <T> long importData(Iterator<T> iter, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> 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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> 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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, throws com.landawn.abacus.exception.UncheckedSQLException, E? super T, SQLException> stmtSetter) - Type Parameters:
T
-E
-- Parameters:
iter
-offset
-count
-filter
-conn
-insertSQL
-batchSize
-batchInterval
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptionE
- the e
-
importData
public static <T> long importData(Iterator<T> iter, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> 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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super T, SQLException> 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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, throws com.landawn.abacus.exception.UncheckedSQLException, E? super T, SQLException> stmtSetter) 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 exceptionE
- the e
-
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 exceptioncom.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 exceptioncom.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, EImports 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- 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 exceptioncom.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 exceptioncom.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, EImports 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- 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 exceptioncom.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 exceptioncom.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, EImports 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- 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 exceptioncom.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 exceptioncom.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, EImports 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- 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.UncheckedIOExceptionImports 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 exceptioncom.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 exceptioncom.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, throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E? extends com.landawn.abacus.type.Type> columnTypeMap) - 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- 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 exceptioncom.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 exceptioncom.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, throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E? extends com.landawn.abacus.type.Type> columnTypeMap) 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- 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 exceptioncom.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 exceptioncom.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, throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E? extends com.landawn.abacus.type.Type> columnTypeMap) 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- 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 exceptioncom.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 exceptioncom.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, throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E? extends com.landawn.abacus.type.Type> columnTypeMap) 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- the e
-
importCSV
public static long importCSV(File file, Connection conn, String insertSQL, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super String[], throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOExceptionSQLException> stmtSetter) 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 exceptioncom.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[], throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOExceptionSQLException> stmtSetter) - Parameters:
file
-offset
-count
-conn
-insertSQL
-batchSize
-batchInterval
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptioncom.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, throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E? super String[], SQLException> stmtSetter) - 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- the e
-
importCSV
public static long importCSV(File file, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super String[], throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOExceptionSQLException> stmtSetter) - Parameters:
file
-stmt
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptioncom.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[], throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOExceptionSQLException> stmtSetter) - Parameters:
file
-offset
-count
-stmt
-batchSize
-batchInterval
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptioncom.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, throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E? super String[], SQLException> stmtSetter) 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- the e
-
importCSV
public static long importCSV(InputStream is, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super String[], throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOExceptionSQLException> stmtSetter) - Parameters:
is
-stmt
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptioncom.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[], throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOExceptionSQLException> stmtSetter) - Parameters:
is
-offset
-count
-stmt
-batchSize
-batchInterval
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptioncom.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, throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E? super String[], SQLException> stmtSetter) 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- the e
-
importCSV
public static long importCSV(Reader reader, PreparedStatement stmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super String[], throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOExceptionSQLException> stmtSetter) - Parameters:
reader
-stmt
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptioncom.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[], throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOExceptionSQLException> stmtSetter) - Parameters:
reader
-offset
-count
-stmt
-batchSize
-batchInterval
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exceptioncom.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, throws com.landawn.abacus.exception.UncheckedSQLException, com.landawn.abacus.exception.UncheckedIOException, E? super String[], SQLException> stmtSetter) 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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exceptionE
- 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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.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 exceptioncom.landawn.abacus.exception.UncheckedIOException
- the unchecked IO exception
-
copy
public static long copy(DataSource sourceDataSource, String selectSql, DataSource targetDataSource, String insertSql) throws com.landawn.abacus.exception.UncheckedSQLException - Parameters:
sourceDataSource
-selectSql
-targetDataSource
-insertSql
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exception
-
copy
public static long copy(DataSource sourceDataSource, String selectSql, int fetchSize, DataSource targetDataSource, String insertSql, int batchSize, boolean inParallel) throws com.landawn.abacus.exception.UncheckedSQLException - Parameters:
sourceDataSource
-selectSql
-fetchSize
-targetDataSource
-insertSql
-batchSize
-inParallel
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
-
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, Connection targetConn, String insertSql, int batchSize, boolean inParallel) throws com.landawn.abacus.exception.UncheckedSQLException - Parameters:
sourceConn
-selectSql
-fetchSize
-targetConn
-insertSql
-batchSize
-inParallel
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
-
copy
public static long copy(Connection sourceConn, String selectSql, int fetchSize, long offset, long count, Connection targetConn, String insertSql, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter, int batchSize, int batchInterval, boolean inParallel) - 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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter) - 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, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super Object[], throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter, int batchSize, int batchInterval, boolean inParallel) - 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
-
copy2
public static long copy2(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
-
copy2
public static long copy2(Connection sourceConn, String selectSql, int fetchSize, long offset, long count, Connection targetConn, String insertSql, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super ResultSet, throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter, int batchSize, int batchInterval) - Parameters:
sourceConn
-selectSql
-fetchSize
-offset
-count
-targetConn
-insertSql
-stmtSetter
-batchSize
-batchInterval
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exception
-
copy2
public static long copy2(PreparedStatement selectStmt, PreparedStatement insertStmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super ResultSet, throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter) - Parameters:
selectStmt
-insertStmt
-stmtSetter
-- Returns:
- Throws:
com.landawn.abacus.exception.UncheckedSQLException
- the unchecked SQL exception
-
copy2
public static long copy2(PreparedStatement selectStmt, long offset, long count, PreparedStatement insertStmt, com.landawn.abacus.util.Throwables.BiConsumer<? super PreparedStatement, ? super ResultSet, throws com.landawn.abacus.exception.UncheckedSQLExceptionSQLException> stmtSetter, int batchSize, int batchInterval) - Parameters:
selectStmt
-offset
-count
-insertStmt
-stmtSetter
-batchSize
-batchInterval
-- 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 exceptionE
- 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 exceptionE
- the eE2
- 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 exceptionE
- 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 exceptionE
- the eE2
- 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 exceptionE
- 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, E2Parse 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/recordsqueueSize
- 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 exceptionE
- the eE2
- 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 exceptionE
- 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 exceptionE
- the eE2
- 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 exceptionE
- the eE2
- 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 exceptionE
- 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, E2Parse 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/recordsqueueSize
- 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 exceptionE
- the eE2
- 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 exceptionE
- 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 exceptionE
- the eE2
- 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 exceptionE
- 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 exceptionE
- the eE2
- 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 exceptionE
- 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, E2Parse the ResultSet.- Type Parameters:
E
-E2
-- Parameters:
rs
-offset
-count
-processThreadNum
- new threads started to parse/process the lines/recordsqueueSize
- 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 exceptionE
- the eE2
- the e2
-