LL
Size: a a a
LL
-
LL
PG
account
?Card
можно использовать select([c], struct(c, [:id]))
, можно ли сделать так же с джойнами?Card
|> join(:left, [c], account in assoc(c, :account))
|> preload([c, account], account: account)
|> Repo.all
IS
AB
IS
Card
|> join(:left, [c], account in assoc(c, :account))
|> select([c, account], merge(c, %{account: struct(account, [:id, :title])}))
|> Repo.all
IS
AB
PG
Card
|> join(:left, [c], account in assoc(c, :account))
|> select([c, account], merge(c, %{account: struct(account, [:id, :title])}))
|> Repo.all
PG
IS
AB
from(city in City, preload: :country,
select: struct(city, [:country_id, :name, country: [:id, :population]]))
IS
YS
warning: incompatible types:
{:port, integer()} | {:scheme, :http} !~ {:port, var0} | {:scheme, var1}
in expression:
[port: port, scheme: scheme] = [port: 4001, scheme: :http]
YS
LL
warning: incompatible types:
{:port, integer()} | {:scheme, :http} !~ {:port, var0} | {:scheme, var1}
in expression:
[port: port, scheme: scheme] = [port: 4001, scheme: :http]
YS
port: port, scheme: scheme] = [port: 4001, scheme: :http]
LL
port: port, scheme: scheme] = [port: 4001, scheme: :http]
port = 4001
scheme = :http
YS