Package io.vertx.sqlclient
Interface Row
-
- All Superinterfaces:
Tuple
public interface Row extends Tuple
A single row of theexecution result rowset
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> T
get(Class<T> type, String column)
LikeTuple.get(Class, int)
but specifying thecolumn
instead of the position.default BigDecimal[]
getArrayOfBigDecimals(String column)
Get an array ofBigDecimal
value for the givencolumn
.default Boolean[]
getArrayOfBooleans(String column)
Get an array ofBoolean
value for the givencolumn
.default Buffer[]
getArrayOfBuffers(String column)
Get an array ofBuffer
value for the givencolumn
.default Double[]
getArrayOfDoubles(String column)
Get an array ofDouble
value for the givencolumn
.default Float[]
getArrayOfFloats(String column)
Get an array ofFloat
value for the givencolumn
.default Integer[]
getArrayOfIntegers(String column)
Get an array ofInteger
value for the givencolumn
.default JsonArray[]
getArrayOfJsonArrays(String column)
Get an array ofJsonArray
value for the givencolumn
.default JsonObject[]
getArrayOfJsonObjects(String column)
Get an array ofJsonObject
value for the givencolumn
.default Object[]
getArrayOfJsons(String column)
Get an array of JSON elements for the givencolumn
, the element might benull
or one of the following types: String Number JsonObject JsonArray Booleandefault java.time.LocalDate[]
getArrayOfLocalDates(String column)
Get an array ofLocalDate
value for the givencolumn
.default java.time.LocalDateTime[]
getArrayOfLocalDateTimes(String column)
Get an array ofLocalDateTime
value for the givencolumn
.default java.time.LocalTime[]
getArrayOfLocalTimes(String column)
Get an array ofLocalTime
value for the givencolumn
.default Long[]
getArrayOfLongs(String column)
Get an array ofLong
value for the givencolumn
.default Numeric[]
getArrayOfNumerics(String column)
Get an array ofNumeric
value for the givencolumn
.default java.time.OffsetDateTime[]
getArrayOfOffsetDateTimes(String column)
Get an array ofOffsetDateTime
value for the givencolumn
.default java.time.OffsetTime[]
getArrayOfOffsetTimes(String column)
Get an array ofOffsetTime
value for the givencolumn
.default Short[]
getArrayOfShorts(String column)
Get an array ofShort
value for the givencolumn
.default String[]
getArrayOfStrings(String column)
Get an array ofString
value for the givencolumn
.default java.time.temporal.Temporal[]
getArrayOfTemporals(String column)
Get an array ofTemporal
value for the givencolumn
.default UUID[]
getArrayOfUUIDs(String column)
Get an array ofUUID
value for the givencolumn
.default BigDecimal
getBigDecimal(String column)
GetBigDecimal
value for the givencolumn
.default Boolean
getBoolean(String column)
Get a boolean value for the givencolumn
.default Buffer
getBuffer(String column)
Get a buffer value for the givencolumn
.int
getColumnIndex(String column)
Get a column position for the given @code column}.String
getColumnName(int pos)
Get a column name atpos
.default Double
getDouble(String column)
Get a double value for the givencolumn
.default Float
getFloat(String column)
Get a float value for the givencolumn
.default Integer
getInteger(String column)
Get an integer value for the givencolumn
.default Object
getJson(String column)
Get a JSON element for the givencolumn
, the element might benull
or one of the following types: String Number JsonObject JsonArray Booleandefault JsonArray
getJsonArray(String column)
Get aJsonArray
value for the givencolumn
.default JsonObject
getJsonObject(String column)
Get aJsonObject
value for the givencolumn
.default java.time.LocalDate
getLocalDate(String column)
GetLocalDate
value for the givencolumn
.default java.time.LocalDateTime
getLocalDateTime(String column)
GetLocalDateTime
value for the givencolumn
.default java.time.LocalTime
getLocalTime(String column)
GetLocalTime
value for the givencolumn
.default Long
getLong(String column)
Get a long value for the givencolumn
.default Numeric
getNumeric(String column)
GetNumeric
value for the givencolumn
.default java.time.OffsetDateTime
getOffsetDateTime(String column)
GetOffsetDateTime
value for the givencolumn
.default java.time.OffsetTime
getOffsetTime(String column)
GetOffsetTime
value for the givencolumn
.default Short
getShort(String column)
Get a short value for the givencolumn
.default String
getString(String column)
Get a string value for the givencolumn
.default java.time.temporal.Temporal
getTemporal(String column)
Get a temporal value for the givencolumn
.default UUID
getUUID(String column)
GetUUID
value for the givencolumn
.default Object
getValue(String column)
Get a value for the givencolumn
.default void
release()
Signal the row can be recycled, this is only effective when dealing with a row in a collector query and the row has already been processed and transformed.default JsonObject
toJson()
Return a JSON object representation of the row.-
Methods inherited from interface io.vertx.sqlclient.Tuple
addArrayOfBigDecimal, addArrayOfBoolean, addArrayOfBuffer, addArrayOfDouble, addArrayOfFloat, addArrayOfInteger, addArrayOfJsonArray, addArrayOfJsonObject, addArrayOfLocalDate, addArrayOfLocalDateTime, addArrayOfLocalTime, addArrayOfLong, addArrayOfOffsetDateTime, addArrayOfOffsetTime, addArrayOfShort, addArrayOfString, addArrayOfTemporal, addArrayOfUUID, addBigDecimal, addBoolean, addBuffer, addDouble, addFloat, addInteger, addJsonArray, addJsonObject, addLocalDate, addLocalDateTime, addLocalTime, addLong, addOffsetDateTime, addOffsetTime, addShort, addString, addTemporal, addUUID, addValue, clear, deepToString, get, getArrayOfBigDecimals, getArrayOfBooleans, getArrayOfBuffers, getArrayOfDoubles, getArrayOfFloats, getArrayOfIntegers, getArrayOfJsonArrays, getArrayOfJsonObjects, getArrayOfJsons, getArrayOfLocalDates, getArrayOfLocalDateTimes, getArrayOfLocalTimes, getArrayOfLongs, getArrayOfNumerics, getArrayOfOffsetDateTimes, getArrayOfOffsetTimes, getArrayOfShorts, getArrayOfStrings, getArrayOfTemporals, getArrayOfUUIDs, getBigDecimal, getBoolean, getBuffer, getDouble, getFloat, getInteger, getJson, getJsonArray, getJsonObject, getLocalDate, getLocalDateTime, getLocalTime, getLong, getNumeric, getOffsetDateTime, getOffsetTime, getShort, getString, getTemporal, getUUID, getValue, size, types
-
-
-
-
Method Detail
-
getColumnName
String getColumnName(int pos)
Get a column name atpos
.- Parameters:
pos
- the column position- Returns:
- the column name or
null
-
getColumnIndex
int getColumnIndex(String column)
Get a column position for the given @code column}.- Parameters:
column
- the column name- Returns:
- the column name or
-1
if not found
-
getValue
default Object getValue(String column)
Get a value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getBoolean
default Boolean getBoolean(String column)
Get a boolean value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getShort
default Short getShort(String column)
Get a short value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getInteger
default Integer getInteger(String column)
Get an integer value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getLong
default Long getLong(String column)
Get a long value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getFloat
default Float getFloat(String column)
Get a float value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getDouble
default Double getDouble(String column)
Get a double value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getNumeric
default Numeric getNumeric(String column)
GetNumeric
value for the givencolumn
.- Parameters:
column
- the column- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getString
default String getString(String column)
Get a string value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getJson
default Object getJson(String column)
Get a JSON element for the givencolumn
, the element might benull
or one of the following types:- String
- Number
- JsonObject
- JsonArray
- Boolean
- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getJsonObject
default JsonObject getJsonObject(String column)
Get aJsonObject
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getJsonArray
default JsonArray getJsonArray(String column)
Get aJsonArray
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getTemporal
default java.time.temporal.Temporal getTemporal(String column)
Get a temporal value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getLocalDate
default java.time.LocalDate getLocalDate(String column)
GetLocalDate
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getLocalTime
default java.time.LocalTime getLocalTime(String column)
GetLocalTime
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getLocalDateTime
default java.time.LocalDateTime getLocalDateTime(String column)
GetLocalDateTime
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getOffsetTime
default java.time.OffsetTime getOffsetTime(String column)
GetOffsetTime
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getOffsetDateTime
default java.time.OffsetDateTime getOffsetDateTime(String column)
GetOffsetDateTime
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getBuffer
default Buffer getBuffer(String column)
Get a buffer value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getUUID
default UUID getUUID(String column)
GetUUID
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getBigDecimal
default BigDecimal getBigDecimal(String column)
GetBigDecimal
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfBooleans
default Boolean[] getArrayOfBooleans(String column)
Get an array ofBoolean
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfShorts
default Short[] getArrayOfShorts(String column)
Get an array ofShort
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfIntegers
default Integer[] getArrayOfIntegers(String column)
Get an array ofInteger
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfLongs
default Long[] getArrayOfLongs(String column)
Get an array ofLong
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfFloats
default Float[] getArrayOfFloats(String column)
Get an array ofFloat
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfDoubles
default Double[] getArrayOfDoubles(String column)
Get an array ofDouble
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfNumerics
default Numeric[] getArrayOfNumerics(String column)
Get an array ofNumeric
value for the givencolumn
.- Parameters:
column
- the column- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfStrings
default String[] getArrayOfStrings(String column)
Get an array ofString
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfJsonObjects
default JsonObject[] getArrayOfJsonObjects(String column)
Get an array ofJsonObject
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfJsonArrays
default JsonArray[] getArrayOfJsonArrays(String column)
Get an array ofJsonArray
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfTemporals
default java.time.temporal.Temporal[] getArrayOfTemporals(String column)
Get an array ofTemporal
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfLocalDates
default java.time.LocalDate[] getArrayOfLocalDates(String column)
Get an array ofLocalDate
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfLocalTimes
default java.time.LocalTime[] getArrayOfLocalTimes(String column)
Get an array ofLocalTime
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfLocalDateTimes
default java.time.LocalDateTime[] getArrayOfLocalDateTimes(String column)
Get an array ofLocalDateTime
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfOffsetTimes
default java.time.OffsetTime[] getArrayOfOffsetTimes(String column)
Get an array ofOffsetTime
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfOffsetDateTimes
default java.time.OffsetDateTime[] getArrayOfOffsetDateTimes(String column)
Get an array ofOffsetDateTime
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfBuffers
default Buffer[] getArrayOfBuffers(String column)
Get an array ofBuffer
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfUUIDs
default UUID[] getArrayOfUUIDs(String column)
Get an array ofUUID
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfBigDecimals
default BigDecimal[] getArrayOfBigDecimals(String column)
Get an array ofBigDecimal
value for the givencolumn
.- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
getArrayOfJsons
default Object[] getArrayOfJsons(String column)
Get an array of JSON elements for the givencolumn
, the element might benull
or one of the following types:- String
- Number
- JsonObject
- JsonArray
- Boolean
- Parameters:
column
- the column name- Returns:
- the
column
value - Throws:
NoSuchElementException
- when thecolumn
does not exist
-
get
default <T> T get(Class<T> type, String column)
LikeTuple.get(Class, int)
but specifying thecolumn
instead of the position.
-
toJson
default JsonObject toJson()
Return a JSON object representation of the row.Column names are mapped to JSON keys.
The following rules are applied for the column values:
- number, boolean and string are preserved
- the
null
value is preserved - JSON elements are preserved
Buffer
are converted to base64 encoded strings- array is mapped
JsonArray
- otherwise the type converted to a string
- Returns:
- the json representation
-
release
default void release()
Signal the row can be recycled, this is only effective when dealing with a row in a collector query and the row has already been processed and transformed.
-
-