如何运行数据库选择并在iex中获得结果?

时间:2016-11-07 05:45:08

标签: elixir iex

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

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

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

我尝试使用import Ecto.Query导入,然后 我正在运行一些像from l in '' where,我得到了这个 #Ecto.Query<from l in "", where: >,如何获取数据结果?

1 个答案:

答案 0 :(得分:0)

import Ecto.Query
alias Repo
Repo.one(from s in Struct)

也许还要看all