Arcadic.Geo (Arcadic v0.7.1)

Copy Markdown View Source

ArcadeDB geospatial index DDL — tenant-blind GEOSPATIAL index create/drop, parallel to Arcadic.FullText's single-property form.

The type/property names are the only injection surfaces (interpolated behind Arcadic.Identifier, closed by construction) — GEOSPATIAL indexes take no query text, so there is no params-binding surface analogous to FULL_TEXT's SEARCH_INDEX. Geospatial querying itself (e.g. a distance(...) computation or the geo.* predicate family) rides ordinary Arcadic.query/4 and is out of scope here.

Summary

Functions

Creates a GEOSPATIAL index on type.property (idempotent — IF NOT EXISTS unless if_not_exists: false). Value-free on a bad identifier / unknown opt.

Creates a GEOSPATIAL index, raising on error.

Drops a GEOSPATIAL index (idempotent — IF EXISTS).

Drops a GEOSPATIAL index, raising on error.

Functions

create_index(conn, type, property, opts \\ [])

@spec create_index(Arcadic.Conn.t(), String.t(), String.t(), keyword()) ::
  :ok | {:error, atom() | Exception.t()}

Creates a GEOSPATIAL index on type.property (idempotent — IF NOT EXISTS unless if_not_exists: false). Value-free on a bad identifier / unknown opt.

create_index!(conn, type, property, opts \\ [])

@spec create_index!(Arcadic.Conn.t(), String.t(), String.t(), keyword()) :: :ok

Creates a GEOSPATIAL index, raising on error.

drop_index(conn, type, property)

@spec drop_index(Arcadic.Conn.t(), String.t(), String.t()) ::
  :ok | {:error, atom() | Exception.t()}

Drops a GEOSPATIAL index (idempotent — IF EXISTS).

drop_index!(conn, type, property)

@spec drop_index!(Arcadic.Conn.t(), String.t(), String.t()) :: :ok

Drops a GEOSPATIAL index, raising on error.