Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

phoenix query builder

User
|> QueryBuilder.where(firstname: "John")
|> QueryBuilder.where([{:age, :gt, 30}, city: "Anytown"])
|> QueryBuilder.order_by(asc: :lastname)
|> QueryBuilder.preload([:role, authored_articles: :comments])
|> QueryBuilder.offset(20)
|> QueryBuilder.limit(10)
|> Repo.all()
Source by hexdocs.pm #
 
PREVIOUS NEXT
Tagged: #phoenix #query #builder
ADD COMMENT
Topic
Name
2+4 =