Skip to content

Alternative to Gremlin.Net that supports strongly-typed queries, vertex<->C# class mapping, and client pooling. Also supports Azure CosmosDB.

License

Notifications You must be signed in to change notification settings

gregjesl/CuriousGremlin

Repository files navigation

Build status

CuriousGremlin

CuriousGremlin is an alternative to Gremlin.Net that offers:

  • Strongly-typed Gremlin queries
  • Automatic mapping between C# classes and graph objects (Vertices and Edges)
  • Graph client pooling
  • Azure CosmosDB support
  • .NET Framework and .NET Core support

Quickstart

  1. Generate a query:
using CuriousGremlin;

var query = VertexQuery.Create("label_name").Property("key_name", "value");
  1. Execute the query:
using CuriousGremlin.AzureCosmosDB;
...
var client = new GraphClient(endpoint, authKey);
using(client)
{
	await client.Open("database_name", "collection_name");
	var result = client.Execute(query);
}
  1. Manipulate results
using CuriousGremlin.Objects;
...
foreach(GraphVertex item in result)
{
	Console.WriteLine("Vertex ID: " + item.id);
	Console.WriteLine("Vertex Label: " + item.label);
}

Organization

  1. CuriousGremlin - .NET Standard library for strongly-typed Gremlin queries
  2. CuriousGremlin.AzureCosmosDB - A shared library containing a client for Azure CosmosDB used in the following two projects.
  3. CuriousGremlin.AzureCosmosDB.Framework - .NET Framework library for interfacing with Azure CosmosDB (using the Gremlin.Net NuGet package)
  4. CuriousGremlin.AzureCosmosDB.Core - .NET Core library for interfacing with Azure CosmosDB (uses Microsoft Azure CosmosDB NuGet package)
  5. [CuriousGremlin.UnitTests] - Shared library containing unit tests
  6. CuriousGremlin.UnitTests.Framework - Implementation of unit tests using the Azure CosmosDB emulator

Testing

In order to run the unit tests, the Azure CosmosDB emulator must be installed and running on the local machine. The unit tests assume default credentials when running the tests.

About

Alternative to Gremlin.Net that supports strongly-typed queries, vertex<->C# class mapping, and client pooling. Also supports Azure CosmosDB.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages