Commanded Ecto Projections Save

Read model projections for Commanded using Ecto

Project README

Commanded Ecto Projections

Read model projections for Commanded CQRS/ES applications using Ecto for persistence.

Read the Changelog for recent changes and the Hex Docs on API usage.

This README and the following guides follow the master branch which may not be the currently published version.

Overview

Example projector

defmodule MyApp.ExampleProjector do
  use Commanded.Projections.Ecto,
    application: MyApp.Application,
    repo: MyApp.Projections.Repo,
    name: "MyApp.ExampleProjector"

  project %AnEvent{} = event, _metadata, fn multi ->
    %AnEvent{name: name} = event

    projection = %ExampleProjection{name: name}

    Ecto.Multi.insert(multi, :example_projection, projection)
  end
end

Contributing

Pull requests to contribute new or improved features, and extend documentation are most welcome. Please follow the existing coding conventions.

You should include unit tests to cover any changes. Run mix test to execute the test suite:

mix deps.get
MIX_ENV=test mix setup
mix test

Contributors

Need help?

Please open an issue if you encounter a problem, or need assistance. You can also seek help in the #commanded channel in the official Elixir Slack.

Copyright (c) 2017 Ben Smith

This library is released under the MIT License. See the LICENSE.md file for further details.

Open Source Agenda is not affiliated with "Commanded Ecto Projections" Project. README Source: commanded/commanded-ecto-projections
Stars
86
Open Issues
14
Last Commit
1 month ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating