public static ICypherFluentQuery MatchRelationship <T>(this ICypherFluentQuery query, T relationship, List <CypherProperty> matchOverride = null) where T : BaseRelationship { var options = new MatchRelationshipOptions(); options.MatchOverride = matchOverride; return(MatchRelationship(query, relationship, options)); }
public static ICypherFluentQuery MatchRelationship <T>( this ICypherFluentQuery query , T relationship , MatchRelationshipOptions options) where T : BaseRelationship { return(MatchRelationshipWorker(query, relationship, options, (fluentQuery, s) => fluentQuery.Match(s))); }
public static ICypherFluentQuery OptionalMatchRelationship <T>( this ICypherFluentQuery query , T relationship , MatchRelationshipOptions options = null) where T : BaseRelationship { if (options == null) { options = new MatchRelationshipOptions(); } return(MatchRelationshipWorker(query, relationship, options, (fluentQuery, s) => fluentQuery.OptionalMatch(s))); }
private static ICypherFluentQuery MatchRelationshipWorker <T>( this ICypherFluentQuery query , T relationship , MatchRelationshipOptions options , Func <ICypherFluentQuery, string, ICypherFluentQuery> matchFunction) where T : BaseRelationship { var matchProperties = options.MatchOverride ?? CypherTypeItemHelper.PropertiesForPurpose <T, CypherMatchAttribute>(relationship); var cql = GetRelationshipCql( relationship.FromKey , relationship.ToCypherString <T, CypherMatchAttribute>(CypherExtensionContext.Create(query), relationship.Key, matchProperties) , relationship.ToKey); return(matchFunction(query, cql)); }
public static MatchRelationshipOptions WithNoProperties(this MatchRelationshipOptions target) { return(WithProperties(target, new List <CypherProperty>())); }
public static MatchRelationshipOptions WithProperties(this MatchRelationshipOptions target, List <CypherProperty> propertyOverride) { target.MatchOverride = propertyOverride; return(target); }