def relation(name, options = EMPTY_HASH, &block)
      klass_opts = { adapter: default_adapter }.merge(options)
      klass = Relation.build_class(name, klass_opts)
      klass.schema_opts(dataset: name, relation: name)
      klass.class_eval(&block) if block
      register_relation(klass)
      klass
    end
def relation(name, options = EMPTY_HASH, &block)
      klass_opts = { adapter: default_adapter }.merge(options)
      klass = Relation.build_class(name, klass_opts)
      klass.schema_opts(dataset: name, relation: name)
      klass.class_eval(&block) if block
      register_relation(klass)
      klass
    end
Relation definition DSL

 @example
   setup.relation(:users) do
     def names
       project(:name)
     end
   end

 @api public