public ICypherExecuteable Delete <TOut>(Expression <Func <TIn, TOut> > deleteClause) { var query = new CypherQueryDefinition <TIn, TOut> { StartClause = _startDef, WherePredicate = _wherePredicate, DeleteClause = deleteClause, CreateRelationpClause = _createClause }; foreach (var m in _matchClauses ?? Enumerable.Empty <Expression <Func <IMatchQueryContext <TIn>, IDefineCypherRelationship> > >()) { query.AddMatchClause(m); } foreach (var m in _optionalMatchClauses ?? Enumerable.Empty <Expression <Func <IMatchQueryContext <TIn>, IDefineCypherRelationship> > >()) { query.AddOptionalMatchClause(m); } foreach (var m in _setters ?? Enumerable.Empty <Expression <Func <IUpdateQueryContext <TIn>, ISetResult> > >()) { query.AddSetClause(m); } return(new CypherQueryExecute <TOut>(_clientFactory, query)); }
private CypherQueryDefinition <TIn, TOut> BuildCypherQueryDefinition <TOut>() { var query = new CypherQueryDefinition <TIn, TOut> { StartClause = _startDef, WherePredicate = _wherePredicate, CreateRelationpClause = _createClause }; foreach (var m in _matchClauses ?? Enumerable.Empty <Expression <Func <IMatchQueryContext <TIn>, IDefineCypherRelationship> > >()) { query.AddMatchClause(m); } foreach (var m in _setters ?? Enumerable.Empty <Expression <Func <IUpdateQueryContext <TIn>, ISetResult> > >()) { query.AddSetClause(m); } return(query); }
internal CypherQueryDefinition <TIn, TOutNew> Copy <TOutNew>() { var query = new CypherQueryDefinition <TIn, TOutNew>(); foreach (var match in _matchClauses) { query._matchClauses.Add(match); } foreach (var setter in _setterClauses) { query._setterClauses.Add(setter); } foreach (var orderBy in _orderByClauses) { query._orderByClauses.Add(orderBy); } query.StartClause = this.StartClause; query.WherePredicate = this.WherePredicate; query.CreateRelationpClause = this.CreateRelationpClause; query.Limit = this.Limit; query.Skip = this.Skip; return(query); }
internal CypherQueryExecute(ICypherClientFactory clientFactory, CypherQueryDefinition <TIn, TOut> query) { _clientFactory = clientFactory; _query = query; }