Akash,

Thanks for your message. I'm guessing you have some constraint violation
exceptions or something like that? jOOQ's batch API just delegates to JDBC.
If JDBC doesn't throw any exceptions, then neither can jOOQ.

I might be able to help you a bit further, but you'll have to provide more
information to see what exactly you're doing.

Best Regards,
Lukas

On Fri, Dec 16, 2022 at 12:19 PM akash verma <[email protected]> wrote:

> I am facing the error when  I try to use batchInsert() method in jooq it
> does'nt throw error like BatchUpdateException, now I am not able to get the
> count of the inserted rows in the BatchInsert().
>
>
> for e.g I have 1000 records to insert with the help of batchInsert() I am
> able to insert the 990 records but now i am not able to get the count of
> inserted records as rest 10 records throws the error in this case
> batchInsert() must return the BatchUpdateException like JDBC so we can get
> the count of errors records.
>
>
> On Wednesday, 14 December 2022 at 16:27:46 UTC+5:30 akash verma wrote:
>
>> Thank you for reply.
>>
>>
>> On Wednesday, 14 December 2022 at 15:13:25 UTC+5:30 [email protected]
>> wrote:
>>
>>> jOOQ calls this a bulk insert, not a batch insert. Just append a
>>> RETURNING clause and you're all set (if your underlying RDBMS supports
>>> this, that is):
>>>
>>> https://www.jooq.org/doc/latest/manual/sql-building/sql-statements/insert-statement/insert-returning/
>>>
>>> On Wed, Dec 14, 2022 at 10:37 AM akash verma <[email protected]> wrote:
>>>
>>>>  Hey Lukas,
>>>>
>>>> I just wanted to know is there any ways to get the generated IDs when
>>>> we batch insert, does JOOQ provide any methods for the same.
>>>>
>>>> I try to use valuesOfRecords() but it is not working.
>>>>
>>>> List<Record3<Integer, String, String>> records = ...
>>>> create.insertInto(AUTHOR,
>>>> AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
>>>> .valuesOfRecords(records)
>>>> .execute();
>>>>
>>>>
>>>> --
>>>> 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/c01ec364-0d1f-4afb-93df-f33a378a8995n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/jooq-user/c01ec364-0d1f-4afb-93df-f33a378a8995n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
> 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/920c77fe-05ce-4cf0-8891-c4c5702ef25bn%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/920c77fe-05ce-4cf0-8891-c4c5702ef25bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAB4ELO5nXkj-hHJYwrxT1YY1cnT1bQN2JHVUbF8DmSYZ7EmqoA%40mail.gmail.com.

Reply via email to