Status for Delete and Update operation.

35 views
Skip to first unread message

Aravind Koonapureddy

unread,
Sep 13, 2023, 1:50:14 AM9/13/23
to jOOQ User Group
The older version of jOOQ assigns a status of 1 for update operations, but with the latest jOOQ, it provides a different status.

Aravind Koonapureddy

unread,
Sep 13, 2023, 1:52:09 AM9/13/23
to jOOQ User Group
I mean it provides the number of affected rows as a result, but I couldn't find any documentation confirming this update.

Lukas Eder

unread,
Sep 13, 2023, 2:56:55 AM9/13/23
to jooq...@googlegroups.com
Hi Aravind,

Thanks for your message.

Can you please provide some example code showing what you're expecting and what you're seeing?

Thanks,
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 jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/8927995b-2888-4eaf-879d-d8878336b98fn%40googlegroups.com.

Aravind Koonapureddy

unread,
Sep 13, 2023, 4:31:58 AM9/13/23
to jOOQ User Group
When I update the records with old jar, I got message as:
"status":
1
"message":
"success"

But now it when I'm doing same update operation, it getting as :
"status":
66
"message":
"success"



Regards,
Aravind k.

Lukas Eder

unread,
Sep 13, 2023, 4:39:08 AM9/13/23
to jooq...@googlegroups.com
Hi Aravind,

Well, I don't know what "status" means, so can you please provide the complete context necessary to help you?

On our issue tracker, we usually ask folks to provide us with an MCVE (minimal, complete, verifiable example). We have a template here:

This is probably not necessary in your case, but maybe you can see where I'm trying to go here? The idea of an MCVE is derived from Stack Overflow:

Without context, I can't really help you.
I hope this helps,
Lukas

Aravind Koonapureddy

unread,
Sep 13, 2023, 4:56:41 AM9/13/23
to jooq...@googlegroups.com
I want to know that if I execute a simple update query after the successful execution what's the output?

Regards,
Aravind k.

You received this message because you are subscribed to a topic in the Google Groups "jOOQ User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jooq-user/aYONYTFxc_0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO6QS8uDZOKxwRb32X5Z9owObdVghVwp6o0CKV1nq3AokQ%40mail.gmail.com.

Lukas Eder

unread,
Sep 13, 2023, 5:47:58 AM9/13/23
to jooq...@googlegroups.com
I'm just going to have to assume what you mean, since you don't provide actual example code. I'm *assuming* you mean something like:

int result =
ctx.update(MY_TABLE)
   .set(MY_TABLE.MY_COLUMN, 2)
   .execute();

You're wondering what "result" will be, and the answer is: The JDBC update count. There's no change in behaviour between jOOQ versions as far as I remember.

If that's not what you're looking for, please provide example code.

Aravind Koonapureddy

unread,
Sep 13, 2023, 6:34:52 AM9/13/23
to jOOQ User Group

Yeah exactly, When I perform the update operation, for example:
int result = ctx.update(MY_TABLE)
              .set(MY_TABLE.MY_COLUMN, 2)
              .execute();

I obtained a result of 1 with version 3.9 jOOQ, while with version 3.17, I observed the result as the update count. Is this expected behavior, or will it show the result as provided by the JDBC driver?

Regards,
Aravind k

Lukas Eder

unread,
Sep 13, 2023, 7:22:00 AM9/13/23
to jooq...@googlegroups.com
As I said, I don't recall any change of behaviour in jOOQ with respect to update counts. Perhaps you can share an example in code that helps reproduce the issue.

Reply all
Reply to author
Forward
0 new messages