Caylir v0.11.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.

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(quad, opts) View Source
delete(quad :: map() | [map()], opts :: Keyword.t()) :: t_delete()

Deletes a quad from the graph.

Link to this callback

query(query, opts) View Source
query(query :: String.t(), opts :: Keyword.t()) :: t_query()

Queries the graph.

Link to this callback

shape(query, opts) View Source
shape(query :: String.t(), opts :: Keyword.t()) :: t_query()

Gets the shape of a query.

Link to this callback

write(quad, opts) View Source
write(quad :: map() | [map()], opts :: Keyword.t()) :: t_write()

Writes a quad to the graph.