Class: EventStoreClient::HTTP::Commands::Projections::Create
- Defined in:
- lib/event_store_client/adapters/http/commands/projections/create.rb
Instance Method Summary collapse
Methods inherited from Command
Instance Method Details
#call(name, streams, options: {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/event_store_client/adapters/http/commands/projections/create.rb', line 8 def call(name, streams, options: {}) data = " fromStreams(\#{streams})\n .when({\n $any: function(s,e) {\n linkTo(\"\#{name}\", e)\n }\n })\n STRING\n\n connection.call(\n :post,\n \"/projections/continuous?name=\#{name}&type=js&enabled=yes&emit=true&trackemittedstreams=true\", # rubocop:disable Metrics/LineLength\n body: data,\n headers: {}\n )\nend\n" |