This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from d in Delivery, | |
| join: o in Order, on: o.id == d.order_id, | |
| where: ... # Here my where clause | |
| select: {d, o} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from d in Delivery, | |
| join: in Order, on: o.id == d.order_id, | |
| join: h in HistoryItem, on: h.delivery_id == d.id, | |
| where: … # Here my where clause | |
| select: {d, o, h} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from d in Delivery, | |
| join: o in Order, on: o.id == d.order_id, | |
| join: h in HistoryItem, on: h.delivery_id == d.id, | |
| preload: [history_items: h, order: o], | |
| where: … # Here my where clause | |
| select: d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule BucklerBot.Handlers.Private do | |
| use Agala.Provider.Telegram, :handler | |
| import BucklerBot.Gettext | |
| require Logger | |
| def init(opts), do: opts | |
| def call(conn = %Agala.Conn{ | |
| request: %{"message" => %{"chat" => %{"id" => chat_id, "type" => "private"}, "text" => "/ping"}} | |
| }, _) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule BucklerBot.Handlers.Private do | |
| use Agala.Provider.Telegram, :handler | |
| import BucklerBot.Gettext | |
| require Logger | |
| def init(opts), do: opts | |
| def call(conn = %Agala.Conn{ | |
| request: %{"message" => %{"chat" => %{"id" => chat_id, "type" => "private"}, "text" => "/ping"}} | |
| }, _) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test "invalidates some quotes when parcel dimensions cannot be handled by a vehicle type", %{ | |
| bypass: bypass | |
| } do | |
| Bypass.expect(bypass, "POST", "/v1/commercial-api/get-a-quote", fn conn -> | |
| Conn.resp(conn, 200, Jason.encode!(Fixtures.Gophr.quotes_success_response(40))) | |
| end) | |
| pending_quotes = | |
| [:bicycle, :bicycle_cargo, :motorcycle, :car, :van_small, :van] | |
| |> Enum.map(&generate_quote/1) |
OlderNewer