Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "documents"

import type { Document, Edge } from "arangojs/document";

The "document" module provides document/edge related types for TypeScript.

Index

Type aliases

Document

Document<T>: T & DocumentMetadata & Partial<EdgeMetadata>

Type representing a document stored in a collection.

Type parameters

  • T: object

DocumentData

DocumentData<T>: T & Partial<DocumentMetadata> & Partial<EdgeMetadata>

Type representing an object that can be stored in a collection.

Type parameters

  • T: object

DocumentMetadata

DocumentMetadata: { _id: string; _key: string; _rev: string }

Common ArangoDB metadata properties of a document.

Type declaration

  • _id: string

    Unique ID of the document, which is composed of the collection name and the document _key.

  • _key: string

    Key of the document, which uniquely identifies the document within its collection.

  • _rev: string

    Revision of the document data.

DocumentSelector

DocumentSelector: ObjectWithId | ObjectWithKey | string

A value that can be used to identify a document within a collection in arangojs methods, i.e. a partial ArangoDB document or the value of a document's _key or _id.

See DocumentMetadata.

Edge

Type representing an edge document stored in an edge collection.

Type parameters

  • T: object

EdgeData

EdgeData<T>: T & Partial<DocumentMetadata> & EdgeMetadata

Type representing an object that can be stored in an edge collection.

Type parameters

  • T: object

EdgeMetadata

EdgeMetadata: { _from: string; _to: string }

ArangoDB metadata defining the relations of an edge document.

Type declaration

  • _from: string

    Unique ID of the document that acts as the edge's start vertex.

  • _to: string

    Unique ID of the document that acts as the edge's end vertex.

ObjectWithId

ObjectWithId: { _id: string }

An object with an ArangoDB document _id property.

See DocumentMetadata.

Type declaration

  • [key: string]: any
  • _id: string

ObjectWithKey

ObjectWithKey: { _key: string }

An object with an ArangoDB document _key property.

See DocumentMetadata.

Type declaration

  • [key: string]: any
  • _key: string

Patch

Patch<T>: {}

Type representing patch data for a given object type to represent a payload ArangoDB can apply in a document PATCH request (i.e. a partial update).

This differs from Partial in that it also applies itself to any nested objects recursively.

Type parameters

  • T

Type declaration

Generated using TypeDoc