# AshNeo4j v0.8.0 - Table of Contents

> Ash DataLayer for Neo4j

## Pages

- [Home](readme.md)
- [License](mit.md)

- How To
  - [AshNeo4j Livebook](ash_neo4j_datalayer.md)

- DSLs
  - [AshNeo4j.DataLayer](dsl-ashneo4j-datalayer.md)

- About AshNeo4j
  - [Change Log](changelog.md)

## Modules

- AshNeo4j
  - [AshNeo4j](AshNeo4j.md): Top-level helpers for the AshNeo4j data layer.
  - [AshNeo4j.DataLayer](AshNeo4j.DataLayer.md): Ash DataLayer for Neo4j
  - [AshNeo4j.Sandbox](AshNeo4j.Sandbox.md): Test sandbox for AshNeo4j, analogous to `Ecto.Adapters.SQL.Sandbox`.

- Introspection
  - [AshNeo4j.DataLayer.Info](AshNeo4j.DataLayer.Info.md): Introspection helpers for AshNeo4j.DataLayer
  - [AshNeo4j.EdgeDescriptor](AshNeo4j.EdgeDescriptor.md): Describes a single graph edge from a resource's perspective.
  - [AshNeo4j.Resource.Info](AshNeo4j.Resource.Info.md): Resource information for AshNeo4j.DataLayer
  - [AshNeo4j.ResourceMapping](AshNeo4j.ResourceMapping.md): A compile-time description of how an Ash resource maps to the Neo4j graph.

- Cypher
  - [AshNeo4j.Cypher](AshNeo4j.Cypher.md): AshNeo4j Cypher
Functions for converting Elixir data structures to Cypher query components and running Cypher queries against a Neo4j database.
Ideally has no specific knowledge of Ash
  - [AshNeo4j.Cypher.Call](AshNeo4j.Cypher.Call.md): `CALL { … }` block joining pre-rendered branch cyphers with `UNION` or
`UNION ALL`. Used for native combination-query pushdown (`:union`,
`:union_all`).
  - [AshNeo4j.Cypher.Create](AshNeo4j.Cypher.Create.md): CREATE clause. `pattern` is a Cypher pattern string, e.g. `"(n:Actor {name: $n_name})"`.
  - [AshNeo4j.Cypher.Delete](AshNeo4j.Cypher.Delete.md): DELETE clause. `items` is a list of variables to delete, e.g. `["r"]`.
  - [AshNeo4j.Cypher.DetachDelete](AshNeo4j.Cypher.DetachDelete.md): DETACH DELETE clause.
  - [AshNeo4j.Cypher.Limit](AshNeo4j.Cypher.Limit.md): LIMIT clause.
  - [AshNeo4j.Cypher.Match](AshNeo4j.Cypher.Match.md): MATCH clause. `pattern` is a Cypher pattern string, e.g. `"(s:Actor)"`.
  - [AshNeo4j.Cypher.Merge](AshNeo4j.Cypher.Merge.md): MERGE clause. `pattern` is a Cypher pattern string.
  - [AshNeo4j.Cypher.OptionalMatch](AshNeo4j.Cypher.OptionalMatch.md): OPTIONAL MATCH clause.
  - [AshNeo4j.Cypher.OrderBy](AshNeo4j.Cypher.OrderBy.md): ORDER BY clause. Each term is a `{property_expression, :asc | :desc}` pair.
  - [AshNeo4j.Cypher.Query](AshNeo4j.Cypher.Query.md): Typed representation of a Cypher query, and builders for constructing common patterns.
  - [AshNeo4j.Cypher.Remove](AshNeo4j.Cypher.Remove.md): REMOVE clause. `items` is a list of property references, e.g. `["n.born"]`.
  - [AshNeo4j.Cypher.Return](AshNeo4j.Cypher.Return.md): RETURN clause.
  - [AshNeo4j.Cypher.Set](AshNeo4j.Cypher.Set.md): SET clause. `expression` is the full SET expression, e.g. `"n += {born: $n_born}"`.
  - [AshNeo4j.Cypher.Skip](AshNeo4j.Cypher.Skip.md): SKIP clause.
  - [AshNeo4j.Cypher.Where](AshNeo4j.Cypher.Where.md): WHERE clause. Each entry in `conditions` is ANDed together.
  - [AshNeo4j.Cypher.With](AshNeo4j.Cypher.With.md): WITH clause.

- Utilities
  - [AshNeo4j.BoltyHelper](AshNeo4j.BoltyHelper.md): AshNeo4j BoltyHelper

  - [AshNeo4j.Neo4jHelper](AshNeo4j.Neo4jHelper.md): AshNeo4j DataLayer Neo4j Helper

  - [AshNeo4j.QueryHelper](AshNeo4j.QueryHelper.md): AshNeo4j DataLayer QueryHelper

  - [AshNeo4j.Util](AshNeo4j.Util.md): AshNeo4j Util

- Internals
  - [AshNeo4j.DataLayer.Cast](AshNeo4j.DataLayer.Cast.md): Casting for AshNeo4j.DataLayer
  - [AshNeo4j.DataLayer.Domain](AshNeo4j.DataLayer.Domain.md): Domain-level DSL extension for AshNeo4j.
  - [AshNeo4j.DataLayer.Domain.Info](AshNeo4j.DataLayer.Domain.Info.md): Introspection helpers for AshNeo4j.DataLayer.Domain
  - [AshNeo4j.DataLayer.Dump](AshNeo4j.DataLayer.Dump.md): Dumping for AshNeo4j.DataLayer
  - [AshNeo4j.DataLayer.TypeClassifier](AshNeo4j.DataLayer.TypeClassifier.md): Type Classifier for AshNeo4j.DataLayer
  - [AshNeo4j.Functions.StClosestPoint](AshNeo4j.Functions.StClosestPoint.md): `st_closest_point(collection, point)` — returns the closest vertex from
a multi-vertex geometry to a target point. Mirrors ash_geo / PostGIS
`ST_ClosestPoint`. v1 supports
  - [AshNeo4j.Functions.StContains](AshNeo4j.Functions.StContains.md): Spatial containment — true if the first geometry contains the second.
  - [AshNeo4j.Functions.StDistance](AshNeo4j.Functions.StDistance.md): Geodesic distance between two geometries, in meters. Mirrors ash_geo /
PostGIS `ST_Distance`. Post #274 every geometry arrives as a
`%Geo.*{}` struct.
  - [AshNeo4j.Functions.StDistanceInMeters](AshNeo4j.Functions.StDistanceInMeters.md): Alias for `st_distance`. PostGIS distinguishes the two because PostGIS
`ST_Distance` returns degrees for geographic types unless cast; Neo4j's
`point.distance` is always meters for WGS-84, so the distinction is
cosmetic for us. This module exists for API parity with ash_geo so
consumer code reads identically across data layers.
  - [AshNeo4j.Functions.StDwithin](AshNeo4j.Functions.StDwithin.md): True if two geometries are within a given distance of each other.
Mirrors ash_geo / PostGIS `ST_DWithin`. v1 supports point-point only,
with the threshold in meters (geodesic, WGS-84).
  - [AshNeo4j.Functions.StIntersects](AshNeo4j.Functions.StIntersects.md): `st_intersects(a, b)` — true if two geometries share any space. Mirrors
ash_geo / PostGIS `ST_Intersects`. Exact, via
[`topo`](https://hex.pm/packages/topo) on the `%Geo.*{}` geometries
(#267) — handles any combination of Point / LineString / Polygon /
Multi* directly, including segment-edge crossings.
  - [AshNeo4j.Functions.StWithin](AshNeo4j.Functions.StWithin.md): `st_within(a, b)` — true if `a` is contained by `b`. Argument-flipped
`st_contains`. Mirrors ash_geo / PostGIS `ST_Within`.
  - [AshNeo4j.Geo](AshNeo4j.Geo.md): Geodesic geometry primitives for the in-memory side of AshNeo4j's
spatial predicates.
  - [AshNeo4j.GeoJson](AshNeo4j.GeoJson.md): RFC 7946 GeoJSON encoder/decoder over the `:geo` library.
  - [AshNeo4j.Spatial](AshNeo4j.Spatial.md): Convenience helpers for creating the Neo4j POINT indexes that back
AshNeo4j's spatial pushdown (#275).
  - [AshNeo4j.Verifiers.VerifyAttributeType](AshNeo4j.Verifiers.VerifyAttributeType.md): Verifies that attribute types are supported by AshNeo4j.DataLayer
  - [AshNeo4j.Verifiers.VerifyEnrichable](AshNeo4j.Verifiers.VerifyEnrichable.md): Verifies that relate is unique so relationships are enrichable
  - [AshNeo4j.Verifiers.VerifyGuard](AshNeo4j.Verifiers.VerifyGuard.md): Verifies that each guard is a node relationship meeting Neo4j conventions
  - [AshNeo4j.Verifiers.VerifyLabelsPascalCase](AshNeo4j.Verifiers.VerifyLabelsPascalCase.md): Verifies that Neo4j labels are PascalCase
  - [AshNeo4j.Verifiers.VerifyPropertiesCamelCase](AshNeo4j.Verifiers.VerifyPropertiesCamelCase.md): Verifies that Neo4j properties are camelCase
  - [AshNeo4j.Verifiers.VerifyRelate](AshNeo4j.Verifiers.VerifyRelate.md): Verifies that each relate relates to a relationship, and that the edge labels meets Neo4j conventions

## Mix Tasks

- Internals
  - [mix ash_neo4j.install](Mix.Tasks.AshNeo4j.Install.md): Installs AshNeo4j

