View Source ArangoXEcto.Migration.Index (ArangoX Ecto v2.0.0)

Used internally by the ArangoXEcto migration.

To define an index in a migration, see ArangoXEcto.Migration.index/3.

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.

Summary

Functions

Creates a new Index struct

Types

index_option()

@type index_option() ::
  {:type, atom()}
  | {:prefix, String.t()}
  | {:unique, boolean()}
  | {:sparse, boolean()}
  | {:deduplication, boolean()}
  | {:minLength, integer()}
  | {:geoJson, boolean()}
  | {:expireAfter, integer()}
  | {:name, atom()}

t()

@type t() :: %ArangoXEcto.Migration.Index{
  collection_name: String.t(),
  deduplication: boolean() | nil,
  expireAfter: integer() | nil,
  fields: [atom()],
  geoJson: boolean() | nil,
  minLength: integer() | nil,
  name: String.t(),
  prefix: String.t() | nil,
  sparse: boolean() | nil,
  type: :hash,
  unique: boolean() | nil
}

Functions

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

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

Creates a new Index struct