format the code
This commit is contained in:
parent
76f82481f5
commit
2add95e9fe
|
@ -33,9 +33,9 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* insert or import sql template pattern, the template are the following:
|
||||
*
|
||||
* <p>
|
||||
* insert/import into tableName [(field1, field2, ...)] [using stables tags(?, ?, ...) ] values(?, ?, ...) (?, ?, ...)
|
||||
*
|
||||
* <p>
|
||||
* we split it to three part:
|
||||
* 1. prefix, insert/import
|
||||
* 2. middle, tableName [(field1, field2, ...)] [using stables tags(?, ?, ...) ]
|
||||
|
@ -91,6 +91,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* parse the init param according the sql param
|
||||
*
|
||||
* @param sql
|
||||
*/
|
||||
private void parsePreparedParam(String sql) throws SQLException {
|
||||
|
@ -140,6 +141,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* generate the default param value list
|
||||
*
|
||||
* @param paramSize
|
||||
* @return
|
||||
*/
|
||||
|
@ -157,6 +159,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* calculate the placeholder num
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
|
@ -175,6 +178,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* set current row params
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2, ...
|
||||
* @param x the parameter value
|
||||
*/
|
||||
|
@ -202,7 +206,7 @@ public class SavedPreparedStatement {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.valueListSize != 0 && parameterIndex >= this.middleParamSize && parameterIndex < (this.middleParamSize + this.valueListSize)){
|
||||
if (this.valueListSize != 0 && parameterIndex >= this.middleParamSize && parameterIndex < paramSize) {
|
||||
|
||||
this.initPreparedParam.setValueParam(parameterIndex - this.middleParamSize, x);
|
||||
return;
|
||||
|
@ -231,6 +235,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* execute the sql with batch sql
|
||||
*
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
|
@ -262,6 +267,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* generate the batch sql
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String generateExecuteSql() {
|
||||
|
@ -327,6 +333,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* replace the middle and value part
|
||||
*
|
||||
* @param tsdbPreparedParam
|
||||
* @return
|
||||
*/
|
||||
|
@ -348,6 +355,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* replace the placeholder of the template with TSDBPreparedParam list
|
||||
*
|
||||
* @param template
|
||||
* @param sqlParamList
|
||||
* @return
|
||||
|
@ -374,6 +382,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* replace the placeholder of the template with paramList
|
||||
*
|
||||
* @param template
|
||||
* @param paramList
|
||||
* @return
|
||||
|
@ -402,6 +411,7 @@ public class SavedPreparedStatement {
|
|||
|
||||
/**
|
||||
* get the string of param object
|
||||
*
|
||||
* @param paramObj
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -64,6 +64,7 @@ public class TSDBPreparedStatement extends TSDBStatement implements PreparedStat
|
|||
|
||||
/**
|
||||
* if the precompiled sql is insert or import
|
||||
*
|
||||
* @param sql
|
||||
* @return
|
||||
*/
|
||||
|
@ -153,6 +154,7 @@ public class TSDBPreparedStatement extends TSDBStatement implements PreparedStat
|
|||
|
||||
/**
|
||||
* Populate parameters into prepared sql statements
|
||||
*
|
||||
* @return a string of the native sql statement for TSDB
|
||||
*/
|
||||
private String getNativeSql() {
|
||||
|
|
Loading…
Reference in New Issue