Scarango

Build Status Codacy Badge Codacy Badge Stories in Ready Gitter Maven Central Latest version

ArangoDB client written in Scala

Setup

Scarango is published to Sonatype OSS and Maven Central currently supporting Scala and Scala.js (core only) on 2.11 and 2.12.

Configuring the driver in SBT requires:

libraryDependencies += "com.outr" %% "scarango-driver" % "2.0.0"

Introduction

Scarango uses ArangoDB's HTTP end-points providing true asynchronous and non-blocking access to the database. We utilize Scala Futures in order to handle asynchronous responses. This library has two main layers of abstraction. The first is meant to be a bare-metal wrapper around the HTTP end-points to expose the maximum capabilities of the database for use. The second layer is a higher level of abstraction to simplify management of the database while still providing flexiblity and control. In the following examples we'll focus primarily on the second layer as it's generally the preferred. However, for examples of the first layer take a look at the tests for simple and straight-forward examples of use.

Getting Started

This needs to be updated with instructions for 2.0, but for now, take a look at https://github.com/outr/scarango/blob/master/driver/src/test/scala/spec/GraphSpec.scala

Versions

Features for 2.1.0 (In-Progress)

  • "Modify" convenience functionality to use Field to filter and set values without having to modify individually or replace the entire document (generates AQL)
  • DSL for creating AQL queries
  • Versioned Document functionality (replace and delete creates duplicate in another collection instead of updating)
  • Scala.js wrapper for Foxx framework

Features for 2.0.0 (Released 2019.06.25)

  • Generated integration with ArangoDB via Swagger
  • Scala.js core
  • Cleaner structure and functionality

Features for 0.8.0 (Released 2017.08.31)

  • Support for sequences in AQL queries
  • Support for null in AQL queries
  • Support for Option in AQL queries
  • Support for Boolean in AQL queries
  • Support for BigDecimal in AQL queries

Features for 0.7.0 (Released 2017.07.25)

  • Replace use of Typesafe Config with Profig for better support
  • Update driver for ArangoDB 3.2 changes
  • Test and update driver for RocksDB backing datastorage

Features for 0.6.0 (Released 2017.06.23)

  • Seamless Re-Authentication support for token timeout

Features for 0.5.0 (Released 2017.05.16)

  • Create Credentials support for better authentication paradigm
  • Support for Replication Logger (https://docs.arangodb.com/3.1/HTTP/Replications/ReplicationLogger.html)
  • Real-time change detection (upsert and deletion directly from the database) aka Triggers
  • AbstractCollection.modify feature to modify a document by supplying an original and modified case class only updating with the changes
  • Diff support for modify that properly handles null

Features for 0.4.0 (Released 2017.05.10)

  • Support for passing collection as reference in AQL interpolation
  • AQL execute convenience method for no results
  • AQL call convenience method for exactly one result
  • AQL first convenience method for optional first result
  • Complete Indexing support
  • Additional functionality for key/value collection (Map implementation)
  • Upsert functionality convenience functionality
  • Graph knowledge of all collections and Graph.init can optionally create all missing collections
  • Trigger based modified updates
  • Database Upgrade infrastructure
  • QueryResponsePagination to easily page through results
  • QueryResponseIterator to cleanly iterate over every result without loading everything into memory
  • Support ArangoDB with authentication disabled
  • Support AbstractCollection.replace by key to allow updating the document's key
  • Add support for Arango default configuration to be loaded optionally from typesafe.config

Features for 0.3.0 (Release 2017.04.28)

  • Renaming of project from arangodb-scala to scarango
  • Separation of core and driver for better re-use
  • Better documentation and examples

Features for 0.2.0 (Released 2017.04.28)

  • Higher level abstraction for working with documents
    • Triggers (Before and After)
    • Polymorphic Querying capabilities
    • Convenience functionality for adding and managing edges

Features for 0.1.0 (Released 2017.04.05)

  • Asynchronous client for all major HTTP end-points
  • Persist case classes
  • Query case classes
  • AQL compile-time validation