将前缀连接到 jooq 整数类型值

Concatanate prefix to a jooq Uinteger type value

我需要将前缀连接到 UInteger 类型的列 value.Here 我试过了,但结果是错误的,因为它连接为后缀。谁能帮我这个。注意 PAYLK_TRANSACTIONS.ID 是一个 UInteger 类型

Field<String> merchantRefID=PAYLK_TRANSACTIONS.ID.concat("p-");

您可以使用 DSL.concat() 使用 "prefix" 表示法:

Field<String> merchantRefID = DSL.concat("p-", PAYLK_TRANSACTIONS.ID);

或者,您继续使用 Field.concat() 的 "infix" 表示法,但是您必须明确地将前缀包装在 Field 中:

Field<String> merchantRefID = DSL.val("p-").concat(PAYLK_TRANSACTIONS.ID);