Package com.google.cloud.bigtable.common
Class Type.StructWithSchema
java.lang.Object
com.google.cloud.bigtable.data.v2.internal.ColumnToIndexMapper
com.google.cloud.bigtable.common.Type.StructWithSchema
- All Implemented Interfaces:
Type,SqlType<Struct>,SqlType.Struct,Serializable
- Enclosing interface:
- Type
public static class Type.StructWithSchema
extends com.google.cloud.bigtable.data.v2.internal.ColumnToIndexMapper
implements Type, SqlType.Struct
Struct implementation that contains a schema that users can access. This should never be
constructed by users. It is only intended to be created directly from Type protobufs.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.google.cloud.bigtable.data.v2.models.sql.SqlType
SqlType.Array<Elem>, SqlType.Code, SqlType.Map<K,V>, SqlType.Struct Nested classes/interfaces inherited from interface com.google.cloud.bigtable.common.Type
Type.Array<Elem>, Type.Bool, Type.Bytes, Type.Date, Type.DefaultInstances, Type.Float32, Type.Float64, Type.Int64, Type.Map<K,V>, Type.SchemalessStruct, Type.String, Type.StructWithSchema, Type.Timestamp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Type.StructWithSchemafromProto(Type.Struct proto) getCode()SqlType<?>getType(int fieldIndex) SqlType<?>inthashCode()toString()Methods inherited from class com.google.cloud.bigtable.data.v2.internal.ColumnToIndexMapper
getColumnIndexMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.cloud.bigtable.data.v2.models.sql.SqlType.Struct
getColumnIndex
-
Constructor Details
-
StructWithSchema
@InternalApi("Visible for testing") public StructWithSchema(List<Type.StructWithSchema.Field> fields)
-
-
Method Details
-
fromProto
-
getCode
- Specified by:
getCodein interfaceSqlType<Struct>- Returns:
SqlType.Codeenum for this type
-
getFields
- Specified by:
getFieldsin interfaceSqlType.Struct- Returns:
- the ordered list of
SqlType.Struct.Fields for the struct
-
getType
- Specified by:
getTypein interfaceSqlType.Struct- Parameters:
fieldIndex- index of the field- Returns:
- the
SqlTypeof the field at the given index
-
getType
- Specified by:
getTypein interfaceSqlType.Struct- Parameters:
fieldName- name of the field- Returns:
- the
SqlTypeof the field with the given name
-
equals
-
hashCode
public int hashCode() -
toString
-