To make it so that the insert query is executed when “db.insert(table).values(rows)” was called
As shown below, I want to insert a large number of records into the table in several parts, but when “db.insert(table).values(rows)” is executed, the insert query is not issued, and the query is issued after the entire loop is completed.
If I do this, I will run out of heap and get an error like the one shown in the attached file, so I want to make it so that the query is executed each time, without storing it until the end. How can I do this?
0 Replies