0

Is it possible to use pg_trgm functions as similarity in JOOQ?

1 Answers1

2

Whenever some vendor-specific feature is missing from jOOQ, use the plain SQL API:

Here's how to create a similarity function:

public static Field<Double> similarity(Field<String> a, Field<String> b) {
    return DSL.field("similarity({0}, {1})", Double.class, a, b);
}
Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509