Class RowProtocol
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.RowProtocol
-
- Direct Known Subclasses:
BinaryRowProtocol,TextRowProtocol
public abstract class RowProtocol extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intBIT_LAST_FIELD_NOT_NULLstatic intBIT_LAST_FIELD_NULLstatic intBIT_LAST_ZERO_DATEbyte[]bufprotected intindexstatic java.util.regex.PatternisIntegerRegexintlastValueNullintlengthprotected intmaxFieldSizeprotected static intNULL_LENGTHprotected Optionsoptionsintposstatic java.time.format.DateTimeFormatterTEXT_LOCAL_DATE_TIMEstatic java.time.format.DateTimeFormatterTEXT_OFFSET_DATE_TIMEstatic java.time.format.DateTimeFormatterTEXT_ZONED_DATE_TIMEstatic intTINYINT1_IS_BITstatic intYEAR_IS_DATE_TYPE
-
Constructor Summary
Constructors Constructor Description RowProtocol(int maxFieldSize, Options options)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected intextractNanos(java.lang.String timestring)abstract java.math.BigDecimalgetInternalBigDecimal(ColumnDefinition columnInfo)abstract java.math.BigIntegergetInternalBigInteger(ColumnDefinition columnInfo)abstract booleangetInternalBoolean(ColumnDefinition columnInfo)abstract bytegetInternalByte(ColumnDefinition columnInfo)abstract java.sql.DategetInternalDate(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone)abstract doublegetInternalDouble(ColumnDefinition columnInfo)abstract floatgetInternalFloat(ColumnDefinition columnInfo)abstract intgetInternalInt(ColumnDefinition columnInfo)abstract java.time.LocalDategetInternalLocalDate(ColumnDefinition columnInfo, java.util.TimeZone timeZone)abstract java.time.LocalTimegetInternalLocalTime(ColumnDefinition columnInfo, java.util.TimeZone timeZone)abstract longgetInternalLong(ColumnDefinition columnInfo)protected longgetInternalMediumInt(ColumnDefinition columnInfo)abstract java.lang.ObjectgetInternalObject(ColumnDefinition columnInfo, java.util.TimeZone timeZone)abstract java.time.OffsetTimegetInternalOffsetTime(ColumnDefinition columnInfo, java.util.TimeZone timeZone)abstract shortgetInternalShort(ColumnDefinition columnInfo)protected intgetInternalSmallInt(ColumnDefinition columnInfo)abstract java.lang.StringgetInternalString(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone)abstract java.sql.TimegetInternalTime(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone)abstract java.sql.TimestampgetInternalTimestamp(ColumnDefinition columnInfo, java.util.Calendar userCalendar, java.util.TimeZone timeZone)abstract java.lang.StringgetInternalTimeString(ColumnDefinition columnInfo)protected intgetInternalTinyInt(ColumnDefinition columnInfo)abstract java.time.ZonedDateTimegetInternalZonedDateTime(ColumnDefinition columnInfo, java.lang.Class clazz, java.util.TimeZone timeZone)intgetLengthMaxFieldSize()intgetMaxFieldSize()abstract booleanisBinaryEncoded()booleanlastValueWasNull()protected longparseBit()protected voidrangeCheck(java.lang.Object className, long minValue, long maxValue, long value, ColumnDefinition columnInfo)protected voidrangeCheck(java.lang.Object className, long minValue, long maxValue, java.math.BigDecimal value, ColumnDefinition columnInfo)voidresetRow(byte[] buf)abstract voidsetPosition(int position)booleanwasNull()Reports whether the last column read had a value of Null.protected java.lang.StringzeroFillingIfNeeded(java.lang.String value, ColumnDefinition columnDefinition)
-
-
-
Field Detail
-
BIT_LAST_FIELD_NOT_NULL
public static final int BIT_LAST_FIELD_NOT_NULL
- See Also:
- Constant Field Values
-
BIT_LAST_FIELD_NULL
public static final int BIT_LAST_FIELD_NULL
- See Also:
- Constant Field Values
-
BIT_LAST_ZERO_DATE
public static final int BIT_LAST_ZERO_DATE
- See Also:
- Constant Field Values
-
TINYINT1_IS_BIT
public static final int TINYINT1_IS_BIT
- See Also:
- Constant Field Values
-
YEAR_IS_DATE_TYPE
public static final int YEAR_IS_DATE_TYPE
- See Also:
- Constant Field Values
-
TEXT_LOCAL_DATE_TIME
public static final java.time.format.DateTimeFormatter TEXT_LOCAL_DATE_TIME
-
TEXT_OFFSET_DATE_TIME
public static final java.time.format.DateTimeFormatter TEXT_OFFSET_DATE_TIME
-
TEXT_ZONED_DATE_TIME
public static final java.time.format.DateTimeFormatter TEXT_ZONED_DATE_TIME
-
isIntegerRegex
public static final java.util.regex.Pattern isIntegerRegex
-
NULL_LENGTH
protected static final int NULL_LENGTH
- See Also:
- Constant Field Values
-
maxFieldSize
protected final int maxFieldSize
-
options
protected final Options options
-
lastValueNull
public int lastValueNull
-
buf
public byte[] buf
-
pos
public int pos
-
length
public int length
-
index
protected int index
-
-
Constructor Detail
-
RowProtocol
public RowProtocol(int maxFieldSize, Options options)
-
-
Method Detail
-
resetRow
public void resetRow(byte[] buf)
-
setPosition
public abstract void setPosition(int position)
-
getLengthMaxFieldSize
public int getLengthMaxFieldSize()
-
getMaxFieldSize
public int getMaxFieldSize()
-
getInternalString
public abstract java.lang.String getInternalString(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalInt
public abstract int getInternalInt(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalLong
public abstract long getInternalLong(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalFloat
public abstract float getInternalFloat(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalDouble
public abstract double getInternalDouble(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalBigDecimal
public abstract java.math.BigDecimal getInternalBigDecimal(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalDate
public abstract java.sql.Date getInternalDate(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalTime
public abstract java.sql.Time getInternalTime(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalTimestamp
public abstract java.sql.Timestamp getInternalTimestamp(ColumnDefinition columnInfo, java.util.Calendar userCalendar, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalObject
public abstract java.lang.Object getInternalObject(ColumnDefinition columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalBoolean
public abstract boolean getInternalBoolean(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalByte
public abstract byte getInternalByte(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalShort
public abstract short getInternalShort(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalTimeString
public abstract java.lang.String getInternalTimeString(ColumnDefinition columnInfo)
-
getInternalBigInteger
public abstract java.math.BigInteger getInternalBigInteger(ColumnDefinition columnInfo) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalZonedDateTime
public abstract java.time.ZonedDateTime getInternalZonedDateTime(ColumnDefinition columnInfo, java.lang.Class clazz, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalOffsetTime
public abstract java.time.OffsetTime getInternalOffsetTime(ColumnDefinition columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalLocalTime
public abstract java.time.LocalTime getInternalLocalTime(ColumnDefinition columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInternalLocalDate
public abstract java.time.LocalDate getInternalLocalDate(ColumnDefinition columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
isBinaryEncoded
public abstract boolean isBinaryEncoded()
-
lastValueWasNull
public boolean lastValueWasNull()
-
zeroFillingIfNeeded
protected java.lang.String zeroFillingIfNeeded(java.lang.String value, ColumnDefinition columnDefinition)
-
getInternalTinyInt
protected int getInternalTinyInt(ColumnDefinition columnInfo)
-
parseBit
protected long parseBit()
-
getInternalSmallInt
protected int getInternalSmallInt(ColumnDefinition columnInfo)
-
getInternalMediumInt
protected long getInternalMediumInt(ColumnDefinition columnInfo)
-
rangeCheck
protected void rangeCheck(java.lang.Object className, long minValue, long maxValue, java.math.BigDecimal value, ColumnDefinition columnInfo) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
rangeCheck
protected void rangeCheck(java.lang.Object className, long minValue, long maxValue, long value, ColumnDefinition columnInfo) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
extractNanos
protected int extractNanos(java.lang.String timestring) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
wasNull
public boolean wasNull()
Reports whether the last column read had a value of Null. Note that you must first call one of the getter methods on a column to try to read its value and then call the method wasNull to see if the value read was Null.- Returns:
- true true if the last column value read was null and false otherwise
-
-