Class DatabricksStruct

  • All Implemented Interfaces:
    Struct

    public class DatabricksStruct
    extends Object
    implements Struct
    Class for representation of Struct complex object.
    • Constructor Detail

      • DatabricksStruct

        public DatabricksStruct​(Map<String,​Object> attributes,
                                String metadata)
        Constructs a DatabricksStruct with the specified attributes and metadata.
        Parameters:
        attributes - the attributes of the struct as a map
        metadata - the metadata describing types of struct fields
    • Method Detail

      • getSQLTypeName

        public String getSQLTypeName()
                              throws SQLException
        Retrieves the SQL type name of this Struct.
        Specified by:
        getSQLTypeName in interface Struct
        Returns:
        the SQL type name of this Struct
        Throws:
        SQLException - if a database access error occurs
      • getAttributes

        public Object[] getAttributes()
                               throws SQLException
        Retrieves the attributes of this Struct as an array.
        Specified by:
        getAttributes in interface Struct
        Returns:
        an array containing the attributes of the Struct
        Throws:
        SQLException - if a database access error occurs
      • getAttributes

        public Object[] getAttributes​(Map<String,​Class<?>> map)
                               throws SQLException
        Retrieves the attributes of this Struct as an array, using the specified type map.
        Specified by:
        getAttributes in interface Struct
        Parameters:
        map - a Map object that contains the mapping of SQL types to Java classes
        Returns:
        an array containing the attributes of the Struct
        Throws:
        SQLException - if a database access error occurs
      • toString

        public String toString()
        Returns a JSON-like string with field names.
        Overrides:
        toString in class Object