View Source EctoForge.Extension.Get.OrderBy (ecto_forge v0.1.20)

Use with your EctoForge.CreateInstance

use EctoForge.CreateInstance,
  extensions_get: [
    EctoForge.Extension.Get.OrderBy,
  ],
  repo: MyApp.Repo

## When you coonnect You can use Api https://hexdocs.pm/ecto/Ecto.Query.html#order_by/3 ### Example

   {:ok, []} = MyApp.Model.get_all(order_by: [asc: :name, desc_nulls_first: :population])

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