Package io.debezium.connector.sqlserver
Enum Class SourceTimestampMode
- All Implemented Interfaces:
EnumeratedValue,Serializable,Comparable<SourceTimestampMode>,Constable
Strategy for populating the source.ts_ms field in change events.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis mode (default) will set the source timestamp field (ts_ms) of when the record was committed in the database. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static SourceTimestampModestatic SourceTimestampModegetResultColumnNames(ResultSetMetaData rsmd, int columnDataOffset) Returns the names of the data columns returned by theGET_ALL_CHANGES_FOR_TABLEquery.protected abstract InstantgetTimestamp(Clock clock, ResultSet resultSet) Returns the timestamp to be put in the source metadata of the event depending on the mode.getValue()protected abstract StringReturns the SQL fragment to be embedded into theGET_ALL_CHANGES_FOR_TABLEquery depending on the mode.static SourceTimestampModeReturns the enum constant of this class with the specified name.static SourceTimestampMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMMIT
This mode (default) will set the source timestamp field (ts_ms) of when the record was committed in the database.
-
-
Field Details
-
value
-
-
Constructor Details
-
SourceTimestampMode
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
- Specified by:
getValuein interfaceEnumeratedValue
-
getTimestamp
Returns the timestamp to be put in the source metadata of the event depending on the mode.- Parameters:
clock- System clock to source processing time fromresultSet- Result set representing the CDC event and its commit timestamp, if required by the mode- Throws:
SQLException
-
lsnTimestampSelectStatement
Returns the SQL fragment to be embedded into theGET_ALL_CHANGES_FOR_TABLEquery depending on the mode. -
getResultColumnNames
protected List<String> getResultColumnNames(ResultSetMetaData rsmd, int columnDataOffset) throws SQLException Returns the names of the data columns returned by theGET_ALL_CHANGES_FOR_TABLEquery.- Parameters:
rsmd- Result set metadatacolumnDataOffset- Offset of the first data column in the result set- Throws:
SQLException
-
getDefaultMode
-
fromMode
-