Git Product home page Git Product logo

ex_pipeline's People

Contributors

msramos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ex_pipeline's Issues

Idea for how to implement ecto multi support

Hi ๐Ÿ‘‹

I know this is just like a PoC or something. And it doesn't need to be this huge package or something. And its probably abandoned.

But, the only problem for me using this micro library, is that its not possible to wrap all steps inside a transaction.

Pipeline needs access to the Repo module, which can be done by an optional overridable function that by default returns nil.

If we use multi the state would be the changes in Ecto.Multi which change and evolve as you combine different multis together.

You can actually return a "pure" multi from a step by just

def get_company_step do
  # some other non multi code to get company
  Ecto.Multi.new()
  |> Ecto.Multi.put(:company, company)
end

or have the pipeline insert the returned value from the result returned by the step with the function name like:

# code to execute and combine steps
Ecto.Multi.new()
  |> Ecto.Multi.put(step_name, result)
# other code

I wonder how hard it is to fit this idea into this library ๐Ÿค”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.