Last active
February 3, 2026 20:24
-
-
Save dacr/fd4a49035e71381320b5c889f851adc8 to your computer and use it in GitHub Desktop.
playing with arangodb using scarango client library / published by https://github.com/dacr/code-examples-manager #8333f36c-d6c2-4a83-897c-44ae8da1fd5c/2f616dd0d3b3330ac1d1883b9d6de762b441b8b1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env amm | |
| // summary : playing with arangodb using scarango client library | |
| // keywords : arangodb, graphdb, scarango, @testable, | |
| // publish : gist, corporate | |
| // authors : David Crosson | |
| // license : Apache License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) | |
| // id : 8333f36c-d6c2-4a83-897c-44ae8da1fd5c | |
| // created-on : 2021-03-05T09:25:00Z | |
| // managed-by : https://github.com/dacr/code-examples-manager | |
| // execution : scala ammonite script (http://ammonite.io/) - run as follow 'amm scriptname.sc' | |
| //interp.repositories() ++= Seq(coursierapi.MavenRepository.of("http://oss.sonatype.org/content/repositories/releases")) | |
| //import $ivy.`com.cornfluence:proteus_2.13:0.7.3` | |
| import $ivy.`com.charlesahunt::proteus:0.7.3` | |
| import cats.effect.IO | |
| import com.charlesahunt.proteus.client._ | |
| import com.charlesahunt.proteus.config.ProteusConfig | |
| val cfg = ProteusConfig( | |
| host = "127.0.0.1", | |
| user = "root@example", | |
| password = "password", | |
| ) | |
| val arangoClient = new ArangoClient[IO](cfg) | |
| val documentClient = new DocumentClient[IO](config = cfg, databaseName = "example") | |
| //val databases = arangoClient.getDatabaseList | |
| //databases.unsafeRunSync() match { | |
| // case Left(err) => println(err) | |
| // case Right(ok) => println(ok.toString) | |
| //} | |
| val docs = documentClient.getAllDocuments("sample") | |
| docs.unsafeRunSync() match { | |
| case Left(err) => println(err) | |
| case Right(ok) => println(ok.toString) | |
| } | |
| //val graphClient = new GraphClient[IO](config = cfg, graphName = "worldCountry") | |
| //arangoClient. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment