Caylir v0.3.0 Caylir.Graph behaviour

Base module to define graph connections.

All graph connections will be made using a user-defined extension of this module.

Example Module

defmodule MyGraph do
  use Caylir.Graph, otp_app: :my_application
end

Example Configuration

config :my_application, MyGraph,
  host: "localhost",
  pool: [ max_overflow: 10, size: 5 ],
  port: 64210

Summary

Callbacks

Returns the (internal) pool module

Returns a supervisable pool child_spec

Returns the connection configuration

Deletes a quad from the graph

Queries the graph

Gets the shape of a query

Writes a quad to the graph

Types

t_delete()
t_delete() :: :ok | {:error, String.t}
t_query()
t_query() :: any | {:error, String.t}
t_write()
t_write() :: :ok | {:error, String.t}

Callbacks

__pool__()
__pool__() :: module

Returns the (internal) pool module.

child_spec()
child_spec() :: Supervisor.Spec.spec

Returns a supervisable pool child_spec.

config()
config() :: Keyword.t

Returns the connection configuration.

delete(arg0)
delete(Keyword.t) :: t_delete

Deletes a quad from the graph.

query(arg0)
query(String.t) :: t_query

Queries the graph.

shape(arg0)
shape(String.t) :: t_query

Gets the shape of a query.

write(arg0)
write(Keyword.t) :: t_write

Writes a quad to the graph.