public class FieldValueList extends AbstractList<FieldValue> implements Serializable
Google BigQuery Table Field Values class, which represents a row in returned query result (table row). Tables rows can be retrieved as a result of a query or when listing table data.
Depending on how a corresponding query was executed, each row (an instance of
FieldValueList
) may or may not contain related schema. If schema is not provided, the individual
cells of the row will still be accessible by index but not by name.
Implements
SerializableStatic Methods
of(List<FieldValue> row, Field[] schema)
public static FieldValueList of(List<FieldValue> row, Field[] schema)
Creates an instance of FieldValueList
, useful for testing.
This method is unstable. See this discussion for more context.
Name | Description |
row | List<FieldValue> |
schema | Field[] |
Type | Description |
FieldValueList |
of(List<FieldValue> row, FieldList schema)
public static FieldValueList of(List<FieldValue> row, FieldList schema)
Creates an instance of FieldValueList
, useful for testing.
This method is unstable. See this discussion for more context.
Name | Description |
row | List<FieldValue> |
schema | FieldList |
Type | Description |
FieldValueList |
Methods
get(int index)
public FieldValue get(int index)
Gets field value by index.
Name | Description |
index | int field value index |
Type | Description |
FieldValue |
get(String name)
public FieldValue get(String name)
Gets field value by index.
Name | Description |
name | String field name (defined in schema) |
Type | Description |
FieldValue |
hasSchema()
public boolean hasSchema()
Returns true
if schema is provided, false
otherwise.
Type | Description |
boolean |
size()
public int size()
Returns the total number of field values in the row.
Type | Description |
int |