Package com.valqueries
Class OrmStatement
java.lang.Object
com.valqueries.NamedSqlStatement
com.valqueries.OrmStatement
- All Implemented Interfaces:
IStatement
- Direct Known Subclasses:
SaveStatement
-
Constructor Summary
ConstructorsConstructorDescriptionUsed bySaveStatement
OrmStatement
(String sqlString) The old way of creating a statement, incurs overhead from using regex to parse the SQL string to replace and extract parameter names.OrmStatement
(String sqlString, Supplier<List<String>> parameterNamesSupplier) The new way of creating a statement, improves performance by using aSetter
to get parameter names instead of parsing them from the SQL string. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
collectionToString
(Collection<?> collection) static String
collectionToString
(Collection<?> collection, String debugInfo) protected String
getJdbcPlaceHolder
(String parameterName) void
Methods inherited from class com.valqueries.NamedSqlStatement
getParametersMatcher, setSqlString
-
Constructor Details
-
OrmStatement
The old way of creating a statement, incurs overhead from using regex to parse the SQL string to replace and extract parameter names.- Parameters:
sqlString
- The SQL string with named parameters such as:name
-
OrmStatement
The new way of creating a statement, improves performance by using aSetter
to get parameter names instead of parsing them from the SQL string.- Parameters:
sqlString
- The SQL string with placeholders, usually?
parameterNamesSupplier
- Provider for the parameter names which would usually be parsed from the SQL string
-
OrmStatement
public OrmStatement()Used bySaveStatement
-
-
Method Details
-
toJdbcQuery
- Overrides:
toJdbcQuery
in classNamedSqlStatement
-
getParameterNames
- Overrides:
getParameterNames
in classNamedSqlStatement
-
getValue
-
getValueNames
-
set
- Specified by:
set
in interfaceIStatement
-
collectionToString
-
collectionToString
-
getJdbcPlaceHolder
- Overrides:
getJdbcPlaceHolder
in classNamedSqlStatement
-