AbacusSql.select
You're seeing just the function
select
, go back to AbacusSql module for more information.
Specs
select(Ecto.Query.t(), atom() | String.t(), t(), options()) :: Ecto.Query.t()
Adds or merges a selection to the query.
Options:
as
- if set, will wrap the expression with the fragment "? AS #{name}". Only letters, digits, - and _ are allowed, the function will raise otherwise.root
- if set, will use the given alias as the root table
Example:
query = from u in User
query = select(query, "name", ~S[concat(name, " (", count(blog_posts.id), " posts)")])
Repo.all(query) == [%{"name" => "Peter (31 posts)"}, %{"name" => "Mark (13 posts)"}]