avokka.arangodb.models

Members list

Packages

Type members

Classlikes

final case class CollectionChecksum(checksum: String, revision: String)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CollectionCount(count: Long)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CollectionCreate(name: CollectionName, distributeShardsLike: String, doCompact: Boolean, indexBuckets: Option[Long], isSystem: Boolean, isVolatile: Boolean, journalSize: Option[Long], keyOptions: Option[KeyOptions], numberOfShards: Long, replicationFactor: Long, shardKeys: List[String], shardingStrategy: Option[String], smartJoinAttribute: Option[String], `type`: CollectionType, waitForSync: Boolean, waitForSyncReplication: Int, enforceReplicationFactor: Int, schema: Option[CollectionSchema])

Value parameters

`type`

(The default is 2): the type of the collection to create. The following values for type are valid: - 2: document collection - 3: edge collection

distributeShardsLike

(The default is ""): in an Enterprise Edition cluster, this attribute binds the specifics of sharding for the newly created collection to follow that of a specified existing collection. Note: Using this parameter has consequences for the prototype collection. It can no longer be dropped, before the sharding-imitating collections are dropped. Equally, backups and restores of imitating collections alone will generate warnings (which can be overridden) about missing sharding prototype.

doCompact

whether or not the collection will be compacted (default is true) This option is meaningful for the MMFiles storage engine only.

enforceReplicationFactor

Default is 1 which means the server will check if there are enough replicas available at creation time and bail out otherwise. Set to 0 to disable this extra check.

indexBuckets

The number of buckets into which indexes using a hash table are split. The default is 16 and this number has to be a power of 2 and less than or equal to 1024. For very large collections one should increase this to avoid long pauses when the hash table has to be initially built or resized, since buckets are resized individually and can be initially built in parallel. For example, 64 might be a sensible value for a collection with 100 000 000 documents. Currently, only the edge index respects this value, but other index types might follow in future ArangoDB versions. Changes (see below) are applied when the collection is loaded the next time. This option is meaningful for the MMFiles storage engine only.

isSystem

If true, create a system collection. In this case collection-name should start with an underscore. End users should normally create non-system collections only. API implementors may be required to create system collections in very special occasions, but normally a regular collection will do. (The default is false)

isVolatile

If true then the collection data is kept in-memory only and not made persistent. Unloading the collection will cause the collection data to be discarded. Stopping or re-starting the server will also cause full loss of data in the collection. Setting this option will make the resulting collection be slightly faster than regular collections because ArangoDB does not enforce any synchronization to disk and does not calculate any CRC checksums for datafiles (as there are no datafiles). This option should therefore be used for cache-type collections only, and not for data that cannot be re-created otherwise. (The default is false) This option is meaningful for the MMFiles storage engine only.

journalSize

The maximal size of a journal or datafile in bytes. The value must be at least 1048576 (1 MiB). (The default is a configuration parameter) This option is meaningful for the MMFiles storage engine only.

keyOptions

additional options for key generation

name

The name of the collection.

numberOfShards

(The default is 1): in a cluster, this value determines the number of shards to create for the collection. In a single server setup, this option is meaningless.

replicationFactor

(The default is 1): in a cluster, this attribute determines how many copies of each shard are kept on different DBServers. The value 1 means that only one copy (no synchronous replication) is kept. A value of k means that k-1 replicas are kept. Any two copies reside on different DBServers. Replication between them is synchronous, that is, every write operation to the "leader" copy will be replicated to all "follower" replicas, before the write operation is reported successful. If a server fails, this is detected automatically and one of the servers holding copies take over, usually without an error being reported.

schema

Optional object that specifies the collection level schema for documents. The attribute keys rule, level and message must follow the rules documented in Document Schema Validation

shardKeys

(The default is [ "_key" ]): in a cluster, this attribute determines which document attributes are used to determine the target shard for documents. Documents are sent to shards based on the values of their shard key attributes. The values of all shard key attributes in a document are hashed, and the hash value is used to determine the target shard. Note: Values of shard key attributes cannot be changed once set. This option is meaningless in a single server setup.

shardingStrategy

This attribute specifies the name of the sharding strategy to use for the collection. Since ArangoDB 3.4 there are different sharding strategies to select from when creating a new collection. The selected shardingStrategy value will remain fixed for the collection and cannot be changed afterwards. This is important to make the collection keep its sharding settings and always find documents already distributed to shards using the same initial sharding algorithm. The available sharding strategies are: - community-compat: default sharding used by ArangoDB Community Edition before version 3.4 - enterprise-compat: default sharding used by ArangoDB Enterprise Edition before version 3.4 - enterprise-smart-edge-compat: default sharding used by smart edge collections in ArangoDB Enterprise Edition before version 3.4 - hash: default sharding used for new collections starting from version 3.4 (excluding smart edge collections) - enterprise-hash-smart-edge: default sharding used for new smart edge collections starting from version 3.4 If no sharding strategy is specified, the default will be hash for all collections, and enterprise-hash-smart-edge for all smart edge collections (requires the Enterprise Edition of ArangoDB). Manually overriding the sharding strategy does not yet provide a benefit, but it may later in case other sharding strategies are added.

smartJoinAttribute

In an Enterprise Edition cluster, this attribute determines an attribute of the collection that must contain the shard key value of the referred-to smart join collection. Additionally, the shard key for a document in this collection must contain the value of this attribute, followed by a colon, followed by the actual primary key of the document. This feature can only be used in the Enterprise Edition and requires the distributeShardsLike attribute of the collection to be set to the name of another collection. It also requires the shardKeys attribute of the collection to be set to a single shard key attribute, with an additional ':' at the end. A further restriction is that whenever documents are stored or updated in the collection, the value stored in the smartJoinAttribute must be a string.

waitForSync

If true then the data is synchronized to disk before returning from a document create, update, replace or removal operation. (default: false)

waitForSyncReplication

Default is 1 which means the server will only report success back to the client if all replicas have created the collection. Set to 0 if you want faster server responses and don't care about full replication.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CollectionInfo(id: String, name: CollectionName, status: CollectionStatus, `type`: CollectionType, isSystem: Boolean, globallyUniqueId: String)

collection information

collection information

Value parameters

`type`

type of the collection

globallyUniqueId

unique id of the collection

id

identifier of the collection

isSystem

if true then the collection is a system collection

name

name of the collection

status

status of the collection

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CollectionProperties(doCompact: Option[Boolean], globallyUniqueId: Option[String], id: Option[String], indexBuckets: Option[Int], isSystem: Boolean, isVolatile: Option[Boolean], journalSize: Option[Int], keyOptions: KeyOptions, name: CollectionName, status: Option[CollectionStatus], statusString: Option[String], `type`: Option[CollectionType], waitForSync: Boolean, minReplicationFactor: Option[Int], numberOfShards: Option[Int], replicationFactor: Option[Int], shardKeys: Option[List[String]], shardingStrategy: Option[String], smartGraphAttribute: Option[String], schema: Option[CollectionSchema])

Value parameters

`type`

The type of the collection: - 0: "unknown" - 2: regular document collection - 3: edge collection

doCompact

Whether or not the collection will be compacted. This option is only present for the MMFiles storage engine.

globallyUniqueId

Unique identifier of the collection

id

unique identifier of the collection; deprecated

indexBuckets

the number of index buckets Only relevant for the MMFiles storage engine

isSystem

true if this is a system collection; usually name will start with an underscore.

isVolatile

If true then the collection data will be kept in memory only and ArangoDB will not write or sync the data to disk. This option is only present for the MMFiles storage engine.

journalSize

The maximal size setting for journals / datafiles in bytes. This option is only present for the MMFiles storage engine.

minReplicationFactor

contains how many minimal copies of each shard need to be in sync on different DBServers. The shards will refuse to write, if we have less then these many copies in sync. Cluster specific attribute.

name

literal name of this collection

numberOfShards

The number of shards of the collection; Cluster specific attribute.

replicationFactor

contains how many copies of each shard are kept on different DBServers.; Cluster specific attribute.

shardKeys

contains the names of document attributes that are used to determine the target shard for documents; Cluster specific attribute.

shardingStrategy

the sharding strategy selected for the collection; Cluster specific attribute. One of 'hash' or 'enterprise-hash-smart-edge'

smartGraphAttribute

Attribute that is used in smart graphs, Cluster specific attribute.

status

corrosponds to statusString; Only relevant for the MMFiles storage engine - 0: "unknown" - may be corrupted - 1: (deprecated, maps to "unknown") - 2: "unloaded" - 3: "loaded" - 4: "unloading" - 5: "deleted" - 6: "loading"

statusString

any of: ["unloaded", "loading", "loaded", "unloading", "deleted", "unknown"] Only relevant for the MMFiles storage engine

waitForSync

If true then creating, changing or removing documents will wait until the data has been synchronized to disk.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CollectionRevision(revision: String)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CollectionSchema(rule: VPack, level: String, message: String)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed abstract class CollectionStatus(val value: Int) extends IntEnumEntry

Attributes

Companion
object
Supertypes
class IntEnumEntry
trait ValueEnumEntry[Int]
class Object
trait Matchable
class Any
Known subtypes
object Deleted.type
object Loaded.type
object Unknown.type
object CollectionStatus extends IntEnum[CollectionStatus], VPackValueEnum[Int, CollectionStatus]

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
trait VPackValueEnum[Int, CollectionStatus]
trait IntEnum[CollectionStatus]
trait ValueEnum[Int, CollectionStatus]
class Object
trait Matchable
class Any
Show all
Self type
sealed abstract class CollectionType(val value: Int) extends IntEnumEntry

Attributes

Companion
object
Supertypes
class IntEnumEntry
trait ValueEnumEntry[Int]
class Object
trait Matchable
class Any
Known subtypes
object Document.type
object Edge.type
object Unknown.type
object CollectionType extends IntEnum[CollectionType], VPackValueEnum[Int, CollectionType]

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
trait VPackValueEnum[Int, CollectionType]
trait IntEnum[CollectionType]
trait ValueEnum[Int, CollectionType]
class Object
trait Matchable
class Any
Show all
Self type
final case class Cursor[T](cached: Boolean, count: Option[Long], extra: Option[Extra], hasMore: Boolean, id: Option[String], result: Vector[T])

Value parameters

cached

a boolean flag indicating whether the query result was served from the query cache or not. If the query result is served from the query cache, the extra return attribute will not contain any stats sub-attribute and no profile sub-attribute.

count

the total number of result documents available (only available if the query was executed with the count attribute set)

extra

an optional JSON object with extra information about the query result contained in its stats sub-attribute. For data-modification queries, the extra.stats sub-attribute will contain the number of modified documents and the number of documents that could not be modified due to an error (if ignoreErrors query option is specified)

hasMore

A boolean indicator whether there are more results available for the cursor on the server

id

id of temporary cursor created on the server (optional, see above)

result

an array of result documents (might be empty if query has no results)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Cursor

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Cursor.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class DatabaseInfo(name: DatabaseName, id: String, path: String, isSystem: Boolean)

database information

database information

Value parameters

id

database id

isSystem

whether or not the current database is the _system database

name

database name

path

filesystem path

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DatabaseInfo

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class DeleteResult(id: String)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DeleteResult

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Document[T](_id: DocumentHandle, _key: DocumentKey, _rev: DocumentRevision, `new`: Option[T], old: Option[T], _oldRev: Option[DocumentRevision])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Document

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Document.type
case class Engine(name: Name, supports: Supports)

the storage engine the server is configured to use

the storage engine the server is configured to use

Value parameters

name

will be mmfiles or rocksdb

supports

what the engine supports

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Engine

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Engine.type
final case class GraphCollections(collections: Vector[CollectionName])

Value parameters

collections

list of collections

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class GraphEdge[T](edge: T)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object GraphEdge

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
GraphEdge.type
final case class GraphEdgeDefinition(collection: CollectionName, from: List[CollectionName], to: List[CollectionName])

A definition for the relations of the graph

A definition for the relations of the graph

Value parameters

collection

Name of the edge collection, where the edge are stored in.

from

List of vertex collection names. Edges in collection can only be inserted if their _from is in any of the collections here.

to

List of vertex collection names. Edges in collection can only be inserted if their _to is in any of the collections here.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class GraphInfo(_id: String, _rev: String, name: GraphName, edgeDefinitions: List[GraphEdgeDefinition], minReplicationFactor: Option[Int], numberOfShards: Option[Int], orphanCollections: List[CollectionName], replicationFactor: Option[Int], isSmart: Boolean, smartGraphAttribute: Option[String])

The information about a graph

The information about a graph

Value parameters

_id

The internal id value of this graph.

_rev

The revision of this graph. Can be used to make sure to not override concurrent modifications to this graph.

edgeDefinitions

An array of definitions for the relations of the graph. Each has the following type:

isSmart

Flag if the graph is a SmartGraph (Enterprise Edition only) or not.

minReplicationFactor

The minimal replication factor used for every new collection in the graph. If one shard has less than minReplicationFactor copies, we cannot write to this shard, but to all others.

name

The name of the graph.

numberOfShards

Number of shards created for every new collection in the graph.

orphanCollections

An array of additional vertex collections. Documents within these collections do not have edges within this graph.

replicationFactor

The replication factor used for every new collection in the graph.

smartGraphAttribute

The name of the sharding attribute in smart graph case (Enterprise Edition only)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object GraphInfo

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
GraphInfo.type
final case class GraphList(graphs: Vector[GraphInfo])

Value parameters

graphs

list of graph representations

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object GraphList

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
GraphList.type
case class GraphVertex[T](vertex: T)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object GraphVertex

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Index(fields: List[String], id: String, name: String, `type`: Type, isNewlyCreated: Boolean, selectivityEstimate: Option[Double], sparse: Option[Boolean], unique: Option[Boolean], deduplicate: Option[Boolean])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Index

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Index.type
final case class IndexList(indexes: List[Index], identifiers: Map[String, Index])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object IndexList

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
IndexList.type
final case class Query[V](query: String, bindVars: V, batchSize: Option[Long], cache: Option[Boolean], count: Option[Boolean], memoryLimit: Option[Long], options: Option[Options], ttl: Option[Long])

Value parameters

batchSize

maximum number of result documents to be transferred from the server to the client in one roundtrip. If this attribute is not set, a server-controlled default value will be used. A batchSize value of 0 is disallowed.

bindVars

key/value pairs representing the bind parameters.

cache

flag to determine whether the AQL query results cache shall be used. If set to false, then any query cache lookup will be skipped for the query. If set to true, it will lead to the query cache being checked for the query if the query cache mode is either on or demand.

count

indicates whether the number of documents in the result set should be returned in the "count" attribute of the result. Calculating the "count" attribute might have a performance impact for some queries in the future so this option is turned off by default, and "count" is only returned when requested.

memoryLimit

the maximum number of memory (measured in bytes) that the query is allowed to use. If set, then the query will fail with error "resource limit exceeded" in case it allocates too much memory. A value of 0 indicates that there is no memory limit.

query

contains the query string to be executed

ttl

The time-to-live for the cursor (in seconds). The cursor will be removed on the server automatically after the specified amount of time. This is useful to ensure garbage collection of cursors that are not fully fetched by clients. If not set, a server-defined value will be used (default: 30 seconds).

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Query

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Query.type
final case class RemovedResult(removed: Boolean)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object RemovedResult

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Result[T](result: T)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Result

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Result.type
case class ServerRole(role: String)

the role of a server in a cluster

the role of a server in a cluster

Value parameters

role

role of server

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ServerRole

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
ServerRole.type
case class Transaction(id: TransactionId, status: String)

describing a transaction

describing a transaction

Value parameters

id

identifier of the transaction

status

status of the transaction “running”, “committed” or “aborted”

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Transaction

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class TransactionList(transactions: List[Transaction])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class Version(server: String, license: String, version: String, details: Map[String, String])

Value parameters

details

additional information about included components and their versions

license

the server license

server

will always contain arango

version

the server version string. The string has the format "major.minor.sub". major and minor will be numeric, and sub may contain a number or a textual version

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Version

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Version.type
case class Wal(tick: String, `type`: WalType, db: DatabaseName, cuid: Option[String], data: VObject)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Wal

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Wal.type
sealed abstract class WalType(val value: Int) extends IntEnumEntry

Attributes

Companion
object
Supertypes
class IntEnumEntry
trait ValueEnumEntry[Int]
class Object
trait Matchable
class Any
Known subtypes
object AbortTransaction.type
object ChangeCollection.type
object ChangeView.type
object CommitTransaction.type
object CreateCollection.type
object CreateDatabase.type
object CreateIndex.type
object CreateView.type
object DropCollection.type
object DropDatabase.type
object DropIndex.type
object DropView.type
object InsertReplaceDocument.type
object RemoveDocument.type
object RenameCollection.type
object StartTransaction.type
object TruncateCollection.type
Show all
object WalType extends IntEnum[WalType], VPackValueEnum[Int, WalType]

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
trait VPackValueEnum[Int, WalType]
trait IntEnum[WalType]
trait ValueEnum[Int, WalType]
class Object
trait Matchable
class Any
Show all
Self type
WalType.type