AshNeo4j.DataLayer.Info (AshNeo4j v0.1.1)

View Source

Introspection helpers for AshNeo4j.DataLayer

Summary

Functions

Converts an attribute name to a node property name string, translating if necessary The attribute name can be an Ash.Query.Ref or atom

Returns any matching Ash.Resource.Info relationship given relationship and destination node labels

Functions

convert_to_property_name(resource, ash_query_ref)

@spec convert_to_property_name(
  Ash.Resource.t(),
  struct()
) :: String.t() | nil
@spec convert_to_property_name(Ash.Resource.t(), atom()) :: String.t() | nil

Converts an attribute name to a node property name string, translating if necessary The attribute name can be an Ash.Query.Ref or atom

label(resource)

@spec label(Ash.Resource.t()) :: atom() | nil

node_relationship(resource, source_attribute)

@spec node_relationship(Ash.Resource.t(), atom() | String.t()) :: [tuple()] | nil

relate(resource)

@spec relate(Ash.Resource.t()) :: [tuple()] | nil

relationship(resource, relationship_label, dest_label)

@spec relationship(Ash.Resource.t(), atom(), atom()) :: struct() | nil

Returns any matching Ash.Resource.Info relationship given relationship and destination node labels

store(resource)

@spec store(Ash.Resource.t()) :: list() | nil

translate(resource)

@spec translate(Ash.Resource.t()) :: keyword() | nil