Class DateParameter
java.lang.Object
org.mariadb.jdbc.internal.com.send.parameters.DateParameter
- All Implemented Interfaces:
Cloneable
,ParameterHolder
-
Field Summary
FieldsFields inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
BINARY_INTRODUCER, QUOTE
-
Constructor Summary
ConstructorsConstructorDescriptionDateParameter
(Date date, TimeZone timeZone, Options options) Represents a date, constructed with time in millis since epoch. -
Method Summary
Modifier and TypeMethodDescriptionboolean
private byte[]
int
boolean
toString()
void
Write data to socket in binary format.void
Write to server OutputStream in text protocol.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.mariadb.jdbc.internal.com.send.parameters.ParameterHolder
writeLongData
-
Field Details
-
date
-
timeZone
-
options
-
-
Constructor Details
-
DateParameter
Represents a date, constructed with time in millis since epoch.- Parameters:
date
- the datetimeZone
- timezone to useoptions
- jdbc options
-
-
Method Details
-
writeTo
Write to server OutputStream in text protocol.- Specified by:
writeTo
in interfaceParameterHolder
- Parameters:
os
- output buffer- Throws:
IOException
- when something goes wrong
-
dateByteFormat
private byte[] dateByteFormat() -
getApproximateTextProtocolLength
public int getApproximateTextProtocolLength()- Specified by:
getApproximateTextProtocolLength
in interfaceParameterHolder
-
writeBinary
Write data to socket in binary format.- Specified by:
writeBinary
in interfaceParameterHolder
- Parameters:
pos
- socket output stream- Throws:
IOException
- if socket error occur
-
getColumnType
- Specified by:
getColumnType
in interfaceParameterHolder
-
toString
- Specified by:
toString
in interfaceParameterHolder
- Overrides:
toString
in classObject
-
isNullData
public boolean isNullData()- Specified by:
isNullData
in interfaceParameterHolder
-
canBeLongData
public boolean canBeLongData()- Specified by:
canBeLongData
in interfaceParameterHolder
-