All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scalar.db.storage.jdbc.query.QueryUtils Maven / Gradle / Ivy

Go to download

A universal transaction manager that achieves database-agnostic transactions and distributed transactions that span multiple databases

There is a newer version: 3.14.0
Show newest version
package com.scalar.db.storage.jdbc.query;

import com.scalar.db.api.ConditionalExpression;
import com.scalar.db.storage.jdbc.RdbEngineStrategy;

public final class QueryUtils {

  private QueryUtils() {}

  public static String getConditionString(
      String columnName, ConditionalExpression.Operator operator, RdbEngineStrategy rdbEngine) {
    switch (operator) {
      case EQ:
        return rdbEngine.enclose(columnName) + "=?";
      case NE:
        return rdbEngine.enclose(columnName) + "<>?";
      case GT:
        return rdbEngine.enclose(columnName) + ">?";
      case GTE:
        return rdbEngine.enclose(columnName) + ">=?";
      case LT:
        return rdbEngine.enclose(columnName) + "




© 2015 - 2024 Weber Informatics LLC | Privacy Policy