{"id":18257832,"url":"https://github.com/janusgraph/janusgraph-dotnet","last_synced_at":"2025-04-04T18:31:22.486Z","repository":{"id":37742921,"uuid":"144779078","full_name":"JanusGraph/janusgraph-dotnet","owner":"JanusGraph","description":"JanusGraph .NET Gremlin Language Variant (GLV)","archived":false,"fork":false,"pushed_at":"2023-11-27T10:45:44.000Z","size":227,"stargazers_count":23,"open_issues_count":6,"forks_count":6,"subscribers_count":16,"default_branch":"master","last_synced_at":"2023-11-27T11:48:19.061Z","etag":null,"topics":["dotnet","glv","gremlin","janusgraph"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JanusGraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt"}},"created_at":"2018-08-14T22:40:45.000Z","updated_at":"2023-12-20T15:28:09.328Z","dependencies_parsed_at":"2023-12-20T15:28:04.509Z","dependency_job_id":"77cfc9ad-874d-4af5-8f8d-269be22b0df9","html_url":"https://github.com/JanusGraph/janusgraph-dotnet","commit_stats":null,"previous_names":[],"tags_count":12,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanusGraph%2Fjanusgraph-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanusGraph%2Fjanusgraph-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanusGraph%2Fjanusgraph-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanusGraph%2Fjanusgraph-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JanusGraph","download_url":"https://codeload.github.com/JanusGraph/janusgraph-dotnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247229361,"owners_count":20905038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","glv","gremlin","janusgraph"],"created_at":"2024-11-05T10:27:52.120Z","updated_at":"2025-04-04T18:31:22.481Z","avatar_url":"https://github.com/JanusGraph.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JanusGraph.Net\n\nJanusGraph.Net extends Apache TinkerPop™'s [Gremlin.Net][gremlin.net] with\nsupport for [JanusGraph][janusgraph]-specific types.\n\n[![GitHub Workflow Status][actions-badge]][actions-url]\n[![Codacy Badge][codacy-badge]][codacy-url]\n[![Nuget][nuget-badge]][nuget-url]\n\n## Usage\n\nTo connect to JanusGraph Server, a `GremlinClient` instance needs to be\ncreated and configured with a message serializer that adds support for\nJanusGraph specific types.\n\nThis can be done like this for GraphSON 3:\n\n```cs\nvar client = new GremlinClient(new GremlinServer(\"localhost\", 8182),\n    new JanusGraphGraphSONMessageSerializer());\n```\n\nor like this for GraphBinary (see\n[Serialization Formats](#serialization-formats) for more information about\nGraphSON 3 and GraphBinary):\n\n```cs\nvar client = new GremlinClient(new GremlinServer(\"localhost\", 8182),\n    new GraphBinaryMessageSerializer(JanusGraphTypeSerializerRegistry.Instance));\n```\n\nNote that the client should be disposed on shut down to release resources and\nto close open connections with `client.Dispose()`.\nThe client can then be used to configure a `GraphTraversalSource`:\n\n```cs\n// Add this static using to be able to call `Traversal()` \"anonymously\"\nusing static Gremlin.Net.Process.Traversal.AnonymousTraversalSource;\n\nvar g = Traversal().WithRemote(new DriverRemoteConnection(client));\n// Reuse 'g' across the application\n```\n\nThe `GraphTraversalSource` `g` can now be used to spawn Gremlin traversals:\n\n```cs\nvar herculesAge = g.V().Has(\"demigod\", \"name\", \"hercules\").Values\u003cint\u003e(\"age\")\n    .Next();\nConsole.WriteLine($\"Hercules is {herculesAge} years old.\");\n```\n\nThe traversal can also be executed asynchronously by using `Promise()` which is\nrecommended as the underlying driver in Gremlin.Net also works\nasynchronously:\n\n```cs\nvar herculesAge = await g.V().Has(\"demigod\", \"name\", \"hercules\")\n    .Values\u003cint\u003e(\"age\")\n    .Promise(t =\u003e t.Next());\n```\n\nRefer to the chapter [Gremlin Query Language][gremlin-chapter] in the\nJanusGraph docs for an introduction to Gremlin and pointers to further\nresources.\nThe main syntactical difference for Gremlin.Net is that it follows .NET naming\nconventions, e.g., method names use PascalCase instead of camelCase.\n\n### Text Predicates\n\nThe `Text` class provides methods for\n[full-text and string searches][text-predicates]:\n\n```cs\nawait g.V().Has(\"demigod\", \"name\", Text.TextPrefix(\"herc\"))\n    .Promise(t =\u003e t.ToList());\n```\n\nThe other text predicates can be used the same way.\n\n### Geoshapes\n\nThe `Geoshape` class in the `JanusGraph.Net.Geoshapes` namespace can be used to\nconstruct [Geoshapes][geoshapes]:\n\n```cs\nawait g.V().Has(\"demigod\", \"name\", \"hercules\").OutE(\"battled\")\n    .Has(\"place\", Geoshape.Point(38.1f, 23.7f)).Count().Promise(t =\u003e t.Next());\n```\n\nOnly the `Point` Geoshape is supported right now.\n\n## Version Compatibility\n\nThe lowest supported JanusGraph version is 0.3.0.\nThe following table shows the supported JanusGraph versions for each version\nof JanusGraph.Net:\n\n| JanusGraph.Net | JanusGraph            |\n| -------------- | --------------------- |\n| 0.1.z          | 0.3.z                 |\n| 0.2.z          | 0.4.z, 0.5.z          |\n| 0.3.z          | 0.4.z, 0.5.z, 0.6.z   |\n| 0.4.z          | (0.4.z, 0.5.z,) 0.6.z |\n| 1.0.z          | (0.6.z,) 1.0.z        |\n| 1.1.z          | 1.0.0, 1.1.z          |\n\nWhile it should also be possible to use JanusGraph.Net with other versions of\nJanusGraph than mentioned here, compatibility is not tested and some\nfunctionality (like added Gremlin steps) will not work as it is not supported\nyet in case of an older JanusGraph version or was removed in a newer JanusGraph\nversion.\n\n### JanusGraph.Net 0.4\n\nJanusGraph.Net 0.4 still supports older versions of JanusGraph, but the\n`janusGraphPredicates` flag needs to be set to `false` in order to be able to\nuse JanusGraph's Text predicates.\n\n### JanusGraph.Net 1.0\n\nGraphBinary serialization includes breaking changes in version 1.0.0.\nJanusGraph.Net 1.0 is therefore only compatible with JanusGraph 0.6 if GraphSON\nis used.\n\n## Serialization Formats\n\nJanusGraph.Net supports GraphSON 3 as well as GraphBinary.\nNote that support for GraphBinary was only added in JanusGraph 0.6.0. So, the\nserver needs to be at least on that version.\n\nNot all of the JanusGraph-specific types are already supported by both formats:\n\n| Format      | RelationIdentifier | Text predicates | Geoshapes | Geo predicates |\n| ----------- | ------------------ | --------------- | --------- | -------------- |\n| GraphSON3   | x                  | x               | `Point`   | -              |\n| GraphBinary | x                  | x               | `Point`\\* | -              |\n\n\\* Since version 1.0.0 of JanusGraph.Net.\nJanusGraph also needs to be on version 1.0.0 or higher.\n\n## Community\n\nJanusGraph.Net uses the same communication channels as JanusGraph in general.\nSo, please refer to the\n[_Community_ section in JanusGraph's main repository][janusgraph-community]\nfor more information about these various channels.\n\nPlease use GitHub issues only to report bugs or request features.\n\n## Contributing\n\nPlease see\n[`CONTRIBUTING.md` in JanusGraph's main repository][janusgraph-contributing]\nfor more information, including CLAs and best practices for working with\nGitHub.\n\n## License\n\nJanusGraph.Net code is provided under the [Apache 2.0 license](APACHE-2.0.txt)\nand documentation is provided under the [CC-BY-4.0 license](CC-BY-4.0.txt). For\ndetails about this dual-license structure, please see\n[`LICENSE.txt`](LICENSE.txt).\n\n[codacy-badge]: https://api.codacy.com/project/badge/Grade/eb69004e41f64f03be82228e6faaedd1\n[codacy-url]: https://app.codacy.com/project/JanusGraph/janusgraph-dotnet/dashboard\n[nuget-badge]: https://img.shields.io/nuget/v/JanusGraph.NET\n[nuget-url]: https://www.nuget.org/packages/JanusGraph.NET/\n[actions-badge]:\nhttps://img.shields.io/github/actions/workflow/status/JanusGraph/janusgraph-dotnet/dotnet.yml?branch=master\n[actions-url]: https://github.com/JanusGraph/janusgraph-dotnet/actions\n[janusgraph]: https://janusgraph.org/\n[gremlin.net]: https://tinkerpop.apache.org/docs/current/reference/#gremlin-DotNet\n[gremlin-chapter]: https://docs.janusgraph.org/getting-started/gremlin/\n[text-predicates]: https://docs.janusgraph.org/interactions/search-predicates/#text-predicate\n[geoshapes]: https://docs.janusgraph.org/interactions/search-predicates/#geoshape-data-type\n[janusgraph-community]: https://github.com/JanusGraph/janusgraph#community\n[janusgraph-contributing]: https://github.com/JanusGraph/janusgraph/blob/master/CONTRIBUTING.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanusgraph%2Fjanusgraph-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanusgraph%2Fjanusgraph-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanusgraph%2Fjanusgraph-dotnet/lists"}