Caylir v0.9.0 Caylir.Graph behaviour View Source

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,
  language: :gizmo

Link to this section Summary

Callbacks

Returns a supervisable graph child_spec

Returns the graph configuration

Deletes a quad from the graph

Queries the graph

Queries the graph with specific query options

Gets the shape of a query

Writes a quad to the graph

Link to this section Types

Link to this type t_delete() View Source
t_delete() :: :ok | {:error, String.t()}
Link to this type t_query() View Source
t_query() :: any() | {:error, String.t()}
Link to this type t_write() View Source
t_write() :: :ok | {:error, String.t()}

Link to this section Callbacks

Link to this callback child_spec(_ignored) View Source
child_spec(_ignored :: term()) :: Supervisor.Spec.spec()

Returns a supervisable graph child_spec.

Returns the graph configuration.

Link to this callback delete(arg0) View Source
delete(map() | [map()]) :: t_delete()

Deletes a quad from the graph.

Queries the graph.

Link to this callback query(arg0, list) View Source
query(String.t(), list()) :: t_query()

Queries the graph with specific query options.

Gets the shape of a query.

Link to this callback write(arg0) View Source
write(map() | [map()]) :: t_write()

Writes a quad to the graph.