Interface SqlType.Struct

All Superinterfaces:
Serializable, SqlType<Struct>
All Known Implementing Classes:
Type.SchemalessStruct, Type.StructWithSchema
Enclosing interface:
SqlType<T>

public static interface SqlType.Struct extends SqlType<Struct>
Represents a struct type in SQL. A struct is an ordered collection of named and type fields.
  • Method Details

    • getFields

      List<? extends SqlType.Struct.Field> getFields()
      Returns:
      the ordered list of SqlType.Struct.Fields for the struct
    • getType

      SqlType<?> getType(int fieldIndex)
      Parameters:
      fieldIndex - index of the field
      Returns:
      the SqlType of the field at the given index
    • getType

      SqlType<?> getType(String fieldName)
      Parameters:
      fieldName - name of the field
      Returns:
      the SqlType of the field with the given name
      Throws:
      IllegalArgumentException - if there is no field with the name *or* if there are multiple columns with the given name
    • getColumnIndex

      int getColumnIndex(String fieldName)
      Parameters:
      fieldName - name of the field
      Returns:
      the field index of the field with the given name
      Throws:
      IllegalArgumentException - if there is no field with the name *or* if there are multiple columns with the given name