Class Type.SchemalessStruct

java.lang.Object
com.google.cloud.bigtable.common.Type.SchemalessStruct
All Implemented Interfaces:
Type, SqlType<Struct>, SqlType.Struct, Serializable
Enclosing interface:
Type

public abstract static class Type.SchemalessStruct extends Object implements Type, SqlType.Struct
This is a special version of struct that is intended to only be used in the StructReader getters that require types. We don't want users to need to specify the struct schema when the schema will be validated on calls to StructReader methods on the struct.

Any attempts to interact with the schema will throw an exception.

For example the historical map data type uses this as follows:


 Map<ByteString, List<Struct>> historicalMap =
     resultSet.getMap(
        "cf",
        SqlType.mapOf(SqlType.bytes(), SqlType.arrayOf(SqlType.struct())));
 Struct struct = historicalMap.get("column").get(0);
 // Struct schema will be validated here so there's no need for users to pass the schema to getMap above
 ByteString value = struct.getBytes("value");
 
See Also: