View Source EctoForge.Extension.Get.OnlyQuery (ecto_forge v0.1.20)
Use with your EctoForge.CreateInstance
use EctoForge.CreateInstance,
extensions_get: [
EctoForge.Extension.Get.OnlyQuery,
],
repo: MyApp.Repo
## When you coonnect You can get only query with your find_all get_all find ### Example
{:ok, %Ecto.Query{}} = MyApp.Model.find_all(only_query: true)
## Recomidation Use at the very end after used extensions because this extension instantly stops the others
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
after_query_add_extension_to_get(module, mode, repo, list_exetensions_executed, prev_query, result, attrs)
View SourceAfter 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_query_add_extension_to_get(module, mode, repo, list_exetensions_executed, query, attrs)
View SourceBefore 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