er, jooq "Field.contains()" works on arrays as well

On 2/23/21 7:55 PM, Tuan Quoc wrote:
Hi robjs,

I am using SLQServer2012 dialect.

On Wednesday, February 24, 2021 at 9:36:36 AM UTC+7 [email protected] wrote:

    Which sql dialect has a “contains” function?

    On Feb 23, 2021, at 7:02 PM, Tuan Quoc <[email protected]> wrote:

    When I run this code:
    
DSLContext.selectFrom(tableName).where(DSL.field("fieldName").contains("value"))
    -> the query is generated like this:

    (1)  Select * from tableName where fieldName like ('%' +
    replace(replace('"value*"'), '!', '!!'), '%', '!%'), '_', '!_' +
    '%') escape '!'

    But the desired query is like this:
    (2) Select * from tableName where Contains(fieldName, '"value*"')



--
You received this message because you are subscribed to the Google Groups "jOOQ User 
Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/c64301d0-909d-b144-bc1f-f2782b11fa8c%40gmail.com.

Reply via email to