Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working #25 #26

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.homihq.db2rest.rsql.operators.handler;

@Deprecated
public class LessThanOperatorHandler implements OperatorHandler {

private static final String OPERATOR = " < ";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.homihq.db2rest.rsql.operators.handler.jooq;

import com.homihq.db2rest.rsql.operators.handler.OperatorHandler;
import org.jooq.Condition;

import static org.jooq.impl.DSL.field;
import static org.jooq.impl.DSL.val;

public class JooqLessThanOperatorHandler implements JooqOperatorHandler {

private static final String OPERATOR = " < ";

@Override
public Condition handle(String columnName, String value, Class type) {
// return columnName + OPERATOR + parseValue(value, type);

return
field(columnName).lt(val(value));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@




import java.util.HashMap;
import java.util.Map;

Expand All @@ -16,6 +15,7 @@ public class JooqRSQLOperatorHandlers {
OPERATOR_HANDLER_MAP.put(EQUAL.getSymbol(), new JooqEqualToOperatorHandler());
OPERATOR_HANDLER_MAP.put(GREATER_THAN.getSymbol(), new JooqGreaterThanOperatorHandler());
OPERATOR_HANDLER_MAP.put(GREATER_THAN_OR_EQUAL.getSymbol(), new JooqGreaterThanEqualToOperatorHandler());
OPERATOR_HANDLER_MAP.put(LESS_THAN.getSymbol(), new JooqLessThanOperatorHandler());
}

public static JooqOperatorHandler getOperatorHandler(String symbol) {
Expand Down