Class TimestampParameter
java.lang.Object
org.mariadb.jdbc.internal.com.send.parameters.TimestampParameter
- All Implemented Interfaces:
Cloneable,ParameterHolder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final TimeZoneprivate final TimestampFields inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
BINARY_INTRODUCER, QUOTE -
Constructor Summary
ConstructorsConstructorDescriptionTimestampParameter(Timestamp ts, TimeZone timeZone, boolean fractionalSeconds) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionlongbooleanbooleantoString()voidWrite data to socket in binary format.voidWrite timestamps to outputStream.
-
Field Details
-
ts
-
timeZone
-
fractionalSeconds
private final boolean fractionalSeconds
-
-
Constructor Details
-
TimestampParameter
Constructor.- Parameters:
ts- timestampstimeZone- timeZonefractionalSeconds- must fractional Seconds be send to database.
-
-
Method Details
-
writeTo
Write timestamps to outputStream.- Specified by:
writeToin interfaceParameterHolder- Parameters:
pos- the stream to write to- Throws:
IOException- when something goes wrong
-
getApproximateTextProtocolLength
public long getApproximateTextProtocolLength()- Specified by:
getApproximateTextProtocolLengthin interfaceParameterHolder
-
writeBinary
Write data to socket in binary format.- Specified by:
writeBinaryin interfaceParameterHolder- Parameters:
pos- socket output stream- Throws:
IOException- if socket error occur
-
getColumnType
- Specified by:
getColumnTypein interfaceParameterHolder
-
toString
- Specified by:
toStringin interfaceParameterHolder- Overrides:
toStringin classObject
-
isNullData
public boolean isNullData()- Specified by:
isNullDatain interfaceParameterHolder
-
isLongData
public boolean isLongData()- Specified by:
isLongDatain interfaceParameterHolder
-