View Source ArangoXEcto.Migration.Index (ArangoX Ecto v1.3.1)

Represents a collection index in ArangoDB

The attributes in this struct are directly passed to the ArangoDB API for creation. No validation is done on the attributes and is left to the database to manage.

Link to this section Summary

Functions

Creates a new Index struct

Link to this section Types

@type index_option() ::
  {:type, atom()}
  | {:unique, boolean()}
  | {:sparse, boolean()}
  | {:deduplication, boolean()}
  | {:minLength, integer()}
  | {:geoJson, boolean()}
  | {:expireAfter, integer()}
  | {:name, atom()}
@type t() :: %ArangoXEcto.Migration.Index{
  collection_name: term(),
  deduplication: term(),
  expireAfter: term(),
  fields: term(),
  geoJson: term(),
  minLength: term(),
  name: term(),
  sparse: term(),
  type: term(),
  unique: term()
}

Link to this section Functions

Link to this function

new(name, fields, opts \\ [])

View Source
@spec new(String.t(), [atom() | String.t()], [index_option()]) :: t()

Creates a new Index struct