Package org.mariadb.jdbc.codec
Class RowDecoder
java.lang.Object
org.mariadb.jdbc.codec.RowDecoder
- Direct Known Subclasses:
BinaryRowDecoder
,TextRowDecoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int
protected final ColumnDefinitionPacket[]
private final Configuration
protected int
protected int
protected static final int
protected final ReadableByteBuf
-
Constructor Summary
ConstructorsConstructorDescriptionRowDecoder
(int columnCount, ColumnDefinitionPacket[] columns, Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkIndexAndSetPosition
(int index) abstract <T> T
abstract boolean
abstract byte
abstract double
abstract float
abstract int
abstract long
abstract short
boolean
getBooleanValue
(int index) byte
getByteValue
(int index) double
getDoubleValue
(int index) float
getFloatValue
(int index) int
int
getIntValue
(int index) long
getLongValue
(int index) short
getShortValue
(int index) <T> T
<T> T
Get value.<T> T
abstract void
setPosition
(int position) void
setRow
(byte[] buf) abstract boolean
wasNull()
-
Field Details
-
NULL_LENGTH
protected static final int NULL_LENGTH- See Also:
-
conf
-
readBuf
-
columns
-
length
protected int length -
index
protected int index -
columnCount
protected final int columnCount -
mapper
-
-
Constructor Details
-
RowDecoder
-
-
Method Details
-
setRow
public void setRow(byte[] buf) -
setPosition
public abstract void setPosition(int position) -
decode
- Throws:
SQLException
-
decodeByte
- Throws:
SQLException
-
decodeBoolean
- Throws:
SQLException
-
decodeShort
- Throws:
SQLException
-
decodeInt
- Throws:
SQLException
-
decodeLong
- Throws:
SQLException
-
decodeFloat
- Throws:
SQLException
-
decodeDouble
- Throws:
SQLException
-
getValue
- Throws:
SQLException
-
wasNull
public abstract boolean wasNull() -
checkIndexAndSetPosition
- Throws:
SQLException
-
getValue
Get value.- Parameters:
index
- REAL index (0 = first)codec
- codec- Returns:
- value
- Throws:
SQLException
- if cannot decode value
-
getByteValue
- Throws:
SQLException
-
getBooleanValue
- Throws:
SQLException
-
getShortValue
- Throws:
SQLException
-
getIntValue
- Throws:
SQLException
-
getLongValue
- Throws:
SQLException
-
getFloatValue
- Throws:
SQLException
-
getDoubleValue
- Throws:
SQLException
-
getValue
- Throws:
SQLException
-
getIndex
- Throws:
SQLException
-