Package com.tableau.hyperapi

# Class ResultSchema

java.lang.Object
com.tableau.hyperapi.ResultSchema

public final class ResultSchema extends Object
The schema of a query result.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `ResultSchema.Column`
  A single column.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ResultSchema.Column`
  `getColumn(int position)`
  Returns the column at a specific position.
  `Optional<ResultSchema.Column>`
  `getColumnByName(Name columnName)`
  Retrieves the column named "columnName", if it exists.
  `Optional<ResultSchema.Column>`
  `getColumnByName(String columnName)`
  Retrieves the column named "columnName", if it exists.
  `int`
  `getColumnCount()`
  Returns the number of columns.
  `OptionalInt`
  `getColumnPositionByName(Name columnName)`
  Retrieves the column position for column named "columnName", if it exists.
  `OptionalInt`
  `getColumnPositionByName(String columnName)`
  Retrieves the column position for column named "columnName", if it exists.
  `List<ResultSchema.Column>`
  `getColumns()`
  Returns all columns.

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

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getColumns

    public List<ResultSchema.Column> getColumns()
    Returns all columns.
    Returns:
      The columns.

  - ### getColumnCount

    public int getColumnCount()
    Returns the number of columns.
    Returns:
      The number of columns.

  - ### getColumn

    public ResultSchema.Column getColumn(int position)
    Returns the column at a specific position.
    Parameters:
      `position` - The index.
    Returns:
      The column.

  - ### getColumnByName

    public Optional<ResultSchema.Column> getColumnByName(String columnName)
    Retrieves the column named "columnName", if it exists.
    Parameters:
      `columnName` - The name of the column to retrieve.
    Returns:
      The column if it exists.

  - ### getColumnByName

    public Optional<ResultSchema.Column> getColumnByName(Name columnName)
    Retrieves the column named "columnName", if it exists.
    Parameters:
      `columnName` - The name of the column to retrieve.
    Returns:
      The column if it exists.

  - ### getColumnPositionByName

    public OptionalInt getColumnPositionByName(String columnName)
    Retrieves the column position for column named "columnName", if it exists.
    Parameters:
      `columnName` - The name of the column.
    Returns:
      The position of the column if it exists.

  - ### getColumnPositionByName

    public OptionalInt getColumnPositionByName(Name columnName)
    Retrieves the column position for column named "columnName", if it exists.
    Parameters:
      `columnName` - The name of the column.
    Returns:
      The position of the column if it exists.