It if translator supports Bulk Inserts then it pushes as single command, if not supported then executed as multiple commands. See "supportsBulkUpdate" on ExecutionFactory class. Also see TestJDBCUpdateExecution class for example as to how JDBC translator is supporting it.
1 of 1 people found this helpful
bulk is the prefered, but if supportsBatchedUpdates is supported the engine will issue a org.teiid.language.BatchedUpdates command that contains multiple inserts, and then as Ramesh says it will revert to single row inserts.
When bulk is supported the pushdown insert will contain org.teiid.language.Parameter expressions in place of the values, which will reference the rows available from the org.teiid.language.BatchedCommand.getParameterValues().
Thanks a lot, Ramesh and steven.
I have taken a look at the code of TestJDBCUpdateExecution, it helps.
One more question here, if I set both supportsBatchedUpdates and supportBulkUpdate to false, what will happen? For this case, can my tranlator just handle single row insert?
Yes, single row is the default.