Package io.nflow.engine.config.db
Class Db2DatabaseConfiguration.Db2SQLVariants
- java.lang.Object
-
- io.nflow.engine.config.db.Db2DatabaseConfiguration.Db2SQLVariants
-
- All Implemented Interfaces:
SQLVariants
- Enclosing class:
- Db2DatabaseConfiguration
public static class Db2DatabaseConfiguration.Db2SQLVariants extends Object implements SQLVariants
SQL variants optimized for DB2.
-
-
Constructor Summary
Constructors Constructor Description Db2SQLVariants(String dbTimeZoneIdStr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringactionType()Returns SQL representing the action type parameter.StringcastToText()Returns string for casting value to text.StringcurrentTimePlusSeconds(int seconds)Returns SQL representing the current database time plus given amount of seconds.StringforUpdateSkipLocked()DB2 does not support for update skip locked.org.joda.time.DateTimegetDateTime(ResultSet rs, String columnName)ObjectgetTimestamp(ResultSet rs, String columnName)booleanhasUpdateableCTE()Returns false as DB2 does not support updateable CTEs.Stringlimit(String query, long limit)Returns SQL for a query with a limit of results.intlongTextType()Returns the SQL type for long text.StringnextActivationUpdate()voidsetDateTime(PreparedStatement ps, int columnNumber, org.joda.time.DateTime timestamp)ObjecttoTimestampObject(org.joda.time.DateTime timestamp)ObjecttuneTimestampForDb(Object timestamp)booleanuseBatchUpdate()Returns true as DB2 Express-C supports batch updates.StringworkflowStatus()Returns SQL representing the workflow instance status parameter.StringworkflowStatus(WorkflowInstance.WorkflowInstanceStatus status)Returns the SQL representation for given workflow instance status.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.nflow.engine.internal.storage.db.SQLVariants
caseSensitiveLike, dateLtEqDiff, hasUpdateReturning, withUpdateSkipLocked
-
-
-
-
Constructor Detail
-
Db2SQLVariants
public Db2SQLVariants(String dbTimeZoneIdStr)
-
-
Method Detail
-
currentTimePlusSeconds
public String currentTimePlusSeconds(int seconds)
Returns SQL representing the current database time plus given amount of seconds.- Specified by:
currentTimePlusSecondsin interfaceSQLVariants
-
hasUpdateableCTE
public boolean hasUpdateableCTE()
Returns false as DB2 does not support updateable CTEs.- Specified by:
hasUpdateableCTEin interfaceSQLVariants
-
nextActivationUpdate
public String nextActivationUpdate()
- Specified by:
nextActivationUpdatein interfaceSQLVariants
-
workflowStatus
public String workflowStatus(WorkflowInstance.WorkflowInstanceStatus status)
Returns the SQL representation for given workflow instance status.- Specified by:
workflowStatusin interfaceSQLVariants
-
workflowStatus
public String workflowStatus()
Returns SQL representing the workflow instance status parameter.- Specified by:
workflowStatusin interfaceSQLVariants
-
actionType
public String actionType()
Returns SQL representing the action type parameter.- Specified by:
actionTypein interfaceSQLVariants
-
castToText
public String castToText()
Returns string for casting value to text.- Specified by:
castToTextin interfaceSQLVariants
-
forUpdateSkipLocked
public String forUpdateSkipLocked()
DB2 does not support for update skip locked.- Specified by:
forUpdateSkipLockedin interfaceSQLVariants
-
limit
public String limit(String query, long limit)
Returns SQL for a query with a limit of results.- Specified by:
limitin interfaceSQLVariants
-
longTextType
public int longTextType()
Returns the SQL type for long text.- Specified by:
longTextTypein interfaceSQLVariants
-
useBatchUpdate
public boolean useBatchUpdate()
Returns true as DB2 Express-C supports batch updates.- Specified by:
useBatchUpdatein interfaceSQLVariants
-
getTimestamp
public Object getTimestamp(ResultSet rs, String columnName) throws SQLException
- Specified by:
getTimestampin interfaceSQLVariants- Throws:
SQLException
-
getDateTime
public org.joda.time.DateTime getDateTime(ResultSet rs, String columnName) throws SQLException
- Specified by:
getDateTimein interfaceSQLVariants- Throws:
SQLException
-
setDateTime
public void setDateTime(PreparedStatement ps, int columnNumber, org.joda.time.DateTime timestamp) throws SQLException
- Specified by:
setDateTimein interfaceSQLVariants- Throws:
SQLException
-
toTimestampObject
public Object toTimestampObject(org.joda.time.DateTime timestamp)
- Specified by:
toTimestampObjectin interfaceSQLVariants
-
tuneTimestampForDb
public Object tuneTimestampForDb(Object timestamp)
- Specified by:
tuneTimestampForDbin interfaceSQLVariants
-
-