Madhu,

On Wed, Nov 14, 2018 at 1:35 AM Madhu Mohan <[email protected]>
wrote:

> Expected output from JOOQ should be as follows. data1 column is of type
> "BYTEA", so it contains the following value as a whole. Following is not
> the values of multiple columns.
> Data1 contains:
> [startDate:null, description:ABC-123456789, isBundled:null,
> externalId:null, endDate:null, taxCode:TX123]
>

I see, thanks for clarifying


> I tried with Field<String> DATA1 = create.field("encode(data, 'escape'),
> String.class")
>

There three two things here (from what I can tell):

1. create is probably DSLContext, but there's no field method on
DSLContext. It is on DSL
2. Your column is called data1, not data
3. The String.class argument should not be part of the plain SQL template,
but a second argument to the field() method: DSL.field("encode(data1,
'escape')", String.class)


> But getting an error from JOOQ.
>

There could be many reasons for the error to happen. So far, I'm just
looking at a fairly incomplete set of examples, so it's difficult for me to
spot the error(s). You didn't even post the error you were getting in your
second attempt. Just "an error" isn't something I can really help you
solving :)

As a general rule of thumb, the more thorough your problem description, the
easier it will be for anyone else to help you. This includes you yourself,
as by being thorough in describing a problem, you might stumble upon the
solution yourself. I like Stack Overflow's description of an MCVE (Minimal
Complete Verifiable Example), which is also very helpful when
troubleshooting:
https://stackoverflow.com/help/mcve

I'll be happy to provide further help if I can
Cheers,
Lukas

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to