All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.funkode.arangodb.ArangoGraphCollection.scala Maven / Gradle / Ivy

There is a newer version: 0.3.6
Show newest version
/*
 * Copyright 2022 Carlos Verdes
 *
 * SPDX-License-Identifier: MIT
 */

package io.funkode.arangodb

import model.*
import protocol.*
import ArangoMessage.*

class ArangoGraphCollection[Encoder[_], Decoder[_]](
    databaseName: DatabaseName,
    graphName: GraphName,
    collectionName: CollectionName
)(using
    arangoClient: ArangoClient[Encoder, Decoder]
):

  def name: CollectionName = collectionName

  def vertex(key: DocumentKey): ArangoGraphVertex[Encoder, Decoder] =
    new ArangoGraphVertex[Encoder, Decoder](databaseName, graphName, DocumentHandle(name, key))

  def edge(key: DocumentKey): ArangoGraphEdge[Encoder, Decoder] =
    new ArangoGraphEdge[Encoder, Decoder](databaseName, graphName, DocumentHandle(name, key))




© 2015 - 2025 Weber Informatics LLC | Privacy Policy