Beispiel #1
0
 public static IGremlinQueryExecutionPipeline <GroovySerializedGremlinQuery, GroovySerializedGremlinQuery> EchoGremlinQueryAsString(this IGremlinQueryExecutionPipelineBuilder builder)
 {
     return(builder
            .UseSerializer(GremlinQuerySerializer <GroovySerializedGremlinQuery>
                           .FromVisitor <GroovyGremlinQueryElementVisitor>())
            .UseExecutor(GremlinQueryExecutor
                         .Echo <GroovySerializedGremlinQuery>())
            .UseDeserializerFactory(GremlinQueryExecutionResultDeserializerFactory
                                    .ToStringDeserializerFactory <GroovySerializedGremlinQuery>()));
 }
Beispiel #2
0
 public static IConfigurableGremlinQuerySource UseCosmosDb(this IConfigurableGremlinQuerySource source, string hostname, string database, string graphName, string authKey, int port = 443)
 {
     return(source
            .UseExecutionPipeline(builder => builder
                                  .UseSerializer(GremlinQuerySerializer <GroovySerializedGremlinQuery>
                                                 .FromVisitor <CosmosDbGroovyGremlinQueryElementVisitor>())
                                  .AddWebSocketExecutor(
                                      hostname,
                                      port,
                                      true,
                                      $"/dbs/{database}/colls/{graphName}",
                                      authKey,
                                      GraphsonVersion.V2, new Dictionary <Type, IGraphSONSerializer>
     {
         { typeof(TimeSpan), new TimeSpanSerializer() }
     },
Beispiel #3
0
 public static IGremlinQueryExecutionPipelineBuilderWithSerializer <GroovySerializedGremlinQuery> UseGroovySerialization(this IGremlinQueryExecutionPipelineBuilder builder)
 {
     return(builder.UseSerializer(GremlinQuerySerializer <GroovySerializedGremlinQuery> .FromVisitor <GroovyGremlinQueryElementVisitor>()));
 }