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

com.avaje.ebeaninternal.server.expression.Op Maven / Gradle / Ivy

There is a newer version: 8.1.1
Show newest version
package com.avaje.ebeaninternal.server.expression;

/**
 * Simple operators - equals, greater than, less than etc.
 */
public enum Op {

  /**
   * Exists (JSON).
   */
  EXISTS(" is not null ", ""),

  /**
   * Not Exists (JSON).
   */
  NOT_EXISTS(" is null ", ""),

  /**
   * Between (JSON).
   */
  BETWEEN(" between ? and ? ", ""),

  /**
   * Equal to
   */
  EQ(" = ? ", ""),

  /**
   * Not equal to.
   */
  NOT_EQ(" <> ? ", ""),

  /**
   * Less than.
   */

  LT(" < ? ", "lt"),

  /**
   * Less than or equal to.
   */
  LT_EQ(" <= ? ", "lte"),

  /**
   * Greater than.
   */
  GT(" > ? ", "gt"),

  /**
   * Greater than or equal to.
   */
  GT_EQ(" >= ? ", "gte");

  final String exp;

  final String docExp;

  Op(String exp, String docExp) {
    this.exp = exp;
    this.docExp = docExp;
  }

  /**
   * Return the bind expression include JDBC ? bind placeholder.
   */
  public String bind() {
    return exp;
  }

  /**
   * Return the doc store expression.
   */
  public String docExp() {
    return docExp;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy