Class TextRowProtocol
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.RowProtocol
-
- org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.TextRowProtocol
-
public class TextRowProtocol extends RowProtocol
-
-
Field Summary
-
Fields inherited from class org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.RowProtocol
BIT_LAST_FIELD_NOT_NULL, BIT_LAST_FIELD_NULL, BIT_LAST_ZERO_DATE, buf, index, isIntegerRegex, lastValueNull, length, maxFieldSize, NULL_LENGTH, options, pos, TEXT_LOCAL_DATE_TIME, TEXT_OFFSET_DATE_TIME, TEXT_ZONED_DATE_TIME, TINYINT1_IS_BIT, YEAR_IS_DATE_TYPE
-
-
Constructor Summary
Constructors Constructor Description TextRowProtocol(int maxFieldSize, Options options)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigDecimalgetInternalBigDecimal(ColumnDefinition columnInfo)Get BigDecimal from raw text format.java.math.BigIntegergetInternalBigInteger(ColumnDefinition columnInfo)Get BigInteger format from raw text format.booleangetInternalBoolean(ColumnDefinition columnInfo)Get boolean from raw text format.bytegetInternalByte(ColumnDefinition columnInfo)Get byte from raw text format.java.sql.DategetInternalDate(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone)Get date from raw text format.doublegetInternalDouble(ColumnDefinition columnInfo)Get double from raw text format.floatgetInternalFloat(ColumnDefinition columnInfo)Get float from raw text format.intgetInternalInt(ColumnDefinition columnInfo)Get int from raw text format.java.time.LocalDategetInternalLocalDate(ColumnDefinition columnInfo, java.util.TimeZone timeZone)Get LocalDate format from raw text format.java.time.LocalTimegetInternalLocalTime(ColumnDefinition columnInfo, java.util.TimeZone timeZone)Get LocalTime format from raw text format.longgetInternalLong(ColumnDefinition columnInfo)Get long from raw text format.java.lang.ObjectgetInternalObject(ColumnDefinition columnInfo, java.util.TimeZone timeZone)Get Object from raw text format.java.time.OffsetTimegetInternalOffsetTime(ColumnDefinition columnInfo, java.util.TimeZone timeZone)Get OffsetTime format from raw text format.shortgetInternalShort(ColumnDefinition columnInfo)Get short from raw text format.java.lang.StringgetInternalString(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone)Get String from raw text format.java.sql.TimegetInternalTime(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone)Get time from raw text format.java.sql.TimestampgetInternalTimestamp(ColumnDefinition columnInfo, java.util.Calendar userCalendar, java.util.TimeZone timeZone)Get timestamp from raw text format.java.lang.StringgetInternalTimeString(ColumnDefinition columnInfo)Get Time in string format from raw text format.java.time.ZonedDateTimegetInternalZonedDateTime(ColumnDefinition columnInfo, java.lang.Class clazz, java.util.TimeZone timeZone)Get ZonedDateTime format from raw text format.booleanisBinaryEncoded()Indicate if data is binary encoded.voidsetPosition(int newIndex)Set length and pos indicator to asked index.-
Methods inherited from class org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.RowProtocol
extractNanos, getInternalMediumInt, getInternalSmallInt, getInternalTinyInt, getLengthMaxFieldSize, getMaxFieldSize, lastValueWasNull, parseBit, rangeCheck, rangeCheck, resetRow, wasNull, zeroFillingIfNeeded
-
-
-
-
Constructor Detail
-
TextRowProtocol
public TextRowProtocol(int maxFieldSize, Options options)Constructor.- Parameters:
maxFieldSize- max field sizeoptions- connection options
-
-
Method Detail
-
setPosition
public void setPosition(int newIndex)
Set length and pos indicator to asked index.- Specified by:
setPositionin classRowProtocol- Parameters:
newIndex- index (0 is first).
-
getInternalString
public java.lang.String getInternalString(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
Get String from raw text format.- Specified by:
getInternalStringin classRowProtocol- Parameters:
columnInfo- column informationcal- calendartimeZone- time zone- Returns:
- String value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalInt
public int getInternalInt(ColumnDefinition columnInfo) throws java.sql.SQLException
Get int from raw text format.- Specified by:
getInternalIntin classRowProtocol- Parameters:
columnInfo- column information- Returns:
- int value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion or not in Integer range
-
getInternalLong
public long getInternalLong(ColumnDefinition columnInfo) throws java.sql.SQLException
Get long from raw text format.- Specified by:
getInternalLongin classRowProtocol- Parameters:
columnInfo- column information- Returns:
- long value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion or not in Long range (unsigned)
-
getInternalFloat
public float getInternalFloat(ColumnDefinition columnInfo) throws java.sql.SQLException
Get float from raw text format.- Specified by:
getInternalFloatin classRowProtocol- Parameters:
columnInfo- column information- Returns:
- float value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion or not in Float range
-
getInternalDouble
public double getInternalDouble(ColumnDefinition columnInfo) throws java.sql.SQLException
Get double from raw text format.- Specified by:
getInternalDoublein classRowProtocol- Parameters:
columnInfo- column information- Returns:
- double value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion or not in Double range (unsigned)
-
getInternalBigDecimal
public java.math.BigDecimal getInternalBigDecimal(ColumnDefinition columnInfo)
Get BigDecimal from raw text format.- Specified by:
getInternalBigDecimalin classRowProtocol- Parameters:
columnInfo- column information- Returns:
- BigDecimal value
-
getInternalDate
public java.sql.Date getInternalDate(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
Get date from raw text format.- Specified by:
getInternalDatein classRowProtocol- Parameters:
columnInfo- column informationcal- calendartimeZone- time zone- Returns:
- date value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalTime
public java.sql.Time getInternalTime(ColumnDefinition columnInfo, java.util.Calendar cal, java.util.TimeZone timeZone) throws java.sql.SQLException
Get time from raw text format.- Specified by:
getInternalTimein classRowProtocol- Parameters:
columnInfo- column informationcal- calendartimeZone- time zone- Returns:
- time value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalTimestamp
public java.sql.Timestamp getInternalTimestamp(ColumnDefinition columnInfo, java.util.Calendar userCalendar, java.util.TimeZone timeZone) throws java.sql.SQLException
Get timestamp from raw text format.- Specified by:
getInternalTimestampin classRowProtocol- Parameters:
columnInfo- column informationuserCalendar- calendartimeZone- time zone- Returns:
- timestamp value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalObject
public java.lang.Object getInternalObject(ColumnDefinition columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
Get Object from raw text format.- Specified by:
getInternalObjectin classRowProtocol- Parameters:
columnInfo- column informationtimeZone- time zone- Returns:
- Object value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalBoolean
public boolean getInternalBoolean(ColumnDefinition columnInfo)
Get boolean from raw text format.- Specified by:
getInternalBooleanin classRowProtocol- Parameters:
columnInfo- column information- Returns:
- boolean value
-
getInternalByte
public byte getInternalByte(ColumnDefinition columnInfo) throws java.sql.SQLException
Get byte from raw text format.- Specified by:
getInternalBytein classRowProtocol- Parameters:
columnInfo- column information- Returns:
- byte value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalShort
public short getInternalShort(ColumnDefinition columnInfo) throws java.sql.SQLException
Get short from raw text format.- Specified by:
getInternalShortin classRowProtocol- Parameters:
columnInfo- column information- Returns:
- short value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion or value is not in Short range
-
getInternalTimeString
public java.lang.String getInternalTimeString(ColumnDefinition columnInfo)
Get Time in string format from raw text format.- Specified by:
getInternalTimeStringin classRowProtocol- Parameters:
columnInfo- column information- Returns:
- String representation of time
-
getInternalBigInteger
public java.math.BigInteger getInternalBigInteger(ColumnDefinition columnInfo)
Get BigInteger format from raw text format.- Specified by:
getInternalBigIntegerin classRowProtocol- Parameters:
columnInfo- column information- Returns:
- BigInteger value
-
getInternalZonedDateTime
public java.time.ZonedDateTime getInternalZonedDateTime(ColumnDefinition columnInfo, java.lang.Class clazz, java.util.TimeZone timeZone) throws java.sql.SQLException
Get ZonedDateTime format from raw text format.- Specified by:
getInternalZonedDateTimein classRowProtocol- Parameters:
columnInfo- column informationclazz- class for loggingtimeZone- time zone- Returns:
- ZonedDateTime value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalOffsetTime
public java.time.OffsetTime getInternalOffsetTime(ColumnDefinition columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
Get OffsetTime format from raw text format.- Specified by:
getInternalOffsetTimein classRowProtocol- Parameters:
columnInfo- column informationtimeZone- time zone- Returns:
- OffsetTime value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalLocalTime
public java.time.LocalTime getInternalLocalTime(ColumnDefinition columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
Get LocalTime format from raw text format.- Specified by:
getInternalLocalTimein classRowProtocol- Parameters:
columnInfo- column informationtimeZone- time zone- Returns:
- LocalTime value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
getInternalLocalDate
public java.time.LocalDate getInternalLocalDate(ColumnDefinition columnInfo, java.util.TimeZone timeZone) throws java.sql.SQLException
Get LocalDate format from raw text format.- Specified by:
getInternalLocalDatein classRowProtocol- Parameters:
columnInfo- column informationtimeZone- time zone- Returns:
- LocalDate value
- Throws:
java.sql.SQLException- if column type doesn't permit conversion
-
isBinaryEncoded
public boolean isBinaryEncoded()
Indicate if data is binary encoded.- Specified by:
isBinaryEncodedin classRowProtocol- Returns:
- always false.
-
-