Madhu Mohan
2018-11-13 15:37:18 UTC
Hi Lukas,
I am facing the same problem here.
JOOQ output:
"data1": "[***@518d0d6b"
But the actual data when I query postgres database
select encode(table1.data1, 'escape') as data from table1 where id =
'03681e16-278d-4e11-bfae-5f8740cd751b';
SQL output:
[startDate:null, description:ABC-123456789, isBundled:null,
externalId:null, endDate:null, taxCode:TX123]
But with JOOQ output is as below.
"data1": "[***@518d0d6b"
If I use record.get(TABLE1.data).toString() then the output is a huge
hexadecimal or something else.
Please advise.
I am facing the same problem here.
JOOQ output:
"data1": "[***@518d0d6b"
But the actual data when I query postgres database
select encode(table1.data1, 'escape') as data from table1 where id =
'03681e16-278d-4e11-bfae-5f8740cd751b';
SQL output:
[startDate:null, description:ABC-123456789, isBundled:null,
externalId:null, endDate:null, taxCode:TX123]
But with JOOQ output is as below.
"data1": "[***@518d0d6b"
If I use record.get(TABLE1.data).toString() then the output is a huge
hexadecimal or something else.
Please advise.
That's really curious. jOOQ does not do any magic here. Just a plain
simple call to JDBC's ResultSet.getBytes(). Do you get the same, funny
behaviour when running your query through plain JDBC and accessing the byte
array using ResultSet.getBytes(int)?
simple call to JDBC's ResultSet.getBytes(). Do you get the same, funny
behaviour when running your query through plain JDBC and accessing the byte
array using ResultSet.getBytes(int)?
Hello,
thanks for your quick reply.
Result<Record> records = context.select(<list of
fields>).from(DOCUMENTSTABLE).where(DOCUMENTSTABLE.IDELEMENT.eq(filters.getElementId())).fetch();
And then I read the field's values with
record.getValue(DOCUMENTSTABLE.<tablefield>) for every field.
The problem there was, that the returned value of the BLOB (bytea) field
was much larger than when writing the data.
I write and read it as byte array.
It turned out that the content of the read byte array was made of hex
numbers (in text format) instead of bytes containing the original data.
Maybe there is a way to detect the returned type of data for postgres'
'bytea' datatype from version 9 on.
Greetings
Mike
--
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
For more options, visit https://groups.google.com/groups/opt_out.
thanks for your quick reply.
Result<Record> records = context.select(<list of
fields>).from(DOCUMENTSTABLE).where(DOCUMENTSTABLE.IDELEMENT.eq(filters.getElementId())).fetch();
And then I read the field's values with
record.getValue(DOCUMENTSTABLE.<tablefield>) for every field.
The problem there was, that the returned value of the BLOB (bytea) field
was much larger than when writing the data.
I write and read it as byte array.
It turned out that the content of the read byte array was made of hex
numbers (in text format) instead of bytes containing the original data.
Maybe there is a way to detect the returned type of data for postgres'
'bytea' datatype from version 9 on.
Greetings
Mike
--
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
For more options, visit https://groups.google.com/groups/opt_out.
--
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 jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.