You mean this? https://www.jooq.org/doc/latest/manual/sql-building/sql-parser/sql-parser-grammar/
Am Mittwoch, 1. März 2023 schrieb akash verma <akka9...@gmail.com>: > Hey lukas, > > Like when we try to run DDL script and have some alter keywords in script > not able to parse it but some alter statements are running, I searched it > but did'nt find every keywords which are not working with alter keywords, > Do u have any reference? > > > On Tuesday, 28 February 2023 at 14:33:55 UTC+5:30 akash verma wrote: > >> Okay. >> >> On Tuesday, 28 February 2023 at 14:13:28 UTC+5:30 lukas...@gmail.com >> wrote: >> >>> Because most operations aren't available if you don't have a PK >>> >>> On Tue, Feb 28, 2023 at 9:32 AM akash verma <akka...@gmail.com> wrote: >>> >>>> Hey lukas, >>>> >>>> Why we skip the DAOs generation when script does'nt have primary key >>>> field? >>>> >>>> >>>> On Tuesday, 28 February 2023 at 14:01:30 UTC+5:30 akash verma wrote: >>>> >>>>> Thankyou for the updates. >>>>> >>>>> >>>>> On Friday, 17 February 2023 at 15:25:11 UTC+5:30 lukas...@gmail.com >>>>> wrote: >>>>> >>>>>> Issue #14420 has been implemented for jOOQ 3.18.0, see: >>>>>> https://www.jooq.org/doc/dev/manual/sql-execution/logging- >>>>>> sql-exceptions/ >>>>>> >>>>>> On Monday, December 19, 2022 at 9:10:48 AM UTC+1 Lukas Eder wrote: >>>>>> >>>>>>> Note that generic workarounds are possible using VisitListener or >>>>>>> QOM API traversal (starting from jOOQ 3.18 for INSERT and UPDATE >>>>>>> statements): >>>>>>> https://github.com/jOOQ/jOOQ/issues/14420#issuecomment-1357246961 >>>>>>> >>>>>>> Not sure if those will be practical for you (probably a bit too >>>>>>> laborious), but I wanted to mention it here, just in case. >>>>>>> >>>>>>> On Monday, December 19, 2022 at 9:07:02 AM UTC+1 Lukas Eder wrote: >>>>>>> >>>>>>>> Thanks Akash, >>>>>>>> >>>>>>>> We'll consider it: >>>>>>>> https://github.com/jOOQ/jOOQ/issues/14420 >>>>>>>> >>>>>>>> As it so happens, another customer has just now requested the same >>>>>>>> thing for NOT NULL constraints, which cause errors that aren't always >>>>>>>> so >>>>>>>> easy to spot in data after the fact. >>>>>>>> >>>>>>>> I've described the potential feature in the above issue. In short, >>>>>>>> there are 2 parts to it: >>>>>>>> >>>>>>>> - Adding additional troubleshooting logs. This seems easy as there >>>>>>>> isn't any requirement for the logs to be complete/precise. This is >>>>>>>> what you >>>>>>>> seem to be looking for. >>>>>>>> - Formally reimplementing the server side constraints on the client >>>>>>>> side (I vaguely remember this having been a topic a few times in the >>>>>>>> past). >>>>>>>> This is much more difficult to get right. >>>>>>>> >>>>>>>> If we'll go forward with this, then for now, it will only be the >>>>>>>> first bullet. >>>>>>>> Best Regards, >>>>>>>> Lukas >>>>>>>> >>>>>>>> On Sun, Dec 18, 2022 at 7:02 AM akash verma <akka...@gmail.com> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Lukas, >>>>>>>>> >>>>>>>>> Thanks for the suggestion, as we doing the same, just try to loop >>>>>>>>> every object we pass in the batch and validate it. >>>>>>>>> But I think this will be the great feature if we are able to add >>>>>>>>> it. >>>>>>>>> >>>>>>>>> On Friday, 16 December 2022 at 18:20:02 UTC+5:30 >>>>>>>>> lukas...@gmail.com wrote: >>>>>>>>> >>>>>>>>>> Hi Akash, >>>>>>>>>> >>>>>>>>>> We currently don't re-implement this sort of validation in jOOQ. >>>>>>>>>> Usually, server side validation is good enough. I'm not sure if jOOQ >>>>>>>>>> can >>>>>>>>>> always correlate arbitrary server side errors to individual batched >>>>>>>>>> records >>>>>>>>>> in all RDBMS. It might be possible, but hasn't been too popular a >>>>>>>>>> feature >>>>>>>>>> request in the past. >>>>>>>>>> >>>>>>>>>> You know those 10000 records, and can run through them, checking >>>>>>>>>> them against the field length to quickly see which ones are not >>>>>>>>>> working. >>>>>>>>>> The meta data is available to you for automated checks via >>>>>>>>>> DataType::length, if you're using the code generator. >>>>>>>>>> >>>>>>>>>> I hope this helps, >>>>>>>>>> Lukas >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Fri, Dec 16, 2022 at 1:32 PM akash verma <akka...@gmail.com> >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> 2022-12-16 17:12:01.085 DEBUG 16528 --- [ main] >>>>>>>>>>> org.jooq.tools.LoggerListener : Executing batch query >>>>>>>>>>> : >>>>>>>>>>> insert into `items`.`author` (`first_name`, `last_name`) values (?, >>>>>>>>>>> ?) >>>>>>>>>>> 2022-12-16 17:12:01.126 DEBUG 16528 --- [ main] >>>>>>>>>>> org.jooq.tools.LoggerListener : Exception >>>>>>>>>>> >>>>>>>>>>> org.jooq.exception.DataAccessException: SQL [insert into >>>>>>>>>>> `items`.`author` (`first_name`, `last_name`) values (?, ?)]; Data >>>>>>>>>>> truncation: Data too long for column 'first_name' at row 1 >>>>>>>>>>> >>>>>>>>>>> this is the exception I am getting when I try to batch insert >>>>>>>>>>> but I don't know which record is causing this error as I have 10,000 >>>>>>>>>>> records so in this case JOOQ have to send the number of Inserted >>>>>>>>>>> records so >>>>>>>>>>> that i can check. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Friday, 16 December 2022 at 17:38:12 UTC+5:30 >>>>>>>>>>> lukas...@gmail.com wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Akash, >>>>>>>>>>>> >>>>>>>>>>>> Why do you get an exception, and what could jOOQ possibly do >>>>>>>>>>>> about it? >>>>>>>>>>>> >>>>>>>>>>>> On Fri, Dec 16, 2022 at 12:49 PM akash verma <akka...@gmail.com> >>>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> i just want the numbers of rows that inserted successfully as >>>>>>>>>>>>> in JDBC we something like this:- to get the count of updated >>>>>>>>>>>>> records. >>>>>>>>>>>>> >>>>>>>>>>>>> try { >>>>>>>>>>>>> // Batch is ready, execute it to insert the data >>>>>>>>>>>>> batchResults = pstmt.executeBatch(); >>>>>>>>>>>>> } catch (BatchUpdateException e) { >>>>>>>>>>>>> System.out.println("Error message: " + e.getMessage()); >>>>>>>>>>>>> batchResults = e.getUpdateCounts(); >>>>>>>>>>>>> } >>>>>>>>>>>>> >>>>>>>>>>>>> here with the help of e.getUpdateCounts iam able to get the >>>>>>>>>>>>> counts of inserted rows. >>>>>>>>>>>>> >>>>>>>>>>>>> but what happen in JOOQ is We get DataAccessException which >>>>>>>>>>>>> contains the cause BatchUpdateException. so here What happen i am >>>>>>>>>>>>> not able >>>>>>>>>>>>> to use e.getUpdateCounts(); which is a feature of >>>>>>>>>>>>> BatchUpdateException; >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> All i want is If we get some error in batch Insertion/Deletion >>>>>>>>>>>>> , still we can get the number of inserted/deleted records as in >>>>>>>>>>>>> JDBC. >>>>>>>>>>>>> On Friday, 16 December 2022 at 17:06:37 UTC+5:30 >>>>>>>>>>>>> lukas...@gmail.com wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> 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 < >>>>>>>>>>>>>> akka...@gmail.com> 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 >>>>>>>>>>>>>>>> lukas...@gmail.com 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 < >>>>>>>>>>>>>>>>> akka...@gmail.com> 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 jooq-user+...@googlegroups.com. >>>>>>>>>>>>>>>>>> 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 jooq-user+...@googlegroups.com. >>>>>>>>>>>>>>> >>>>>>>>>>>>>> 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 jooq-user+...@googlegroups.com. >>>>>>>>>>>>> >>>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>>>> https://groups.google.com/d/msgid/jooq-user/a15967ad-a9d3- >>>>>>>>>>>>> 42d2-a7b0-347cc51267d2n%40googlegroups.com >>>>>>>>>>>>> <https://groups.google.com/d/msgid/jooq-user/a15967ad-a9d3-42d2-a7b0-347cc51267d2n%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 jooq-user+...@googlegroups.com. >>>>>>>>>>> >>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>> https://groups.google.com/d/msgid/jooq-user/eaddaf2d-4c84- >>>>>>>>>>> 44ec-8862-b57040e60291n%40googlegroups.com >>>>>>>>>>> <https://groups.google.com/d/msgid/jooq-user/eaddaf2d-4c84-44ec-8862-b57040e60291n%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 jooq-user+...@googlegroups.com. >>>>>>>>> >>>>>>>> To view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/jooq-user/d6d7c573-82b5- >>>>>>>>> 49a0-b1a9-70dd62222cf1n%40googlegroups.com >>>>>>>>> <https://groups.google.com/d/msgid/jooq-user/d6d7c573-82b5-49a0-b1a9-70dd62222cf1n%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 jooq-user+...@googlegroups.com. >>>> >>> To view this discussion on the web visit https://groups.google.com/d/ >>>> msgid/jooq-user/65f9cc6e-90dc-483b-8a0a-3b759b37bb9fn% >>>> 40googlegroups.com >>>> <https://groups.google.com/d/msgid/jooq-user/65f9cc6e-90dc-483b-8a0a-3b759b37bb9fn%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 jooq-user+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jooq-user/0ea64750-b629-4578-988c-9cbf0b9af623n%40googlegroups.com > <https://groups.google.com/d/msgid/jooq-user/0ea64750-b629-4578-988c-9cbf0b9af623n%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 jooq-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO6KsywpDxHWNFV%2Bmuv7O-ArqNN5w3rZYzjDYpmVdAob8Q%40mail.gmail.com.