public override Condition HandleOperation( Neo4JFilterVisitorContext context, IFilterOperationField field, IValueNode value, object?parsedValue) { if (parsedValue is not string str) { throw new InvalidOperationException(); } return(context .GetNode() .Property(context.GetNeo4JFilterScope().GetPath()) .EndsWith(Cypher.LiteralOf(str))); }
/// <inheritdoc /> public override Condition HandleOperation( Neo4JFilterVisitorContext context, IFilterOperationField field, IValueNode value, object?parsedValue) { if (parsedValue is null) { throw new InvalidOperationException(); } return(context .GetNode() .Property(context.GetNeo4JFilterScope().GetPath()) .GreaterThanOEqualTo(Cypher.LiteralOf(parsedValue)) .Not()); }
/// <summary> /// Tries to build the query based on the items that are stored on the scope /// </summary> /// <param name="context">The context</param> /// <param name="query">The query that was build</param> /// <returns>True in case the query has been build successfully, otherwise false</returns> public static bool TryCreateQuery( this Neo4JFilterVisitorContext context, [NotNullWhen(true)] out CompoundCondition query) { return(context.GetNeo4JFilterScope().TryCreateQuery(out query)); }