示例#1
0
文件: Job.cs 项目: MaartenX/ConnectQl
 /// <summary>
 /// Initializes a new instance of the <see cref="Job"/> class.
 /// </summary>
 /// <param name="executionContext">
 /// The execution context.
 /// </param>
 /// <param name="name">
 /// The name.
 /// </param>
 /// <param name="plan">
 /// The plan.
 /// </param>
 /// <param name="triggers">
 /// The triggers.
 /// </param>
 internal Job(IInternalExecutionContext executionContext, string name, IQueryPlan plan, [NotNull] IEnumerable <IJobTrigger> triggers)
 {
     this.Name             = name;
     this.Triggers         = triggers.ToArray();
     this.ExecutionContext = executionContext;
     this.plan             = plan;
 }
 public IQueryRequest Prepared(IQueryPlan preparedPlan)
 {
     if (preparedPlan == null || string.IsNullOrWhiteSpace(preparedPlan.ToN1ql()))
     {
         throw new ArgumentNullException("preparedPlan");
     }
     _statement = preparedPlan.ToN1ql();
     _prepared  = true;
     return(this);
 }
示例#3
0
 public QueryPlanANDSequentiell(IQueryPlan myLeft, IQueryPlan myRight, Boolean myIsLongrunning)
 {
     _left = myLeft;
     _right = myRight;
     _isLongrunning = myIsLongrunning;
 }
 public QueryPlanANDSequentiell(IQueryPlan myLeft, IQueryPlan myRight, Boolean myIsLongrunning)
 {
     _left          = myLeft;
     _right         = myRight;
     _isLongrunning = myIsLongrunning;
 }
 public QueryRequest(IQueryPlan plan)
 {
     _statement = plan.ToN1ql();
     _prepared  = true;
 }
 public static IQueryRequest Create(IQueryPlan plan)
 {
     return(new QueryRequest(plan));
 }
示例#7
0
 public QueryRequest(IQueryPlan plan)
 {
     _statement = plan.ToN1ql();
     _prepared = true;
 }
示例#8
0
 public IQueryRequest Prepared(IQueryPlan preparedPlan)
 {
     if (preparedPlan == null || string.IsNullOrWhiteSpace(preparedPlan.ToN1ql()))
     {
         throw new ArgumentNullException("preparedPlan");
     }
     _statement = preparedPlan.ToN1ql();
     _prepared = true;
     return this;
 }
示例#9
0
 public static IQueryRequest Create(IQueryPlan plan)
 {
     return new QueryRequest(plan);
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeclareJobPlan"/> class.
 /// </summary>
 /// <param name="name">
 /// The name.
 /// </param>
 /// <param name="plan">
 /// The plan.
 /// </param>
 /// <param name="triggersFactory">
 /// The trigger factories.
 /// </param>
 public DeclareJobPlan(string name, IQueryPlan plan, Func <IExecutionContext, Task <IEnumerable <IJobTrigger> > > triggersFactory)
 {
     this.name            = name;
     this.plan            = plan;
     this.triggersFactory = triggersFactory;
 }
示例#11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InsertQueryPlan"/> class.
 /// </summary>
 /// <param name="dataTargetFactory">
 /// The data target factory.
 /// </param>
 /// <param name="dataGenerator">
 /// The data generator.
 /// </param>
 /// <param name="upsert">
 /// The upsert.
 /// </param>
 public InsertQueryPlan(Func <IExecutionContext, DataTarget> dataTargetFactory, IQueryPlan dataGenerator, bool upsert)
 {
     this.dataTargetFactory = dataTargetFactory;
     this.dataGenerator     = dataGenerator;
     this.upsert            = upsert;
 }
示例#12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SelectDataSource"/> class.
 /// </summary>
 /// <param name="selectPlan">
 /// The select query plan.
 /// </param>
 /// <param name="aliases">
 /// The aliases.
 /// </param>
 public SelectDataSource(IQueryPlan selectPlan, [NotNull] HashSet <string> aliases)
     : base(aliases)
 {
     this.selectPlan = selectPlan;
     this.alias      = aliases.Single();
 }
 /// <summary>
 /// Sets the query connected to the node.
 /// </summary>
 /// <param name="dataProvider">
 /// The data provider.
 /// </param>
 /// <param name="node">
 /// The node.
 /// </param>
 /// <param name="query">
 /// The query.
 /// </param>
 internal static void SetQueryPlan([NotNull] this INodeDataProvider dataProvider, Node node, IQueryPlan query)
 {
     dataProvider.Set(node, "Query", query);
 }