# Class DatabricksStruct

java.lang.Object
com.databricks.jdbc.api.impl.DatabricksStruct

All Implemented Interfaces:
  `Struct`

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

## Constructor Summary

Constructors
Constructor
Description
`DatabricksStruct(Map<String,Object> attributes, String metadata)`
Constructs a DatabricksStruct with the specified attributes and metadata.

## Method Summary

Modifier and Type
Method
Description
`Object[]`
`getAttributes()`
Retrieves the attributes of this Struct as an array.
`Object[]`
`getAttributes(Map<String,Class<?>> map)`
Retrieves the attributes of this Struct as an array, using the specified type map.
`String`
`getSQLTypeName()`
Retrieves the SQL type name of this Struct.
`String`
`toString()`
Returns a JSON-like string with field names.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### 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 Details

### 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`