query v0.3.0 Query.Builder.Scope

Provides scoping details for our Query.Builder.

Link to this section Summary

Functions

Provides scoping details based on the provided params and possible scopes

Link to this section Functions

Link to this function new(params \\ %{}, scopes \\ [])

Provides scoping details based on the provided params and possible scopes.

Parameters

  • params: A param map - most likely from a controller.
  • scopes: A list of possible scopes, formatted as two item tuples.

Examples

iex> Query.Builder.Scope.new(%{"by_title" => "title"}, [{App.Context, "by_title"}, {App.Context, "by_name"}])
[{App.Context, :by_title, ["title"]}]