Closed naka-sho closed 11 months ago
mode:tuncate_insert does not actually use the truncate statement, it executes the delete statement
https://github.com/embulk/embulk-output-jdbc/blob/dfb2192cd0162ac32b9111f1de7f28177e4cf902/embulk-output-jdbc/src/main/java/org/embulk/output/jdbc/AbstractJdbcOutputPlugin.java#L890-L897 https://github.com/embulk/embulk-output-jdbc/blob/dfb2192cd0162ac32b9111f1de7f28177e4cf902/embulk-output-jdbc/src/main/java/org/embulk/output/jdbc/JdbcOutputConnection.java#L386-L417 https://github.com/embulk/embulk-output-jdbc/blob/dfb2192cd0162ac32b9111f1de7f28177e4cf902/embulk-output-jdbc/src/main/java/org/embulk/output/jdbc/JdbcOutputConnection.java#L419-L427
Please add delete_insert with another name because there is a possibility of misunderstanding that rollback is not possible.
I think that misunderstandings can be eliminated by adding the fact that the delete statement is explicitly issued to mode.
I created a pull request with the changes, please check it.
https://github.com/embulk/embulk-output-jdbc/pull/321 https://github.com/embulk/embulk-output-jdbc/pull/324
mode:tuncate_insert does not actually use the truncate statement, it executes the delete statement
https://github.com/embulk/embulk-output-jdbc/blob/dfb2192cd0162ac32b9111f1de7f28177e4cf902/embulk-output-jdbc/src/main/java/org/embulk/output/jdbc/AbstractJdbcOutputPlugin.java#L890-L897 https://github.com/embulk/embulk-output-jdbc/blob/dfb2192cd0162ac32b9111f1de7f28177e4cf902/embulk-output-jdbc/src/main/java/org/embulk/output/jdbc/JdbcOutputConnection.java#L386-L417 https://github.com/embulk/embulk-output-jdbc/blob/dfb2192cd0162ac32b9111f1de7f28177e4cf902/embulk-output-jdbc/src/main/java/org/embulk/output/jdbc/JdbcOutputConnection.java#L419-L427
Please add delete_insert with another name because there is a possibility of misunderstanding that rollback is not possible.
I think that misunderstandings can be eliminated by adding the fact that the delete statement is explicitly issued to mode.
I created a pull request with the changes, please check it.
https://github.com/embulk/embulk-output-jdbc/pull/321 https://github.com/embulk/embulk-output-jdbc/pull/324