upsert 2.9.10-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.ruby-version +1 -0
  4. data/.standard.yml +1 -0
  5. data/.travis.yml +63 -0
  6. data/.yardopts +2 -0
  7. data/CHANGELOG +265 -0
  8. data/Gemfile +20 -0
  9. data/LICENSE +24 -0
  10. data/README.md +411 -0
  11. data/Rakefile +54 -0
  12. data/lib/upsert.rb +284 -0
  13. data/lib/upsert/active_record_upsert.rb +12 -0
  14. data/lib/upsert/binary.rb +8 -0
  15. data/lib/upsert/column_definition.rb +79 -0
  16. data/lib/upsert/column_definition/mysql.rb +24 -0
  17. data/lib/upsert/column_definition/postgresql.rb +66 -0
  18. data/lib/upsert/column_definition/sqlite3.rb +34 -0
  19. data/lib/upsert/connection.rb +37 -0
  20. data/lib/upsert/connection/Java_ComMysqlJdbc_JDBC4Connection.rb +31 -0
  21. data/lib/upsert/connection/Java_OrgPostgresqlJdbc_PgConnection.rb +33 -0
  22. data/lib/upsert/connection/Java_OrgSqlite_Conn.rb +17 -0
  23. data/lib/upsert/connection/Mysql2_Client.rb +76 -0
  24. data/lib/upsert/connection/PG_Connection.rb +35 -0
  25. data/lib/upsert/connection/SQLite3_Database.rb +28 -0
  26. data/lib/upsert/connection/jdbc.rb +105 -0
  27. data/lib/upsert/connection/postgresql.rb +24 -0
  28. data/lib/upsert/connection/sqlite3.rb +19 -0
  29. data/lib/upsert/merge_function.rb +73 -0
  30. data/lib/upsert/merge_function/Java_ComMysqlJdbc_JDBC4Connection.rb +42 -0
  31. data/lib/upsert/merge_function/Java_OrgPostgresqlJdbc_PgConnection.rb +27 -0
  32. data/lib/upsert/merge_function/Java_OrgSqlite_Conn.rb +10 -0
  33. data/lib/upsert/merge_function/Mysql2_Client.rb +36 -0
  34. data/lib/upsert/merge_function/PG_Connection.rb +26 -0
  35. data/lib/upsert/merge_function/SQLite3_Database.rb +10 -0
  36. data/lib/upsert/merge_function/mysql.rb +66 -0
  37. data/lib/upsert/merge_function/postgresql.rb +365 -0
  38. data/lib/upsert/merge_function/sqlite3.rb +43 -0
  39. data/lib/upsert/row.rb +59 -0
  40. data/lib/upsert/version.rb +3 -0
  41. data/spec/active_record_upsert_spec.rb +26 -0
  42. data/spec/binary_spec.rb +21 -0
  43. data/spec/correctness_spec.rb +190 -0
  44. data/spec/database_functions_spec.rb +106 -0
  45. data/spec/database_spec.rb +121 -0
  46. data/spec/hstore_spec.rb +249 -0
  47. data/spec/jruby_spec.rb +9 -0
  48. data/spec/logger_spec.rb +52 -0
  49. data/spec/misc/get_postgres_reserved_words.rb +12 -0
  50. data/spec/misc/mysql_reserved.txt +226 -0
  51. data/spec/misc/pg_reserved.txt +742 -0
  52. data/spec/multibyte_spec.rb +27 -0
  53. data/spec/postgresql_spec.rb +94 -0
  54. data/spec/precision_spec.rb +11 -0
  55. data/spec/reserved_words_spec.rb +50 -0
  56. data/spec/sequel_spec.rb +57 -0
  57. data/spec/spec_helper.rb +417 -0
  58. data/spec/speed_spec.rb +44 -0
  59. data/spec/threaded_spec.rb +57 -0
  60. data/spec/timezones_spec.rb +58 -0
  61. data/spec/type_safety_spec.rb +12 -0
  62. data/travis/install_postgres.sh +18 -0
  63. data/travis/run_docker_db.sh +20 -0
  64. data/travis/tune_mysql.sh +7 -0
  65. data/upsert-java.gemspec +14 -0
  66. data/upsert.gemspec +13 -0
  67. data/upsert.gemspec.common +106 -0
  68. metadata +373 -0
@@ -0,0 +1,742 @@
1
+ A
2
+ ABORT
3
+ ABS
4
+ ABSENT
5
+ ABSOLUTE
6
+ ACCESS
7
+ ACCORDING
8
+ ACTION
9
+ ADA
10
+ ADD
11
+ ADMIN
12
+ AFTER
13
+ AGGREGATE
14
+ ALIAS
15
+ ALL
16
+ ALLOCATE
17
+ ALSO
18
+ ALTER
19
+ ALWAYS
20
+ ANALYSE
21
+ ANALYZE
22
+ AND
23
+ ANY
24
+ ARE
25
+ ARRAY
26
+ ARRAY_AGG
27
+ AS
28
+ ASC
29
+ ASENSITIVE
30
+ ASSERTION
31
+ ASSIGNMENT
32
+ ASYMMETRIC
33
+ AT
34
+ ATOMIC
35
+ ATTRIBUTE
36
+ ATTRIBUTES
37
+ AUTHORIZATION
38
+ AVG
39
+ BACKWARD
40
+ BASE64
41
+ BEFORE
42
+ BEGIN
43
+ BERNOULLI
44
+ BETWEEN
45
+ BIGINT
46
+ BINARY
47
+ BIT
48
+ BITVAR
49
+ BIT_LENGTH
50
+ BLOB
51
+ BLOCKED
52
+ BOM
53
+ BOOLEAN
54
+ BOTH
55
+ BREADTH
56
+ BY
57
+ C
58
+ CACHE
59
+ CALL
60
+ CALLED
61
+ CARDINALITY
62
+ CASCADE
63
+ CASCADED
64
+ CASE
65
+ CAST
66
+ CATALOG
67
+ CATALOG_NAME
68
+ CEIL
69
+ CEILING
70
+ CHAIN
71
+ CHAR
72
+ CHARACTER
73
+ CHARACTERISTICS
74
+ CHARACTERS
75
+ CHARACTER_LENGTH
76
+ CHARACTER_SET_CATALOG
77
+ CHARACTER_SET_NAME
78
+ CHARACTER_SET_SCHEMA
79
+ CHAR_LENGTH
80
+ CHECK
81
+ CHECKED
82
+ CHECKPOINT
83
+ CLASS
84
+ CLASS_ORIGIN
85
+ CLOB
86
+ CLOSE
87
+ CLUSTER
88
+ COALESCE
89
+ COBOL
90
+ COLLATE
91
+ COLLATION
92
+ COLLATION_CATALOG
93
+ COLLATION_NAME
94
+ COLLATION_SCHEMA
95
+ COLLECT
96
+ COLUMN
97
+ COLUMNS
98
+ COLUMN_NAME
99
+ COMMAND_FUNCTION
100
+ COMMAND_FUNCTION_CODE
101
+ COMMENT
102
+ COMMENTS
103
+ COMMIT
104
+ COMMITTED
105
+ COMPLETION
106
+ CONCURRENTLY
107
+ CONDITION
108
+ CONDITION_NUMBER
109
+ CONFIGURATION
110
+ CONNECT
111
+ CONNECTION
112
+ CONNECTION_NAME
113
+ CONSTRAINT
114
+ CONSTRAINTS
115
+ CONSTRAINT_CATALOG
116
+ CONSTRAINT_NAME
117
+ CONSTRAINT_SCHEMA
118
+ CONSTRUCTOR
119
+ CONTAINS
120
+ CONTENT
121
+ CONTINUE
122
+ CONTROL
123
+ CONVERSION
124
+ CONVERT
125
+ COPY
126
+ CORR
127
+ CORRESPONDING
128
+ COST
129
+ COUNT
130
+ COVAR_POP
131
+ COVAR_SAMP
132
+ CREATE
133
+ CROSS
134
+ CSV
135
+ CUBE
136
+ CUME_DIST
137
+ CURRENT
138
+ CURRENT_CATALOG
139
+ CURRENT_DATE
140
+ CURRENT_DEFAULT_TRANSFORM_GROUP
141
+ CURRENT_PATH
142
+ CURRENT_ROLE
143
+ CURRENT_SCHEMA
144
+ CURRENT_TIME
145
+ CURRENT_TIMESTAMP
146
+ CURRENT_TRANSFORM_GROUP_FOR_TYPE
147
+ CURRENT_USER
148
+ CURSOR
149
+ CURSOR_NAME
150
+ CYCLE
151
+ DATA
152
+ DATABASE
153
+ DATALINK
154
+ DATE
155
+ DATETIME_INTERVAL_CODE
156
+ DATETIME_INTERVAL_PRECISION
157
+ DAY
158
+ DB
159
+ DEALLOCATE
160
+ DEC
161
+ DECIMAL
162
+ DECLARE
163
+ DEFAULT
164
+ DEFAULTS
165
+ DEFERRABLE
166
+ DEFERRED
167
+ DEFINED
168
+ DEFINER
169
+ DEGREE
170
+ DELETE
171
+ DELIMITER
172
+ DELIMITERS
173
+ DENSE_RANK
174
+ DEPTH
175
+ DEREF
176
+ DERIVED
177
+ DESC
178
+ DESCRIBE
179
+ DESCRIPTOR
180
+ DESTROY
181
+ DESTRUCTOR
182
+ DETERMINISTIC
183
+ DIAGNOSTICS
184
+ DICTIONARY
185
+ DISABLE
186
+ DISCARD
187
+ DISCONNECT
188
+ DISPATCH
189
+ DISTINCT
190
+ DLNEWCOPY
191
+ DLPREVIOUSCOPY
192
+ DLURLCOMPLETE
193
+ DLURLCOMPLETEONLY
194
+ DLURLCOMPLETEWRITE
195
+ DLURLPATH
196
+ DLURLPATHONLY
197
+ DLURLPATHWRITE
198
+ DLURLSCHEME
199
+ DLURLSERVER
200
+ DLVALUE
201
+ DO
202
+ DOCUMENT
203
+ DOMAIN
204
+ DOUBLE
205
+ DROP
206
+ DYNAMIC
207
+ DYNAMIC_FUNCTION
208
+ DYNAMIC_FUNCTION_CODE
209
+ EACH
210
+ ELEMENT
211
+ ELSE
212
+ EMPTY
213
+ ENABLE
214
+ ENCODING
215
+ ENCRYPTED
216
+ END
217
+ END-EXEC
218
+ ENUM
219
+ EQUALS
220
+ ESCAPE
221
+ EVERY
222
+ EXCEPT
223
+ EXCEPTION
224
+ EXCLUDE
225
+ EXCLUDING
226
+ EXCLUSIVE
227
+ EXEC
228
+ EXECUTE
229
+ EXISTING
230
+ EXISTS
231
+ EXP
232
+ EXPLAIN
233
+ EXTENSION
234
+ EXTERNAL
235
+ EXTRACT
236
+ FALSE
237
+ FAMILY
238
+ FETCH
239
+ FILE
240
+ FILTER
241
+ FINAL
242
+ FIRST
243
+ FIRST_VALUE
244
+ FLAG
245
+ FLOAT
246
+ FLOOR
247
+ FOLLOWING
248
+ FOR
249
+ FORCE
250
+ FOREIGN
251
+ FORTRAN
252
+ FORWARD
253
+ FOUND
254
+ FREE
255
+ FREEZE
256
+ FROM
257
+ FS
258
+ FULL
259
+ FUNCTION
260
+ FUNCTIONS
261
+ FUSION
262
+ G
263
+ GENERAL
264
+ GENERATED
265
+ GET
266
+ GLOBAL
267
+ GO
268
+ GOTO
269
+ GRANT
270
+ GRANTED
271
+ GREATEST
272
+ GROUP
273
+ GROUPING
274
+ HANDLER
275
+ HAVING
276
+ HEADER
277
+ HEX
278
+ HIERARCHY
279
+ HOLD
280
+ HOST
281
+ HOUR
282
+ ID
283
+ IDENTITY
284
+ IF
285
+ IGNORE
286
+ ILIKE
287
+ IMMEDIATE
288
+ IMMUTABLE
289
+ IMPLEMENTATION
290
+ IMPLICIT
291
+ IMPORT
292
+ IN
293
+ INCLUDING
294
+ INCREMENT
295
+ INDENT
296
+ INDEX
297
+ INDEXES
298
+ INDICATOR
299
+ INFIX
300
+ INHERIT
301
+ INHERITS
302
+ INITIALIZE
303
+ INITIALLY
304
+ INLINE
305
+ INNER
306
+ INOUT
307
+ INPUT
308
+ INSENSITIVE
309
+ INSERT
310
+ INSTANCE
311
+ INSTANTIABLE
312
+ INSTEAD
313
+ INT
314
+ INTEGER
315
+ INTEGRITY
316
+ INTERSECT
317
+ INTERSECTION
318
+ INTERVAL
319
+ INTO
320
+ INVOKER
321
+ IS
322
+ ISNULL
323
+ ISOLATION
324
+ ITERATE
325
+ JOIN
326
+ K
327
+ KEY
328
+ KEY_MEMBER
329
+ KEY_TYPE
330
+ LABEL
331
+ LAG
332
+ LANGUAGE
333
+ LARGE
334
+ LAST
335
+ LAST_VALUE
336
+ LATERAL
337
+ LC_COLLATE
338
+ LC_CTYPE
339
+ LEAD
340
+ LEADING
341
+ LEAST
342
+ LEFT
343
+ LENGTH
344
+ LESS
345
+ LEVEL
346
+ LIBRARY
347
+ LIKE
348
+ LIKE_REGEX
349
+ LIMIT
350
+ LINK
351
+ LISTEN
352
+ LN
353
+ LOAD
354
+ LOCAL
355
+ LOCALTIME
356
+ LOCALTIMESTAMP
357
+ LOCATION
358
+ LOCATOR
359
+ LOCK
360
+ LOWER
361
+ M
362
+ MAP
363
+ MAPPING
364
+ MATCH
365
+ MATCHED
366
+ MAX
367
+ MAXVALUE
368
+ MAX_CARDINALITY
369
+ MEMBER
370
+ MERGE
371
+ MESSAGE_LENGTH
372
+ MESSAGE_OCTET_LENGTH
373
+ MESSAGE_TEXT
374
+ METHOD
375
+ MIN
376
+ MINUTE
377
+ MINVALUE
378
+ MOD
379
+ MODE
380
+ MODIFIES
381
+ MODIFY
382
+ MODULE
383
+ MONTH
384
+ MORE
385
+ MOVE
386
+ MULTISET
387
+ MUMPS
388
+ NAME
389
+ NAMES
390
+ NAMESPACE
391
+ NATIONAL
392
+ NATURAL
393
+ NCHAR
394
+ NCLOB
395
+ NESTING
396
+ NEW
397
+ NEXT
398
+ NFC
399
+ NFD
400
+ NFKC
401
+ NFKD
402
+ NIL
403
+ NO
404
+ NONE
405
+ NORMALIZE
406
+ NORMALIZED
407
+ NOT
408
+ NOTHING
409
+ NOTIFY
410
+ NOTNULL
411
+ NOWAIT
412
+ NTH_VALUE
413
+ NTILE
414
+ NULL
415
+ NULLABLE
416
+ NULLIF
417
+ NULLS
418
+ NUMBER
419
+ NUMERIC
420
+ OBJECT
421
+ OCCURRENCES_REGEX
422
+ OCTETS
423
+ OCTET_LENGTH
424
+ OF
425
+ OFF
426
+ OFFSET
427
+ OIDS
428
+ OLD
429
+ ON
430
+ ONLY
431
+ OPEN
432
+ OPERATION
433
+ OPERATOR
434
+ OPTION
435
+ OPTIONS
436
+ OR
437
+ ORDER
438
+ ORDERING
439
+ ORDINALITY
440
+ OTHERS
441
+ OUT
442
+ OUTER
443
+ OUTPUT
444
+ OVER
445
+ OVERLAPS
446
+ OVERLAY
447
+ OVERRIDING
448
+ OWNED
449
+ OWNER
450
+ P
451
+ PAD
452
+ PARAMETER
453
+ PARAMETERS
454
+ PARAMETER_MODE
455
+ PARAMETER_NAME
456
+ PARAMETER_ORDINAL_POSITION
457
+ PARAMETER_SPECIFIC_CATALOG
458
+ PARAMETER_SPECIFIC_NAME
459
+ PARAMETER_SPECIFIC_SCHEMA
460
+ PARSER
461
+ PARTIAL
462
+ PARTITION
463
+ PASCAL
464
+ PASSING
465
+ PASSTHROUGH
466
+ PASSWORD
467
+ PATH
468
+ PERCENTILE_CONT
469
+ PERCENTILE_DISC
470
+ PERCENT_RANK
471
+ PERMISSION
472
+ PLACING
473
+ PLANS
474
+ PLI
475
+ POSITION
476
+ POSITION_REGEX
477
+ POSTFIX
478
+ POWER
479
+ PRECEDING
480
+ PRECISION
481
+ PREFIX
482
+ PREORDER
483
+ PREPARE
484
+ PREPARED
485
+ PRESERVE
486
+ PRIMARY
487
+ PRIOR
488
+ PRIVILEGES
489
+ PROCEDURAL
490
+ PROCEDURE
491
+ PUBLIC
492
+ QUOTE
493
+ RANGE
494
+ RANK
495
+ READ
496
+ READS
497
+ REAL
498
+ REASSIGN
499
+ RECHECK
500
+ RECOVERY
501
+ RECURSIVE
502
+ REF
503
+ REFERENCES
504
+ REFERENCING
505
+ REGR_AVGX
506
+ REGR_AVGY
507
+ REGR_COUNT
508
+ REGR_INTERCEPT
509
+ REGR_R2
510
+ REGR_SLOPE
511
+ REGR_SXX
512
+ REGR_SXY
513
+ REGR_SYY
514
+ REINDEX
515
+ RELATIVE
516
+ RELEASE
517
+ RENAME
518
+ REPEATABLE
519
+ REPLACE
520
+ REPLICA
521
+ REQUIRING
522
+ RESET
523
+ RESPECT
524
+ RESTART
525
+ RESTORE
526
+ RESTRICT
527
+ RESULT
528
+ RETURN
529
+ RETURNED_CARDINALITY
530
+ RETURNED_LENGTH
531
+ RETURNED_OCTET_LENGTH
532
+ RETURNED_SQLSTATE
533
+ RETURNING
534
+ RETURNS
535
+ REVOKE
536
+ RIGHT
537
+ ROLE
538
+ ROLLBACK
539
+ ROLLUP
540
+ ROUTINE
541
+ ROUTINE_CATALOG
542
+ ROUTINE_NAME
543
+ ROUTINE_SCHEMA
544
+ ROW
545
+ ROWS
546
+ ROW_COUNT
547
+ ROW_NUMBER
548
+ RULE
549
+ SAVEPOINT
550
+ SCALE
551
+ SCHEMA
552
+ SCHEMA_NAME
553
+ SCOPE
554
+ SCOPE_CATALOG
555
+ SCOPE_NAME
556
+ SCOPE_SCHEMA
557
+ SCROLL
558
+ SEARCH
559
+ SECOND
560
+ SECTION
561
+ SECURITY
562
+ SELECT
563
+ SELECTIVE
564
+ SELF
565
+ SENSITIVE
566
+ SEQUENCE
567
+ SEQUENCES
568
+ SERIALIZABLE
569
+ SERVER
570
+ SERVER_NAME
571
+ SESSION
572
+ SESSION_USER
573
+ SET
574
+ SETOF
575
+ SETS
576
+ SHARE
577
+ SHOW
578
+ SIMILAR
579
+ SIMPLE
580
+ SIZE
581
+ SMALLINT
582
+ SOME
583
+ SOURCE
584
+ SPACE
585
+ SPECIFIC
586
+ SPECIFICTYPE
587
+ SPECIFIC_NAME
588
+ SQL
589
+ SQLCODE
590
+ SQLERROR
591
+ SQLEXCEPTION
592
+ SQLSTATE
593
+ SQLWARNING
594
+ SQRT
595
+ STABLE
596
+ STANDALONE
597
+ START
598
+ STATE
599
+ STATEMENT
600
+ STATIC
601
+ STATISTICS
602
+ STDDEV_POP
603
+ STDDEV_SAMP
604
+ STDIN
605
+ STDOUT
606
+ STORAGE
607
+ STRICT
608
+ STRIP
609
+ STRUCTURE
610
+ STYLE
611
+ SUBCLASS_ORIGIN
612
+ SUBLIST
613
+ SUBMULTISET
614
+ SUBSTRING
615
+ SUBSTRING_REGEX
616
+ SUM
617
+ SYMMETRIC
618
+ SYSID
619
+ SYSTEM
620
+ SYSTEM_USER
621
+ T
622
+ TABLE
623
+ TABLES
624
+ TABLESAMPLE
625
+ TABLESPACE
626
+ TABLE_NAME
627
+ TEMP
628
+ TEMPLATE
629
+ TEMPORARY
630
+ TERMINATE
631
+ TEXT
632
+ THAN
633
+ THEN
634
+ TIES
635
+ TIME
636
+ TIMESTAMP
637
+ TIMEZONE_HOUR
638
+ TIMEZONE_MINUTE
639
+ TO
640
+ TOKEN
641
+ TOP_LEVEL_COUNT
642
+ TRAILING
643
+ TRANSACTION
644
+ TRANSACTIONS_COMMITTED
645
+ TRANSACTIONS_ROLLED_BACK
646
+ TRANSACTION_ACTIVE
647
+ TRANSFORM
648
+ TRANSFORMS
649
+ TRANSLATE
650
+ TRANSLATE_REGEX
651
+ TRANSLATION
652
+ TREAT
653
+ TRIGGER
654
+ TRIGGER_CATALOG
655
+ TRIGGER_NAME
656
+ TRIGGER_SCHEMA
657
+ TRIM
658
+ TRIM_ARRAY
659
+ TRUE
660
+ TRUNCATE
661
+ TRUSTED
662
+ TYPE
663
+ UESCAPE
664
+ UNBOUNDED
665
+ UNCOMMITTED
666
+ UNDER
667
+ UNENCRYPTED
668
+ UNION
669
+ UNIQUE
670
+ UNKNOWN
671
+ UNLINK
672
+ UNLISTEN
673
+ UNLOGGED
674
+ UNNAMED
675
+ UNNEST
676
+ UNTIL
677
+ UNTYPED
678
+ UPDATE
679
+ UPPER
680
+ URI
681
+ USAGE
682
+ USER
683
+ USER_DEFINED_TYPE_CATALOG
684
+ USER_DEFINED_TYPE_CODE
685
+ USER_DEFINED_TYPE_NAME
686
+ USER_DEFINED_TYPE_SCHEMA
687
+ USING
688
+ VACUUM
689
+ VALID
690
+ VALIDATE
691
+ VALIDATOR
692
+ VALUE
693
+ VALUES
694
+ VARBINARY
695
+ VARCHAR
696
+ VARIABLE
697
+ VARIADIC
698
+ VARYING
699
+ VAR_POP
700
+ VAR_SAMP
701
+ VERBOSE
702
+ VERSION
703
+ VIEW
704
+ VOLATILE
705
+ WHEN
706
+ WHENEVER
707
+ WHERE
708
+ WHITESPACE
709
+ WIDTH_BUCKET
710
+ WINDOW
711
+ WITH
712
+ WITHIN
713
+ WITHOUT
714
+ WORK
715
+ WRAPPER
716
+ WRITE
717
+ XML
718
+ XMLAGG
719
+ XMLATTRIBUTES
720
+ XMLBINARY
721
+ XMLCAST
722
+ XMLCOMMENT
723
+ XMLCONCAT
724
+ XMLDECLARATION
725
+ XMLDOCUMENT
726
+ XMLELEMENT
727
+ XMLEXISTS
728
+ XMLFOREST
729
+ XMLITERATE
730
+ XMLNAMESPACES
731
+ XMLPARSE
732
+ XMLPI
733
+ XMLQUERY
734
+ XMLROOT
735
+ XMLSCHEMA
736
+ XMLSERIALIZE
737
+ XMLTABLE
738
+ XMLTEXT
739
+ XMLVALIDATE
740
+ YEAR
741
+ YES
742
+ ZONE