Row Class
Namespace
Usage
Every typed accessor is available in two forms: by column name (String) or by 0-based column index (Integer). All typed accessors return null when the underlying value is null. The accessors throw IllegalArgumentException if the column name isn't found or if the column index is out of bounds. Duplicate column names in a result set cause getColumnIndex() to throw IllegalArgumentException.
Example
Access column values by name and by index:
Row Constructors
The following are constructors for Row.
Row(rawRow, metadata)
Signature
public Row(ConnectApi.QuerySqlRow rawRow, List<ConnectApi.QuerySqlMetadataItem> metadata)
Parameters
- rawRow
- Type: ConnectApi.QuerySqlRow
- Raw API row from a ConnectApi.QuerySqlPageOutput result.
- metadata
- Type: List<ConnectApi.QuerySqlMetadataItem>
- Column metadata for the result set, used to map column names to indexes.
Row Methods
The following are methods for Row.
getBoolean(columnIndex)
Signature
public Boolean getBoolean(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getBoolean(columnName)
Signature
public Boolean getBoolean(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getColumnIndex(columnName)
Signature
public Integer getColumnIndex(String columnName)
Parameters
- columnName
- Type: String
- Name of the column to look up.
getDate(columnIndex)
Signature
public Date getDate(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getDate(columnName)
Signature
public Date getDate(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getDateTime(columnIndex)
Signature
public Datetime getDateTime(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getDateTime(columnName)
Signature
public Datetime getDateTime(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getDecimal(columnIndex)
Signature
public Decimal getDecimal(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getDecimal(columnName)
Signature
public Decimal getDecimal(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getDouble(columnIndex)
Signature
public Double getDouble(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getDouble(columnName)
Signature
public Double getDouble(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getInteger(columnIndex)
Signature
public Integer getInteger(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getInteger(columnName)
Signature
public Integer getInteger(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getList(columnIndex)
Signature
public List<Object> getList(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getList(columnName)
Signature
public List<Object> getList(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getLong(columnIndex)
Signature
public Long getLong(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getLong(columnName)
Signature
public Long getLong(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getObject(columnIndex)
Signature
public Object getObject(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getObject(columnName)
Signature
public Object getObject(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getRawRow()
Signature
public ConnectApi.QuerySqlRow getRawRow()
getString(columnIndex)
Signature
public String getString(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getString(columnName)
Signature
public String getString(String columnName)
Parameters
- columnName
- Type: String
- Column name.
getTime(columnIndex)
Signature
public Time getTime(Integer columnIndex)
Parameters
- columnIndex
- Type: Integer
- 0-based column index.
getTime(columnName)
Signature
public Time getTime(String columnName)
Parameters
- columnName
- Type: String
- Column name.