Search in sources :

Example 26 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class AbstractMethodQueryProvider method exitBetween.

@Override
public void exitBetween(MethodParser.BetweenContext ctx) {
    boolean hasNot = Objects.nonNull(ctx.not());
    String variable = getVariable(ctx.variable());
    Operator operator = BETWEEN;
    ArrayQueryValue value = MethodArrayValue.of(variable);
    checkCondition(new MethodCondition(variable, operator, value), hasNot);
}
Also used : Operator(jakarta.nosql.query.Operator) ArrayQueryValue(jakarta.nosql.query.ArrayQueryValue)

Example 27 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class AbstractMethodQueryProvider method exitGt.

@Override
public void exitGt(MethodParser.GtContext ctx) {
    boolean hasNot = Objects.nonNull(ctx.not());
    String variable = getVariable(ctx.variable());
    Operator operator = GREATER_THAN;
    appendCondition(hasNot, variable, operator);
}
Also used : Operator(jakarta.nosql.query.Operator)

Example 28 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class AbstractMethodQueryProvider method exitLike.

@Override
public void exitLike(MethodParser.LikeContext ctx) {
    boolean hasNot = Objects.nonNull(ctx.not());
    String variable = getVariable(ctx.variable());
    Operator operator = LIKE;
    appendCondition(hasNot, variable, operator);
}
Also used : Operator(jakarta.nosql.query.Operator)

Example 29 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class AbstractMethodQueryProvider method exitGte.

@Override
public void exitGte(MethodParser.GteContext ctx) {
    boolean hasNot = Objects.nonNull(ctx.not());
    String variable = getVariable(ctx.variable());
    Operator operator = GREATER_EQUALS_THAN;
    appendCondition(hasNot, variable, operator);
}
Also used : Operator(jakarta.nosql.query.Operator)

Example 30 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class AbstractMethodQueryProvider method exitIn.

@Override
public void exitIn(MethodParser.InContext ctx) {
    boolean hasNot = Objects.nonNull(ctx.not());
    String variable = getVariable(ctx.variable());
    Operator operator = IN;
    appendCondition(hasNot, variable, operator);
}
Also used : Operator(jakarta.nosql.query.Operator)

Aggregations

Operator (jakarta.nosql.query.Operator)43 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)34 ValueSource (org.junit.jupiter.params.provider.ValueSource)34 Condition (jakarta.nosql.query.Condition)3 ConditionQueryValue (jakarta.nosql.query.ConditionQueryValue)3 ParamQueryValue (jakarta.nosql.query.ParamQueryValue)2 QueryValue (jakarta.nosql.query.QueryValue)2 Where (jakarta.nosql.query.Where)2 ArrayQueryValue (jakarta.nosql.query.ArrayQueryValue)1 DeleteQuery (jakarta.nosql.query.DeleteQuery)1 SelectQuery (jakarta.nosql.query.SelectQuery)1