【问题标题】:How do i run a db select and get the result in iex?如何运行 db select 并在 iex 中获取结果?
【发布时间】:2016-11-08 00:27:50
【问题描述】:

在elixir iex中,我想知道基本步骤。

1.如果我有模块以及如何导入它。

2.我想运行from l in '' where 并获取地图。

我尝试使用import Ecto.Query 导入,然后 我正在运行类似from l in '' where 的东西,我知道了 #Ecto.Query<from l in "", where: >,如何获取数据结果?

【问题讨论】:

  • 你真的应该为你的问题添加一个答案,而不是用答案编辑问题本身。

标签: elixir elixir-iex


【解决方案1】:
import Ecto.Query
alias Repo
Repo.one(from s in Struct)

也可以看看all

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-05-09
    • 2017-08-17
    • 2017-04-09
    • 2015-10-29
    • 2022-01-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多