Exemplo n.º 1
0
 protected GremlinQuery(IGraphModel model, IGremlinQueryExecutor queryExecutor, IImmutableList <Step> steps, IImmutableDictionary <StepLabel, string> stepLabelBindings, ILogger logger)
 {
     Model             = model;
     Steps             = steps;
     Logger            = logger;
     QueryExecutor     = queryExecutor;
     StepLabelMappings = stepLabelBindings;
 }
Exemplo n.º 2
0
 public GremlinQueryExecutionPipelineImpl(
     IGremlinQuerySerializer serializer,
     IGremlinQueryExecutor executor,
     IGremlinQueryExecutionResultDeserializer deserializer)
 {
     Executor     = executor;
     Serializer   = serializer;
     Deserializer = deserializer;
 }
Exemplo n.º 3
0
 public ConfigurableGremlinQuerySourceImpl(string name, IGraphModel model, bool isUserSetModel, IGremlinQueryExecutor queryExecutor, ImmutableList <IGremlinQueryStrategy> includedStrategies, ImmutableList <string> excludedStrategies, ILogger logger)
 {
     Name                  = name;
     Model                 = model;
     Logger                = logger;
     Executor              = queryExecutor;
     _isUserSetModel       = isUserSetModel;
     ExcludedStrategyNames = excludedStrategies;
     IncludedStrategies    = includedStrategies;
 }
Exemplo n.º 4
0
 public GremlinQueryEnvironmentImpl(
     IGraphModel model,
     IGremlinQuerySerializer serializer,
     IGremlinQueryExecutor executor,
     IGremlinQueryExecutionResultDeserializer deserializer,
     IGremlinQueryDebugger debugger,
     IFeatureSet featureSet,
     IGremlinqOptions options,
     ILogger logger)
 {
     Model        = model;
     Logger       = logger;
     Options      = options;
     Executor     = executor;
     Debugger     = debugger;
     FeatureSet   = featureSet;
     Serializer   = serializer;
     Deserializer = deserializer;
 }
Exemplo n.º 5
0
 public TransformResultGremlinQueryExecutor(IGremlinQueryExecutor baseExecutor, Func <IAsyncEnumerable <object>, IAsyncEnumerable <object> > transformation)
 {
     _transformation = transformation;
     _baseExecutor   = baseExecutor;
 }
Exemplo n.º 6
0
 public TransformQueryGremlinQueryExecutor(IGremlinQueryExecutor baseExecutor, Func <object, object> transformation)
 {
     _transformation = transformation;
     _baseExecutor   = baseExecutor;
 }
Exemplo n.º 7
0
 public static IGremlinQuerySource WithExecutor(this IGremlinQuerySource source, IGremlinQueryExecutor executor)
 {
     return(source.ConfigureEnvironment(env => env
                                        .ConfigureExecutionPipeline(pipeline => pipeline
                                                                    .UseSerializer(GremlinQuerySerializer.Default)
                                                                    .UseExecutor(executor)
                                                                    .UseDeserializer(GremlinQueryExecutionResultDeserializer.Graphson))));
 }
Exemplo n.º 8
0
 public static IGremlinQueryExecutionPipeline UseExecutor(this IGremlinQueryExecutionPipeline pipeline, IGremlinQueryExecutor executor)
 {
     return(pipeline.ConfigureExecutor(_ => executor));
 }
Exemplo n.º 9
0
 public IGremlinQueryExecutionPipeline UseExecutor(IGremlinQueryExecutor executor)
 {
     return(new GremlinQueryExecutionPipelineImpl(Serializer, executor, GremlinQueryExecutionResultDeserializer.Invalid));
 }
Exemplo n.º 10
0
 internal static IGremlinQuery <TElement> Create <TElement>(IGraphModel model, IGremlinQueryExecutor queryExecutor, string graphName = null, ILogger logger = null)
 {
     return(new GremlinQuery <TElement, Unit, Unit, Unit, Unit, Unit>(
                model,
                queryExecutor,
                graphName != null
             ? ImmutableList <Step> .Empty.Add(IdentifierStep.Create(graphName))
             : ImmutableList <Step> .Empty,
                ImmutableDictionary <StepLabel, string> .Empty,
                logger));
 }
Exemplo n.º 11
0
 public TransformExecutionExceptionGremlinQueryExecutor(IGremlinQueryExecutor baseExecutor, Func <Exception, Exception> exceptionTransformation)
 {
     _baseExecutor            = baseExecutor;
     _exceptionTransformation = exceptionTransformation;
 }
 public static IGremlinQueryExecutor InterceptQuery(this IGremlinQueryExecutor baseExecutor, Func <object, object> transformation) => new QueryInterceptingGremlinQueryExecutor(baseExecutor, transformation);
 public static IGremlinQueryExecutor InterceptResult(this IGremlinQueryExecutor baseExecutor, Func <IAsyncEnumerable <object>, IAsyncEnumerable <object> > transformation) => new ResultInterceptingGremlinQueryExecutor(baseExecutor, transformation);
 public QueryInterceptingGremlinQueryExecutor(IGremlinQueryExecutor baseExecutor, Func <object, object> transformation)
 {
     _transformation = transformation;
     _baseExecutor   = baseExecutor;
 }
Exemplo n.º 15
0
 public LoggingGremlinQueryExecutor(IGremlinQueryExecutor executor)
 {
     _executor = executor;
 }
Exemplo n.º 16
0
 public ExponentialBackoffExecutor(IGremlinQueryExecutor baseExecutor, Func <int, ResponseException, bool> shouldRetry)
 {
     _baseExecutor = baseExecutor;
     _shouldRetry  = shouldRetry;
 }
Exemplo n.º 17
0
 IConfigurableGremlinQuerySource IConfigurableGremlinQuerySource.WithExecutor(IGremlinQueryExecutor executor)
 {
     return(new ConfigurableGremlinQuerySourceImpl(Name, Model, _isUserSetModel, executor, IncludedStrategies, ExcludedStrategyNames, Logger));
 }
Exemplo n.º 18
0
 internal static IGremlinQuery <Unit> Create(IGraphModel model, IGremlinQueryExecutor queryExecutor, string graphName = null, ILogger logger = null)
 {
     return(Create <Unit>(model, queryExecutor, graphName, logger));
 }
Exemplo n.º 19
0
 public TransformQueryGremlinQueryExecutor(IGremlinQueryExecutor baseExecutor, Func <ISerializedGremlinQuery, ISerializedGremlinQuery> transformation)
 {
     _transformation = transformation;
     _baseExecutor   = baseExecutor;
 }
Exemplo n.º 20
0
 public static IConfigurableGremlinQuerySource WithExecutor(this IConfigurableGremlinQuerySource source, IGremlinQueryExecutor <GroovySerializedGremlinQuery, JToken> executor)
 {
     return(source.UseExecutionPipeline(conf => conf
                                        .UseGroovySerialization()
                                        .UseExecutor(executor)
                                        .UseGraphsonDeserialization()));
 }
Exemplo n.º 21
0
 public static IGremlinQueryEnvironment UseExecutor(this IGremlinQueryEnvironment environment, IGremlinQueryExecutor executor) => environment.ConfigureExecutor(_ => executor);
Exemplo n.º 22
0
 public static IConfigurableGremlinQuerySource WithExecutor(this IConfigurableGremlinQuerySource source, IGremlinQueryExecutor executor)
 {
     return(source.ConfigureExecutionPipeline(pipeline => pipeline
                                              .UseSerializer(GremlinQuerySerializer.Groovy)
                                              .UseExecutor(executor)
                                              .UseDeserializer(GremlinQueryExecutionResultDeserializer.Graphson)));
 }