类 BatchInsert
java.lang.Object
com.gdxsoft.easyweb.datasource.BatchInsert
Batch insert into the table
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getCnn()The database connectionintMax records insert once (defaults 100)intThe max kb of the insert sql (defaults 32k)insertBatch(String insertHeader, List<String> values) Batch insertbooleanWhether is using transcation method (defaults false)voidsetCnn(DataConnection cnn) The database connectionvoidsetMaxInsertCount(int maxInsertCount) Max records insert once (defaults 100)voidsetMaxInsertSizeKilobit(int maxInsertSizeKilobit) The max kb of the insert sql (defaults 32k)voidsetTranscation(boolean transcation) Whether is using transcation method (defaults false)
-
构造器详细资料
-
BatchInsert
Initial class- 参数:
cnn- the data connectiontranscation- is using transcation , rollback data when an error occurs
-
-
方法详细资料
-
insertBatch
Batch insert- 参数:
insertHeader- the insert SQL header, e.g. insert into tb_a(a,b) valuesvalues- the list of values e.g. (0,'a')(1,'b')- 返回:
- the errors
-
getMaxInsertCount
public int getMaxInsertCount()Max records insert once (defaults 100)- 返回:
-
setMaxInsertCount
public void setMaxInsertCount(int maxInsertCount) Max records insert once (defaults 100)- 参数:
maxInsertCount- the max records
-
getMaxInsertSizeKilobit
public int getMaxInsertSizeKilobit()The max kb of the insert sql (defaults 32k)- 返回:
- max kb
-
setMaxInsertSizeKilobit
public void setMaxInsertSizeKilobit(int maxInsertSizeKilobit) The max kb of the insert sql (defaults 32k)- 参数:
maxInsertSizeKilobit- max kb
-
isTranscation
public boolean isTranscation()Whether is using transcation method (defaults false)- 返回:
-
setTranscation
public void setTranscation(boolean transcation) Whether is using transcation method (defaults false)- 参数:
transcation-
-
getCnn
The database connection- 返回:
- connection
-
setCnn
The database connection- 参数:
cnn- connection
-