ROM::Relation::ClassInterface#schema

Parsed documentation:
View on GitHub
Specify canonical schema for a relation

With a schema defined commands will set up a type-safe input handler
automatically

@example
  class Users < ROM::Relation[:sql]
    schema do
      attribute :id, Types::Serial
      attribute :name, Types::String
    end
  end

  # access schema
  Users.schema

@return [Schema]

@param [Symbol] dataset An optional dataset name
@param [Boolean] infer Whether to do an automatic schema inferring

@api public
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.