コード例 #1
0
 public static IGremlinQuerySource UseGremlinServer(this IConfigurableGremlinQuerySource source, Func <IGremlinServerConfigurator, IGremlinQuerySourceTransformation> configuratorTransformation)
 {
     return(source
            .UseWebSocket(configurator => configuratorTransformation(new GremlinServerConfigurator(configurator)))
            .ConfigureEnvironment(environment => environment
                                  .ConfigureFeatureSet(featureSet => featureSet
                                                       .ConfigureGraphFeatures(graphFeatures => graphFeatures & ~(GraphFeatures.Transactions | GraphFeatures.ThreadedTransactions | GraphFeatures.ConcurrentAccess))
                                                       .ConfigureVertexFeatures(vertexFeatures => vertexFeatures & ~(VertexFeatures.Upsert | VertexFeatures.CustomIds))
                                                       .ConfigureVertexPropertyFeatures(vPropertiesFeatures => vPropertiesFeatures & ~(VertexPropertyFeatures.CustomIds))
                                                       .ConfigureEdgeFeatures(edgeProperties => edgeProperties & ~(EdgeFeatures.Upsert | EdgeFeatures.CustomIds)))));
 }
コード例 #2
0
 public static IGremlinQuerySource UseJanusGraph(this IConfigurableGremlinQuerySource environment, Func <IJanusGraphConfigurator, IGremlinQuerySourceTransformation> transformation)
 {
     return(environment
            .UseWebSocket(builder => transformation(new JanusGraphConfigurator(builder)))
            .ConfigureEnvironment(environment => environment
                                  .ConfigureFeatureSet(featureSet => featureSet
                                                       .ConfigureGraphFeatures(_ => GraphFeatures.Computer | GraphFeatures.Transactions | GraphFeatures.ThreadedTransactions | GraphFeatures.Persistence)
                                                       .ConfigureVariableFeatures(_ => VariableFeatures.MapValues)
                                                       .ConfigureVertexFeatures(_ => VertexFeatures.AddVertices | VertexFeatures.RemoveVertices | VertexFeatures.MultiProperties | VertexFeatures.AddProperty | VertexFeatures.RemoveProperty | VertexFeatures.StringIds)
                                                       .ConfigureVertexPropertyFeatures(_ => VertexPropertyFeatures.RemoveProperty | VertexPropertyFeatures.NumericIds | VertexPropertyFeatures.StringIds | VertexPropertyFeatures.Properties | VertexPropertyFeatures.BooleanValues | VertexPropertyFeatures.ByteValues | VertexPropertyFeatures.DoubleValues | VertexPropertyFeatures.FloatValues | VertexPropertyFeatures.IntegerValues | VertexPropertyFeatures.LongValues | VertexPropertyFeatures.StringValues)
                                                       .ConfigureEdgeFeatures(_ => EdgeFeatures.AddEdges | EdgeFeatures.RemoveEdges | EdgeFeatures.AddProperty | EdgeFeatures.RemoveProperty | EdgeFeatures.NumericIds | EdgeFeatures.StringIds | EdgeFeatures.UuidIds | EdgeFeatures.CustomIds | EdgeFeatures.AnyIds)
                                                       .ConfigureEdgePropertyFeatures(_ => EdgePropertyFeatures.Properties | EdgePropertyFeatures.BooleanValues | EdgePropertyFeatures.ByteValues | EdgePropertyFeatures.DoubleValues | EdgePropertyFeatures.FloatValues | EdgePropertyFeatures.IntegerValues | EdgePropertyFeatures.LongValues | EdgePropertyFeatures.StringValues))
                                  .StoreByteArraysAsBase64String()));
 }
コード例 #3
0
 public static IGremlinQuerySource UseNeptune(this IConfigurableGremlinQuerySource source, Func <INeptuneConfigurator, IGremlinQuerySourceTransformation> transformation)
 {
     return(source
            .UseWebSocket(configurator => transformation(new NeptuneConfigurator(configurator)))
            .ConfigureEnvironment(environment => environment
                                  .ConfigureSerializer(serializer => serializer
                                                       .ConfigureFragmentSerializer(fragmentSerializer => fragmentSerializer
                                                                                    .Override <PropertyStep.ByKeyStep>((step, env, overridden, recurse) => overridden(Cardinality.List.Equals(step.Cardinality) ? new PropertyStep.ByKeyStep(step.Key, step.Value, step.MetaProperties, Cardinality.Set) : step, env, recurse))))
                                  .StoreTimeSpansAsNumbers()
                                  .StoreByteArraysAsBase64String()
                                  .ConfigureFeatureSet(featureSet => featureSet
                                                       .ConfigureGraphFeatures(_ => GraphFeatures.Transactions | GraphFeatures.Persistence | GraphFeatures.ConcurrentAccess)
                                                       .ConfigureVariableFeatures(_ => VariableFeatures.None)
                                                       .ConfigureVertexFeatures(_ => VertexFeatures.AddVertices | VertexFeatures.RemoveVertices | VertexFeatures.MultiProperties | VertexFeatures.UserSuppliedIds | VertexFeatures.AddProperty | VertexFeatures.RemoveProperty | VertexFeatures.StringIds)
                                                       .ConfigureVertexPropertyFeatures(_ => VertexPropertyFeatures.RemoveProperty | VertexPropertyFeatures.NumericIds | VertexPropertyFeatures.StringIds | VertexPropertyFeatures.Properties | VertexPropertyFeatures.BooleanValues | VertexPropertyFeatures.ByteValues | VertexPropertyFeatures.DoubleValues | VertexPropertyFeatures.FloatValues | VertexPropertyFeatures.IntegerValues | VertexPropertyFeatures.LongValues | VertexPropertyFeatures.StringValues)
                                                       .ConfigureEdgeFeatures(_ => EdgeFeatures.AddEdges | EdgeFeatures.RemoveEdges | EdgeFeatures.UserSuppliedIds | EdgeFeatures.AddProperty | EdgeFeatures.RemoveProperty | EdgeFeatures.NumericIds | EdgeFeatures.StringIds | EdgeFeatures.UuidIds | EdgeFeatures.CustomIds | EdgeFeatures.AnyIds)
                                                       .ConfigureEdgePropertyFeatures(_ => EdgePropertyFeatures.Properties | EdgePropertyFeatures.BooleanValues | EdgePropertyFeatures.ByteValues | EdgePropertyFeatures.DoubleValues | EdgePropertyFeatures.FloatValues | EdgePropertyFeatures.IntegerValues | EdgePropertyFeatures.LongValues | EdgePropertyFeatures.StringValues))));
 }