Package com.io7m.cardant.database.postgres.internal

# Class CADBComparisons

java.lang.Object
com.io7m.cardant.database.postgres.internal.CADBComparisons

public final class CADBComparisons extends Object
Functions to perform comparisons over fields/columns.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> org.jooq.Condition`
  `createExactMatchQuery(CAComparisonExactType<T> query, org.jooq.TableField<org.jooq.Record,T> fieldExact)`
  Create an exact match expression.
  `static <T> org.jooq.Condition`
  `createFuzzyMatchArrayQuery(CAComparisonFuzzyType<T> query, org.jooq.TableField<org.jooq.Record,T[]> fieldExact, String fieldSearch)`
  Create a fuzzy match expression.
  `static <T> org.jooq.Condition`
  `createFuzzyMatchQuery(CAComparisonFuzzyType<T> query, org.jooq.TableField<org.jooq.Record,T> fieldExact, String fieldSearch)`
  Create a fuzzy match expression.
  `static org.jooq.Condition`
  `createSetMatchQueryLong(CAComparisonSetType<Long> query, org.jooq.TableField<org.jooq.Record,Long[]> field)`
  Create a set match expression.
  `static org.jooq.Condition`
  `createSetMatchQueryString(CAComparisonSetType<String> query, org.jooq.TableField<org.jooq.Record,String[]> field)`
  Create a set match expression.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### createFuzzyMatchQuery

    public static <T> org.jooq.Condition createFuzzyMatchQuery(CAComparisonFuzzyType<T> query, org.jooq.TableField<org.jooq.Record,T> fieldExact, String fieldSearch)
    Create a fuzzy match expression.
    Type Parameters:
      `T` - The type of compared values
    Parameters:
      `query` - The query
      `fieldExact` - The "exact" field
      `fieldSearch` - The search field
    Returns:
      A fuzzy match condition

  - ### createFuzzyMatchArrayQuery

    public static <T> org.jooq.Condition createFuzzyMatchArrayQuery(CAComparisonFuzzyType<T> query, org.jooq.TableField<org.jooq.Record,T[]> fieldExact, String fieldSearch)
    Create a fuzzy match expression.
    Type Parameters:
      `T` - The type of compared values
    Parameters:
      `query` - The query
      `fieldExact` - The "exact" field
      `fieldSearch` - The search field
    Returns:
      A fuzzy match condition

  - ### createExactMatchQuery

    public static <T> org.jooq.Condition createExactMatchQuery(CAComparisonExactType<T> query, org.jooq.TableField<org.jooq.Record,T> fieldExact)
    Create an exact match expression.
    Type Parameters:
      `T` - The type of compared values
    Parameters:
      `query` - The query
      `fieldExact` - The "exact" field
    Returns:
      An exact match condition

  - ### createSetMatchQueryString

    public static org.jooq.Condition createSetMatchQueryString(CAComparisonSetType<String> query, org.jooq.TableField<org.jooq.Record,String[]> field)
    Create a set match expression.
    Parameters:
      `query` - The query
      `field` - The array-typed field
    Returns:
      An exact match condition

  - ### createSetMatchQueryLong

    public static org.jooq.Condition createSetMatchQueryLong(CAComparisonSetType<Long> query, org.jooq.TableField<org.jooq.Record,Long[]> field)
    Create a set match expression.
    Parameters:
      `query` - The query
      `field` - The array-typed field
    Returns:
      An exact match condition