blob: 992009f87da491ef1caed1507e6327935809abcc (
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 \\ %{}, auth \\ nil) 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, auth
IO.inspect Bolt.run_statement(:gen_tcp, p, query)
end
end
|