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

Represent a collection 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


Creates a new Collection struct

Link to this section Types

@type collection_option() ::
  {:waitForSync, boolean()}
  | {:schema, map()}
  | {:keyOptions, map()}
  | {:cacheEnabled, boolean()}
  | {:numberOfShards, integer()}
  | {:shardKeys, String.t()}
  | {:replicationFactor, integer()}
  | {:writeConcern, integer()}
  | {:distributeShardsLike, String.t()}
  | {:shardingStrategy, String.t()}
  | {:smartJoinAttribute, String.t()}
@type t() :: %ArangoXEcto.Migration.Collection{
  cacheEnabled: term(),
  distributeShardsLike: term(),
  keyOptions: term(),
  name: term(),
  numberOfShards: term(),
  replicationFactor: term(),
  schema: term(),
  shardKeys: term(),
  shardingStrategy: term(),
  smartJoinAttribute: term(),
  type: term(),
  waitForSync: term(),
  writeConcern: term()

Link to this section Functions

Link to this function

new(name, type \\ :document, opts \\ [])

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

Creates a new Collection struct