Package io.ebeaninternal.server.persist
Class Binder
- java.lang.Object
-
- io.ebeaninternal.server.persist.Binder
-
-
Constructor Summary
Constructors Constructor Description Binder(TypeManager typeManager, SpiLogManager logManager, int asOfBindCount, boolean asOfStandardsBased, DbExpressionHandler dbExpressionHandler, DataTimeZone dataTimeZone, MultiValueBind multiValueBind)
Set the PreparedStatement with which to bind variables to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(BindParams bindParams, DataBind dataBind, StringBuilder bindLog)
Bind the list of positionedParameters in BindParams.String
bind(BindParams bindParams, PreparedStatement statement, Connection connection)
Bind the parameters to the preparedStatement returning the bind log.void
bind(io.ebeaninternal.server.persist.BindValues bindValues, DataBind dataBind, StringBuilder bindBuf)
Bind the values to the Prepared Statement.Object
bindObject(DataBind dataBind, Object value)
Bind an Object with unknown data type.DataReader
createDataReader(ResultSet resultSet)
DataBind
dataBind(PreparedStatement stmt, Connection connection)
Create and return a DataBind for the statement.int
getAsOfBindCount()
Return the bind count per predicate for 'As Of' query predicates.DbExpressionHandler
getDbExpressionHandler()
Return the DB platform specific expression handler (for JSON and ARRAY types).String
getInExpression(boolean not, List<Object> bindValues)
Return the SQL in clause taking into account Multi-value support.ScalarType<?>
getScalarType(Class<?> clazz)
boolean
isAsOfStandardsBased()
Return true if the 'as of' history support is SQL2011 standards based.boolean
isEnableBindLog()
Return true if bind log is enabled.boolean
isMultiValueSupported(Class<?> cls)
Return true if MultiValue binding is supported for the given type.
-
-
-
Constructor Detail
-
Binder
public Binder(TypeManager typeManager, SpiLogManager logManager, int asOfBindCount, boolean asOfStandardsBased, DbExpressionHandler dbExpressionHandler, DataTimeZone dataTimeZone, MultiValueBind multiValueBind)
Set the PreparedStatement with which to bind variables to.
-
-
Method Detail
-
isEnableBindLog
public boolean isEnableBindLog()
Return true if bind log is enabled.
-
getAsOfBindCount
public int getAsOfBindCount()
Return the bind count per predicate for 'As Of' query predicates.
-
isAsOfStandardsBased
public boolean isAsOfStandardsBased()
Return true if the 'as of' history support is SQL2011 standards based.
-
bind
public void bind(io.ebeaninternal.server.persist.BindValues bindValues, DataBind dataBind, StringBuilder bindBuf) throws SQLException
Bind the values to the Prepared Statement.- Throws:
SQLException
-
bind
public String bind(BindParams bindParams, PreparedStatement statement, Connection connection) throws SQLException
Bind the parameters to the preparedStatement returning the bind log.- Throws:
SQLException
-
bind
public void bind(BindParams bindParams, DataBind dataBind, StringBuilder bindLog) throws SQLException
Bind the list of positionedParameters in BindParams.- Throws:
SQLException
-
isMultiValueSupported
public boolean isMultiValueSupported(Class<?> cls)
Return true if MultiValue binding is supported for the given type.
-
getScalarType
public ScalarType<?> getScalarType(Class<?> clazz)
-
bindObject
public Object bindObject(DataBind dataBind, Object value) throws SQLException
Bind an Object with unknown data type.- Throws:
SQLException
-
getInExpression
public String getInExpression(boolean not, List<Object> bindValues)
Return the SQL in clause taking into account Multi-value support.
-
getDbExpressionHandler
public DbExpressionHandler getDbExpressionHandler()
Return the DB platform specific expression handler (for JSON and ARRAY types).
-
dataBind
public DataBind dataBind(PreparedStatement stmt, Connection connection)
Create and return a DataBind for the statement.
-
createDataReader
public DataReader createDataReader(ResultSet resultSet)
-
-