📜  phoenix 查询生成器 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:48.750000             🧑  作者: Mango

代码示例1
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()