blob: af1a77096bdb3cfbaed13760e90d7a29eca32a7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
defmodule Boltex do
alias Boltex.Bolt
def test(host, port, query, params \\ %{}) do
{:ok, p} = :gen_tcp.connect host, port, [active: false, mode: :binary, packet: :raw]
:ok = Bolt.handshake :gen_tcp, p
:ok = Bolt.init :gen_tcp, p, params
IO.inspect Bolt.run_statement(:gen_tcp, p, query, params)
end
end
|