Class ResultSchema


  • public final class ResultSchema
    extends java.lang.Object
    The schema of a query result.
    • Method Detail

      • getColumns

        public java.util.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 java.util.Optional<ResultSchema.Column> getColumnByName​(java.lang.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 java.util.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 java.util.OptionalInt getColumnPositionByName​(java.lang.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 java.util.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.