embulk-output-mysql 0.7.7 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -0
  3. data/build.gradle +3 -3
  4. data/classpath/embulk-output-jdbc-0.8.0.jar +0 -0
  5. data/classpath/embulk-output-mysql-0.8.0.jar +0 -0
  6. data/default_jdbc_driver/mysql-connector-java-5.1.44.jar +0 -0
  7. data/src/main/java/org/embulk/output/MySQLOutputPlugin.java +56 -16
  8. data/src/main/java/org/embulk/output/MySQLTimeZoneComparison.java +107 -0
  9. data/src/main/java/org/embulk/output/mysql/MySQLOutputConnection.java +14 -5
  10. data/src/main/java/org/embulk/output/mysql/MySQLOutputConnector.java +3 -8
  11. data/src/test/java/org/embulk/output/mysql/AfterLoadTest.java +136 -0
  12. data/src/test/java/org/embulk/output/mysql/BeforeLoadTest.java +124 -0
  13. data/src/test/java/org/embulk/output/mysql/CreateTableTest.java +79 -0
  14. data/src/test/java/org/embulk/output/mysql/MySQLTests.java +69 -0
  15. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/setup.sql +8 -0
  16. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test1.csv +4 -0
  17. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_expected.diff +2 -0
  18. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_after_load.yml +3 -0
  19. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_after_load_expected.csv +5 -0
  20. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_insert_direct_after_load.yml +3 -0
  21. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_after_load.yml +3 -0
  22. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_after_load_expected.csv +5 -0
  23. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_merge_direct_after_load.yml +3 -0
  24. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_replace_after_load.yml +3 -0
  25. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_replace_after_load_expected.csv +3 -0
  26. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_truncate_insert_after_load.yml +3 -0
  27. data/src/test/resources/org/embulk/output/mysql/test/expect/after_load/test_truncate_insert_after_load_expected.csv +3 -0
  28. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/setup.sql +8 -0
  29. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test1.csv +4 -0
  30. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_expected.diff +2 -0
  31. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_insert_before_load.yml +3 -0
  32. data/src/test/resources/{mysql/data/test1.csv → org/embulk/output/mysql/test/expect/before_load/test_insert_before_load_expected.csv} +1 -0
  33. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_insert_direct_before_load.yml +3 -0
  34. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_before_load.yml +3 -0
  35. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_before_load_expected.csv +4 -0
  36. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_merge_direct_before_load.yml +3 -0
  37. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_truncate_insert_before_load.yml +3 -0
  38. data/src/test/resources/org/embulk/output/mysql/test/expect/before_load/test_truncate_insert_before_load_expected.csv +4 -0
  39. data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/setup.sql +1 -0
  40. data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test1.csv +4 -0
  41. data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test_table_constraint.yml +5 -0
  42. data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test_table_constraint_expected.csv +3 -0
  43. data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test_table_option.yml +5 -0
  44. data/src/test/resources/org/embulk/output/mysql/test/expect/create_table/test_table_option_expected.csv +3 -0
  45. metadata +40 -18
  46. data/classpath/embulk-output-jdbc-0.7.7.jar +0 -0
  47. data/classpath/embulk-output-mysql-0.7.7.jar +0 -0
  48. data/classpath/mysql-connector-java-5.1.34.jar +0 -0
  49. data/src/test/java/org/embulk/output/mysql/MySQLOutputPluginTest.java +0 -569
  50. data/src/test/resources/mysql/yml/test-insert-after-load.yml +0 -22
  51. data/src/test/resources/mysql/yml/test-insert-before-load.yml +0 -22
  52. data/src/test/resources/mysql/yml/test-insert-direct-after-load.yml +0 -22
  53. data/src/test/resources/mysql/yml/test-insert-direct-before-load.yml +0 -22
  54. data/src/test/resources/mysql/yml/test-merge-after-load.yml +0 -22
  55. data/src/test/resources/mysql/yml/test-merge-before-load.yml +0 -22
  56. data/src/test/resources/mysql/yml/test-merge-direct-after-load.yml +0 -22
  57. data/src/test/resources/mysql/yml/test-merge-direct-before-load.yml +0 -22
  58. data/src/test/resources/mysql/yml/test-replace-after-load.yml +0 -22
  59. data/src/test/resources/mysql/yml/test-truncate-insert-after-load.yml +0 -22
  60. data/src/test/resources/mysql/yml/test-truncate-insert-before-load.yml +0 -22
@@ -1,22 +0,0 @@
1
- in:
2
- type: file
3
- path_prefix: '/mysql/data/test1.csv'
4
- parser:
5
- charset: UTF-8
6
- newline: CRLF
7
- type: csv
8
- delimiter: ','
9
- quote: ''
10
- columns:
11
- - {name: id, type: string}
12
- - {name: int_item, type: long}
13
- - {name: varchar_item, type: string}
14
- out:
15
- type: mysql
16
- host: #host#
17
- database: #database#
18
- user: #user#
19
- password: #password#
20
- table: test1
21
- mode: merge_direct
22
- after_load: "update test1 set varchar_item = 'x' where int_item = 9"
@@ -1,22 +0,0 @@
1
- in:
2
- type: file
3
- path_prefix: '/mysql/data/test1.csv'
4
- parser:
5
- charset: UTF-8
6
- newline: CRLF
7
- type: csv
8
- delimiter: ','
9
- quote: ''
10
- columns:
11
- - {name: id, type: string}
12
- - {name: int_item, type: long}
13
- - {name: varchar_item, type: string}
14
- out:
15
- type: mysql
16
- host: #host#
17
- database: #database#
18
- user: #user#
19
- password: #password#
20
- table: test1
21
- mode: merge_direct
22
- before_load: "delete from test1 where int_item = 9"
@@ -1,22 +0,0 @@
1
- in:
2
- type: file
3
- path_prefix: '/mysql/data/test1.csv'
4
- parser:
5
- charset: UTF-8
6
- newline: CRLF
7
- type: csv
8
- delimiter: ','
9
- quote: ''
10
- columns:
11
- - {name: id, type: string}
12
- - {name: int_item, type: long}
13
- - {name: varchar_item, type: string}
14
- out:
15
- type: mysql
16
- host: #host#
17
- database: #database#
18
- user: #user#
19
- password: #password#
20
- table: test1
21
- mode: replace
22
- after_load: "update test1 set varchar_item = 'x' where int_item = 9"
@@ -1,22 +0,0 @@
1
- in:
2
- type: file
3
- path_prefix: '/mysql/data/test1.csv'
4
- parser:
5
- charset: UTF-8
6
- newline: CRLF
7
- type: csv
8
- delimiter: ','
9
- quote: ''
10
- columns:
11
- - {name: id, type: string}
12
- - {name: int_item, type: long}
13
- - {name: varchar_item, type: string}
14
- out:
15
- type: mysql
16
- host: #host#
17
- database: #database#
18
- user: #user#
19
- password: #password#
20
- table: test1
21
- mode: truncate_insert
22
- after_load: "update test1 set varchar_item = 'x' where int_item = 9"
@@ -1,22 +0,0 @@
1
- in:
2
- type: file
3
- path_prefix: '/mysql/data/test1.csv'
4
- parser:
5
- charset: UTF-8
6
- newline: CRLF
7
- type: csv
8
- delimiter: ','
9
- quote: ''
10
- columns:
11
- - {name: id, type: string}
12
- - {name: int_item, type: long}
13
- - {name: varchar_item, type: string}
14
- out:
15
- type: mysql
16
- host: #host#
17
- database: #database#
18
- user: #user#
19
- password: #password#
20
- table: test1
21
- mode: truncate_insert
22
- before_load: "insert into test1 values('C001', 0, 'x')"