https://kotlinlang.org logo
#exposed
Title
# exposed
n

nekoinemo

08/13/2018, 9:05 AM
Hi. I just noticed that despite be calling
batchInsert()
, requests printed in console are all separate inserts rather than
INSERT INTO table (col1, col2) VALUES (val11, val12), (val21, val22), (val31, val32)
. Am i misunderstanding how batch supposed to work in Exposed?
t

tapac

08/13/2018, 1:17 PM
It depends on jdbc driver implementation. Exposed just calls
PreparedStatement.addBatch
and sets parameters.
For MySql there is rewriteBatchedStatements flag, but I do not test how it works with Exposed.
n

nekoinemo

08/13/2018, 4:14 PM
I use Postgres. I guess that's how it does batching... Thank you