module ROM::Plugins::Command::Schema::ClassInterface
@api private
Public Instance Methods
build(relation, **options)
click to toggle source
Build a command and set it input to relation's input_schema
@see Command.build
@return [Command]
@api public
Calls superclass method
# File lib/rom/plugins/command/schema.rb, line 24 def build(relation, **options) if relation.schema? && !options.key?(:input) relation_input = relation.input_schema command_input = input composed_input = if command_input.equal?(ROM::Command.input) relation_input else -> tuple { relation_input[command_input[tuple]] } end super(relation, **options, input: composed_input) else super end end