def call(*args)
      cache.fetch_or_store(args.hash) do
        type, adapter, ast, plugins, plugins_options, meta = args

        compiler = with(
          id: type,
          adapter: adapter,
          plugins: Array(plugins),
          plugins_options: plugins_options,
          meta: meta
        )

        graph_opts = compiler.visit(ast)
        command = ROM::Commands::Graph.build(registry, graph_opts)

        if command.graph?
          CommandProxy.new(command)
        elsif command.lazy?
          command.unwrap
        else
          command
        end
      end
    end
def call(*args)
      cache.fetch_or_store(args.hash) do
        type, adapter, ast, plugins, plugins_options, meta = args

        compiler = with(
          id: type,
          adapter: adapter,
          plugins: Array(plugins),
          plugins_options: plugins_options,
          meta: meta
        )

        graph_opts = compiler.visit(ast)
        command = ROM::Commands::Graph.build(registry, graph_opts)

        if command.graph?
          CommandProxy.new(command)
        elsif command.lazy?
          command.unwrap
        else
          command
        end
      end
    end
Return a specific command type for a given adapter and relation AST

 This class holds its own registry where all generated commands are being
 stored

 CommandProxy is returned for complex command graphs as they expect root
 relation name to be present in the input, which we don't want to have
 in repositories. It might be worth looking into removing this requirement
 from rom core Command::Graph API.

 @overload [](type, adapter, ast, plugins, meta)
   @param type [Symbol] The type of command
   @param adapter [Symbol] The adapter identifier
   @param ast [Array] The AST representation of a relation
   @param plugins [Array<Symbol>] A list of optional command plugins that should be used
   @param meta [Hash] Meta data for a command

   @return [Command, CommandProxy]

 @api private