View Source EctoForge.Extension.Get.Lock (ecto_forge v0.1.21)

You can use Api https://hexdocs.pm/ecto/Ecto.Query.html#lock/3

{:ok, []} = MyApp.Model.get_all(filter: %{id: 1}, lock: "FOR SHARE NOWAIT")

Summary

Functions

After with result Handle your functions find_all get_all get! get find before You can use {:stop, query, attrs} -> Don't execute another extensions before

Before with your query Handle your functions find_all get_all get! get find before

Functions

Link to this function

after_query_add_extension_to_get(module, mode, repo, list_exetensions_executed, prev_query, result, attrs)

View Source

After with result Handle your functions find_all get_all get! get find before You can use {:stop, query, attrs} -> Don't execute another extensions before

Link to this function

before_query_add_extension_to_get(module, mode, repo, list_exetensions_executed, query, attrs)

View Source

Before with your query Handle your functions find_all get_all get! get find before

return {query, attrs} # required to return

You can use {:stop, query, attrs} -> Don't execute another extensions before You can use {:reusult, result, attrs} -> Don't execute repo extensions before