AbacusSql.scope

You're seeing just the function scope, go back to AbacusSql module for more information.

Specs

scope(Ecto.Query.t(), [
  {atom(), term() | %{__struct__: module(), __meta__: Ecto.Schema.Metadata.t()}}
]) :: Ecto.Query.t()

Adds scoped data to the query. That data is accessible by simply accessing the given key.

Example:

from(u in User)
|> AbacusSql.scope(some_number: 13)
|> AbacusSql.where("count(blog_posts.id) < some_number")
Link to this function

scope(query, key, value)

View Source

Specs

scope(
  Ecto.Query.t(),
  atom(),
  term() | %{__struct__: module(), __meta__: Ecto.Schema.Metadata.t()}
) :: Ecto.Query.t()

Adds scoped data to the query. That data is accessible by simply accessing the given key.

Example:

from(u in User)
|> AbacusSql.scope(:some_number, 13)
|> AbacusSql.where("count(blog_posts.id) < some_number")