Class OffsetTimeParameter
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.send.parameters.OffsetTimeParameter
-
- All Implemented Interfaces:
java.lang.Cloneable
,ParameterHolder
public class OffsetTimeParameter extends java.lang.Object implements java.lang.Cloneable, ParameterHolder
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
fractionalSeconds
private java.time.OffsetTime
time
-
Fields inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
BINARY_INTRODUCER, QUOTE
-
-
Constructor Summary
Constructors Constructor Description OffsetTimeParameter(java.time.OffsetTime offsetTime, java.util.TimeZone timezone, boolean fractionalSeconds, Options options)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getApproximateTextProtocolLength()
ColumnType
getColumnType()
boolean
isLongData()
boolean
isNullData()
java.lang.String
toString()
void
writeBinary(PacketOutputStream pos)
Write data to socket in binary format.void
writeTo(PacketOutputStream pos)
Write timestamps to outputStream.
-
-
-
Constructor Detail
-
OffsetTimeParameter
public OffsetTimeParameter(java.time.OffsetTime offsetTime, java.util.TimeZone timezone, boolean fractionalSeconds, Options options) throws java.sql.SQLException
Constructor.- Parameters:
offsetTime
- time with offsettimezone
- server session zoneIdfractionalSeconds
- must fractional Seconds be send to database.options
- session options- Throws:
java.sql.SQLException
- if offset cannot be converted to server offset
-
-
Method Detail
-
writeTo
public void writeTo(PacketOutputStream pos) throws java.io.IOException
Write timestamps to outputStream.- Specified by:
writeTo
in interfaceParameterHolder
- Parameters:
pos
- the stream to write to- Throws:
java.io.IOException
- when something goes wrong
-
getApproximateTextProtocolLength
public int getApproximateTextProtocolLength()
- Specified by:
getApproximateTextProtocolLength
in interfaceParameterHolder
-
writeBinary
public void writeBinary(PacketOutputStream pos) throws java.io.IOException
Write data to socket in binary format.- Specified by:
writeBinary
in interfaceParameterHolder
- Parameters:
pos
- socket output stream- Throws:
java.io.IOException
- if socket error occur
-
getColumnType
public ColumnType getColumnType()
- Specified by:
getColumnType
in interfaceParameterHolder
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceParameterHolder
- Overrides:
toString
in classjava.lang.Object
-
isNullData
public boolean isNullData()
- Specified by:
isNullData
in interfaceParameterHolder
-
isLongData
public boolean isLongData()
- Specified by:
isLongData
in interfaceParameterHolder
-
-