upsert 2.9.9-universal-java-11

Sign up to get free protection for your applications and to get access to all the features.
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 +16 -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 +13 -0
  66. data/upsert.gemspec +11 -0
  67. data/upsert.gemspec.common +107 -0
  68. metadata +373 -0
@@ -0,0 +1,44 @@
1
+ require 'spec_helper'
2
+ describe Upsert do
3
+ describe "can be speeded up with upserting" do
4
+ describe 'compared to native ActiveRecord' do
5
+ it "is faster than new/set/save" do
6
+ assert_faster_than 'find + new/set/save', lotsa_records do |records|
7
+ records.each do |selector, setter|
8
+ if pet = Pet.where(selector).first
9
+ pet.update_attributes(setter)
10
+ else
11
+ pet = Pet.new
12
+ selector.each do |k, v|
13
+ pet.send "#{k}=", v
14
+ end
15
+ setter.each do |k, v|
16
+ pet.send "#{k}=", v
17
+ end
18
+ pet.save!
19
+ end
20
+ end
21
+ end
22
+ end
23
+ it "is faster than find_or_create + update_attributes" do
24
+ assert_faster_than 'find_or_create + update_attributes', lotsa_records do |records|
25
+ dynamic_method = nil
26
+ records.each do |selector, setter|
27
+ Pet.find_or_create_by(selector).update_attributes(setter)
28
+ end
29
+ end
30
+ end
31
+ it "is faster than create + rescue/find/update" do
32
+ assert_faster_than 'create + rescue/find/update', lotsa_records do |records|
33
+ records.each do |selector, setter|
34
+ begin
35
+ Pet.create selector.merge(setter), :without_protection => true
36
+ rescue
37
+ Pet.find_or_create_by(selector).update_attributes(setter)
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,57 @@
1
+ require 'spec_helper'
2
+ describe Upsert do
3
+ Thread.abort_on_exception = true
4
+ describe "is thread-safe" do
5
+ it "is safe to use one-by-one" do
6
+ upsert = Upsert.new $conn, :pets
7
+ assert_creates(Pet, [{:name => 'Jerry', :gender => 'neutered'}]) do
8
+ ts = []
9
+ 10.times do
10
+ ts << Thread.new {
11
+ ActiveRecord::Base.connection_pool.with_connection do |conn|
12
+ sleep 0.2
13
+ upsert.row({name: "Jerry"}, gender: "male")
14
+ upsert.row({name: "Jerry"}, gender: "neutered")
15
+ end
16
+ }
17
+ end
18
+ ts.each { |t| t.join(3) }
19
+ end
20
+ end
21
+ it "is safe to use batch" do
22
+ assert_creates(Pet, [{:name => 'Jerry', :gender => 'neutered'}]) do
23
+ Upsert.batch($conn, :pets) do |upsert|
24
+ ts = []
25
+ 10.times do
26
+ ts << Thread.new {
27
+ ActiveRecord::Base.connection_pool.with_connection do |conn|
28
+ sleep 0.2
29
+ upsert.row({name: "Jerry"}, gender: "male")
30
+ upsert.row({name: "Jerry"}, gender: "neutered")
31
+ end
32
+ }
33
+ end
34
+ ts.each { |t| t.join(3) }
35
+ end
36
+ end
37
+ end
38
+
39
+ it "is safe to use with the entire block instead the thread" do
40
+ assert_creates(Pet, [{name: "Jerry", gender: "neutered"}]) do
41
+ ts = []
42
+ 10.times do
43
+ ts << Thread.new {
44
+ ActiveRecord::Base.connection_pool.with_connection do |conn|
45
+ sleep 0.1
46
+ Upsert.batch(conn, :pets) do |upsert|
47
+ upsert.row({name: "Jerry"}, gender: "male")
48
+ upsert.row({name: "Jerry"}, gender: "neutered")
49
+ end
50
+ end
51
+ }
52
+ end
53
+ ts.each { |t| t.join(3) }
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,58 @@
1
+ require 'spec_helper'
2
+ describe Upsert do
3
+ describe "timezone support" do
4
+ it "takes times in UTC" do
5
+ time = Time.new.utc
6
+ if ENV['DB'] == 'mysql'
7
+ time = time.change(:usec => 0)
8
+ end
9
+ upsert = Upsert.new $conn, :pets
10
+ assert_creates(Pet, [[{:name => 'Jerry'}, {:morning_walk_time => time}]]) do
11
+ upsert.row({:name => 'Jerry'}, {:morning_walk_time => time})
12
+ end
13
+ end
14
+
15
+ it "takes times in local" do
16
+ time = Time.new
17
+ if ENV['DB'] == 'mysql'
18
+ time = time.change(:usec => 0)
19
+ end
20
+ upsert = Upsert.new $conn, :pets
21
+ assert_creates(Pet, [[{:name => 'Jerry'}, {:morning_walk_time => time}]]) do
22
+ upsert.row({:name => 'Jerry'}, {:morning_walk_time => time})
23
+ end
24
+ end
25
+
26
+ it "takes datetimes in UTC" do
27
+ time = DateTime.now.new_offset(Rational(0, 24))
28
+ if ENV['DB'] == 'mysql'
29
+ time = time.change(:usec => 0)
30
+ end
31
+ upsert = Upsert.new $conn, :pets
32
+ assert_creates(Pet, [[{:name => 'Jerry'}, {:morning_walk_time => time}]]) do
33
+ upsert.row({:name => 'Jerry'}, {:morning_walk_time => time})
34
+ end
35
+ end
36
+
37
+ it "takes datetimes in local" do
38
+ time = DateTime.now
39
+ if ENV['DB'] == 'mysql'
40
+ time = time.change(:usec => 0)
41
+ end
42
+ upsert = Upsert.new $conn, :pets
43
+ assert_creates(Pet, [[{:name => 'Jerry'}, {:morning_walk_time => time}]]) do
44
+ upsert.row({:name => 'Jerry'}, {:morning_walk_time => time})
45
+ end
46
+ end
47
+
48
+ if ENV['DB'] == 'postgresql'
49
+ it "doesn't die on timestamp without time zone (postgresql)" do
50
+ time = Time.new.utc
51
+ upsert = Upsert.new $conn, :pets
52
+ assert_creates(Pet, [[{:name => 'Jerry'}, {:tsntz => time}]]) do
53
+ upsert.row({:name => 'Jerry'}, {:tsntz => time})
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+ describe Upsert do
3
+ describe "type safety" do
4
+ it "does not attempt to typecast values" do
5
+ error_class = RUBY_PLATFORM == 'java' ? org.postgresql.util.PSQLException : PG::InvalidTextRepresentation
6
+ upsert = Upsert.new $conn, :pets
7
+ lambda do
8
+ upsert.row :tag_number => ''
9
+ end.should raise_error error_class
10
+ end
11
+ end
12
+ end if ENV['DB'] == 'postgresql'
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ # Ref https://github.com/clkao/plv8x/blob/master/.travis.yml
3
+ echo "Install postgres version $PGVERSION"
4
+ psql --version
5
+ sudo /etc/init.d/postgresql stop
6
+ sudo apt-get -y --purge remove postgresql libpq-dev libpq5 postgresql-client-common postgresql-common
7
+ sudo rm -rf /var/lib/postgresql
8
+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
9
+ sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main $PGVERSION >> /etc/apt/sources.list.d/postgresql.list"
10
+ sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg-testing main $PGVERSION >> /etc/apt/sources.list.d/postgresql.list"
11
+ sudo apt-get update -qq
12
+ sudo apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::="--force-confnew" install postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-$PGVERSION-plv8
13
+ sudo chmod 777 /etc/postgresql/$PGVERSION/main/pg_hba.conf
14
+ sudo echo "local all postgres trust" > /etc/postgresql/$PGVERSION/main/pg_hba.conf
15
+ sudo echo "local all all trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
16
+ sudo echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
17
+ sudo echo "host all all ::1/128 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
18
+ sudo /etc/init.d/postgresql restart
@@ -0,0 +1,20 @@
1
+ docker network create -d bridge --subnet 172.25.0.0/16 --gateway 172.25.0.1 upsert_test
2
+
3
+ case "$DB" in
4
+ postgresql)
5
+ docker run --tmpfs /var/lib/postgresql/data:rw --rm --name upsert_test_db_server \
6
+ -e POSTGRES_USER=$DB_USER -e POSTGRES_PASSWORD=$DB_PASSWORD -e POSTGRES_DB=$DB_NAME \
7
+ -p 5432:5432 -d \
8
+ $DB_VERSION
9
+ sleep 10
10
+ ;;
11
+ mysql)
12
+ docker run --network upsert_test --ip 172.25.0.2 --tmpfs /var/lib/mysql:rw --rm --name upsert_test_db_server \
13
+ -e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=$DB_USER -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_NAME \
14
+ -p 3306:3306 -d \
15
+ $DB_VERSION \
16
+ --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --default-time-zone=+00:00
17
+ sleep 10
18
+ docker run --network upsert_test --rm $DB_VERSION mysql -h172.25.0.2 -uroot -proot -e "GRANT ALL ON *.* TO '$DB_USER'"
19
+ ;;
20
+ esac
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # Ref https://github.com/travis-ci/travis-ci/issues/2250
3
+ # Ref https://github.com/jruby/activerecord-jdbc-adapter/issues/481
4
+ # JDBC adapters determine the encoding automatically via the server's charset and collation
5
+ echo "Tuning MySQL"
6
+ echo -e "[server]\ncharacter-set-server=utf8mb4\ncollation-server=utf8mb4_unicode_ci\n" | sudo tee -a /etc/mysql/my.cnf
7
+ sudo service mysql restart
@@ -0,0 +1,13 @@
1
+ Gem::Specification.load(File.expand_path("upsert.gemspec.common", __dir__)).dup.tap do |gem|
2
+ gem.instance_exec do
3
+ self.name = "upsert"
4
+ self.platform = "java"
5
+ add_development_dependency "jruby-openssl"
6
+ add_development_dependency "jdbc-postgres"
7
+ add_development_dependency "jdbc-mysql"
8
+ add_development_dependency "jdbc-sqlite3"
9
+ add_development_dependency "activerecord-jdbc-adapter"
10
+
11
+ add_development_dependency "pry-nav"
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ Gem::Specification.load(File.expand_path("upsert.gemspec.common", __dir__)).dup.tap do |gem|
2
+ gem.instance_exec do
3
+ self.name = "upsert"
4
+ add_development_dependency "activerecord-postgresql-adapter"
5
+ add_development_dependency "sqlite3"
6
+ add_development_dependency "mysql2", "~> 0.5"
7
+ add_development_dependency "pg", "~> 1.1"
8
+
9
+ add_development_dependency "pry-byebug"
10
+ end
11
+ end
@@ -0,0 +1,107 @@
1
+ require File.expand_path("../lib/upsert/version", __FILE__)
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.authors = ["Seamus Abshere", "Phil Schalm"]
5
+ gem.email = ["seamus@abshere.net", "pnomolos@gmail.com"]
6
+ t = %{Make it easy to upsert on MySQL, PostgreSQL, and SQLite3. Transparently creates merge functions for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE.}
7
+ gem.description = t
8
+ gem.summary = t
9
+ gem.homepage = "https://github.com/seamusabshere/upsert"
10
+ gem.license = "MIT"
11
+ gem.platform = Gem::Platform::CURRENT
12
+
13
+ # We no longer use `git ls-files` here because it breaks on some version of jruby...
14
+ # For some slightly related information:
15
+ # - https://github.com/jruby/jruby/issues/4515
16
+ # - https://github.com/jruby/jruby/issues/5249
17
+ #
18
+ gem.files = %w[
19
+ .gitignore
20
+ .ruby-version
21
+ .standard.yml
22
+ .travis.yml
23
+ .yardopts
24
+ CHANGELOG
25
+ Gemfile
26
+ LICENSE
27
+ README.md
28
+ Rakefile
29
+ lib/upsert.rb
30
+ lib/upsert/active_record_upsert.rb
31
+ lib/upsert/binary.rb
32
+ lib/upsert/column_definition.rb
33
+ lib/upsert/column_definition/mysql.rb
34
+ lib/upsert/column_definition/postgresql.rb
35
+ lib/upsert/column_definition/sqlite3.rb
36
+ lib/upsert/connection.rb
37
+ lib/upsert/connection/Java_ComMysqlJdbc_JDBC4Connection.rb
38
+ lib/upsert/connection/Java_OrgPostgresqlJdbc_PgConnection.rb
39
+ lib/upsert/connection/Java_OrgSqlite_Conn.rb
40
+ lib/upsert/connection/Mysql2_Client.rb
41
+ lib/upsert/connection/PG_Connection.rb
42
+ lib/upsert/connection/SQLite3_Database.rb
43
+ lib/upsert/connection/jdbc.rb
44
+ lib/upsert/connection/postgresql.rb
45
+ lib/upsert/connection/sqlite3.rb
46
+ lib/upsert/merge_function.rb
47
+ lib/upsert/merge_function/Java_ComMysqlJdbc_JDBC4Connection.rb
48
+ lib/upsert/merge_function/Java_OrgPostgresqlJdbc_PgConnection.rb
49
+ lib/upsert/merge_function/Java_OrgSqlite_Conn.rb
50
+ lib/upsert/merge_function/Mysql2_Client.rb
51
+ lib/upsert/merge_function/PG_Connection.rb
52
+ lib/upsert/merge_function/SQLite3_Database.rb
53
+ lib/upsert/merge_function/mysql.rb
54
+ lib/upsert/merge_function/postgresql.rb
55
+ lib/upsert/merge_function/sqlite3.rb
56
+ lib/upsert/row.rb
57
+ lib/upsert/version.rb
58
+ spec/active_record_upsert_spec.rb
59
+ spec/binary_spec.rb
60
+ spec/correctness_spec.rb
61
+ spec/database_functions_spec.rb
62
+ spec/database_spec.rb
63
+ spec/hstore_spec.rb
64
+ spec/jruby_spec.rb
65
+ spec/logger_spec.rb
66
+ spec/misc/get_postgres_reserved_words.rb
67
+ spec/misc/mysql_reserved.txt
68
+ spec/misc/pg_reserved.txt
69
+ spec/multibyte_spec.rb
70
+ spec/postgresql_spec.rb
71
+ spec/precision_spec.rb
72
+ spec/reserved_words_spec.rb
73
+ spec/sequel_spec.rb
74
+ spec/spec_helper.rb
75
+ spec/speed_spec.rb
76
+ spec/threaded_spec.rb
77
+ spec/timezones_spec.rb
78
+ spec/type_safety_spec.rb
79
+ travis/install_postgres.sh
80
+ travis/run_docker_db.sh
81
+ travis/tune_mysql.sh
82
+ upsert-java.gemspec
83
+ upsert.gemspec
84
+ upsert.gemspec.common
85
+ ]
86
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
87
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
88
+ gem.name = "upsert"
89
+ gem.require_paths = ["lib"]
90
+ gem.version = Upsert::VERSION
91
+
92
+ # NOTE: no runtime dependencies!
93
+
94
+ gem.add_development_dependency 'rspec-core'
95
+ gem.add_development_dependency 'rspec-expectations'
96
+ gem.add_development_dependency 'rspec-mocks'
97
+
98
+ gem.add_development_dependency 'activerecord', '~> 5'
99
+ gem.add_development_dependency 'yard'
100
+ gem.add_development_dependency 'pry'
101
+ gem.add_development_dependency 'pg-hstore', ">=1.1.3"
102
+ gem.add_development_dependency 'sequel'
103
+ gem.add_development_dependency 'rake', '~> 10'
104
+
105
+ gem.add_development_dependency "activerecord-import", "~> 1"
106
+ gem.add_development_dependency "faker"
107
+ end
metadata ADDED
@@ -0,0 +1,373 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: upsert
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.9.9
5
+ platform: universal-java-11
6
+ authors:
7
+ - Seamus Abshere
8
+ - Phil Schalm
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2019-11-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ name: rspec-core
21
+ prerelease: false
22
+ type: :development
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ name: rspec-expectations
35
+ prerelease: false
36
+ type: :development
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ name: rspec-mocks
49
+ prerelease: false
50
+ type: :development
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '5'
62
+ name: activerecord
63
+ prerelease: false
64
+ type: :development
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '5'
70
+ - !ruby/object:Gem::Dependency
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ name: yard
77
+ prerelease: false
78
+ type: :development
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ name: pry
91
+ prerelease: false
92
+ type: :development
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 1.1.3
104
+ name: pg-hstore
105
+ prerelease: false
106
+ type: :development
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: 1.1.3
112
+ - !ruby/object:Gem::Dependency
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ name: sequel
119
+ prerelease: false
120
+ type: :development
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '10'
132
+ name: rake
133
+ prerelease: false
134
+ type: :development
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '10'
140
+ - !ruby/object:Gem::Dependency
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1'
146
+ name: activerecord-import
147
+ prerelease: false
148
+ type: :development
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '1'
154
+ - !ruby/object:Gem::Dependency
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ name: faker
161
+ prerelease: false
162
+ type: :development
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ name: jruby-openssl
175
+ prerelease: false
176
+ type: :development
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ - !ruby/object:Gem::Dependency
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ name: jdbc-postgres
189
+ prerelease: false
190
+ type: :development
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ name: jdbc-mysql
203
+ prerelease: false
204
+ type: :development
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
210
+ - !ruby/object:Gem::Dependency
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ name: jdbc-sqlite3
217
+ prerelease: false
218
+ type: :development
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ - !ruby/object:Gem::Dependency
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ name: activerecord-jdbc-adapter
231
+ prerelease: false
232
+ type: :development
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ - !ruby/object:Gem::Dependency
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ name: pry-nav
245
+ prerelease: false
246
+ type: :development
247
+ version_requirements: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
252
+ description: Make it easy to upsert on MySQL, PostgreSQL, and SQLite3. Transparently
253
+ creates merge functions for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE.
254
+ email:
255
+ - seamus@abshere.net
256
+ - pnomolos@gmail.com
257
+ executables: []
258
+ extensions: []
259
+ extra_rdoc_files: []
260
+ files:
261
+ - ".gitignore"
262
+ - ".ruby-version"
263
+ - ".standard.yml"
264
+ - ".travis.yml"
265
+ - ".yardopts"
266
+ - CHANGELOG
267
+ - Gemfile
268
+ - LICENSE
269
+ - README.md
270
+ - Rakefile
271
+ - lib/upsert.rb
272
+ - lib/upsert/active_record_upsert.rb
273
+ - lib/upsert/binary.rb
274
+ - lib/upsert/column_definition.rb
275
+ - lib/upsert/column_definition/mysql.rb
276
+ - lib/upsert/column_definition/postgresql.rb
277
+ - lib/upsert/column_definition/sqlite3.rb
278
+ - lib/upsert/connection.rb
279
+ - lib/upsert/connection/Java_ComMysqlJdbc_JDBC4Connection.rb
280
+ - lib/upsert/connection/Java_OrgPostgresqlJdbc_PgConnection.rb
281
+ - lib/upsert/connection/Java_OrgSqlite_Conn.rb
282
+ - lib/upsert/connection/Mysql2_Client.rb
283
+ - lib/upsert/connection/PG_Connection.rb
284
+ - lib/upsert/connection/SQLite3_Database.rb
285
+ - lib/upsert/connection/jdbc.rb
286
+ - lib/upsert/connection/postgresql.rb
287
+ - lib/upsert/connection/sqlite3.rb
288
+ - lib/upsert/merge_function.rb
289
+ - lib/upsert/merge_function/Java_ComMysqlJdbc_JDBC4Connection.rb
290
+ - lib/upsert/merge_function/Java_OrgPostgresqlJdbc_PgConnection.rb
291
+ - lib/upsert/merge_function/Java_OrgSqlite_Conn.rb
292
+ - lib/upsert/merge_function/Mysql2_Client.rb
293
+ - lib/upsert/merge_function/PG_Connection.rb
294
+ - lib/upsert/merge_function/SQLite3_Database.rb
295
+ - lib/upsert/merge_function/mysql.rb
296
+ - lib/upsert/merge_function/postgresql.rb
297
+ - lib/upsert/merge_function/sqlite3.rb
298
+ - lib/upsert/row.rb
299
+ - lib/upsert/version.rb
300
+ - spec/active_record_upsert_spec.rb
301
+ - spec/binary_spec.rb
302
+ - spec/correctness_spec.rb
303
+ - spec/database_functions_spec.rb
304
+ - spec/database_spec.rb
305
+ - spec/hstore_spec.rb
306
+ - spec/jruby_spec.rb
307
+ - spec/logger_spec.rb
308
+ - spec/misc/get_postgres_reserved_words.rb
309
+ - spec/misc/mysql_reserved.txt
310
+ - spec/misc/pg_reserved.txt
311
+ - spec/multibyte_spec.rb
312
+ - spec/postgresql_spec.rb
313
+ - spec/precision_spec.rb
314
+ - spec/reserved_words_spec.rb
315
+ - spec/sequel_spec.rb
316
+ - spec/spec_helper.rb
317
+ - spec/speed_spec.rb
318
+ - spec/threaded_spec.rb
319
+ - spec/timezones_spec.rb
320
+ - spec/type_safety_spec.rb
321
+ - travis/install_postgres.sh
322
+ - travis/run_docker_db.sh
323
+ - travis/tune_mysql.sh
324
+ - upsert-java.gemspec
325
+ - upsert.gemspec
326
+ - upsert.gemspec.common
327
+ homepage: https://github.com/seamusabshere/upsert
328
+ licenses:
329
+ - MIT
330
+ metadata: {}
331
+ post_install_message:
332
+ rdoc_options: []
333
+ require_paths:
334
+ - lib
335
+ required_ruby_version: !ruby/object:Gem::Requirement
336
+ requirements:
337
+ - - ">="
338
+ - !ruby/object:Gem::Version
339
+ version: '0'
340
+ required_rubygems_version: !ruby/object:Gem::Requirement
341
+ requirements:
342
+ - - ">="
343
+ - !ruby/object:Gem::Version
344
+ version: '0'
345
+ requirements: []
346
+ rubyforge_project:
347
+ rubygems_version: 2.6.14.1
348
+ signing_key:
349
+ specification_version: 4
350
+ summary: Make it easy to upsert on MySQL, PostgreSQL, and SQLite3. Transparently creates
351
+ merge functions for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE.
352
+ test_files:
353
+ - spec/active_record_upsert_spec.rb
354
+ - spec/binary_spec.rb
355
+ - spec/correctness_spec.rb
356
+ - spec/database_functions_spec.rb
357
+ - spec/database_spec.rb
358
+ - spec/hstore_spec.rb
359
+ - spec/jruby_spec.rb
360
+ - spec/logger_spec.rb
361
+ - spec/misc/get_postgres_reserved_words.rb
362
+ - spec/misc/mysql_reserved.txt
363
+ - spec/misc/pg_reserved.txt
364
+ - spec/multibyte_spec.rb
365
+ - spec/postgresql_spec.rb
366
+ - spec/precision_spec.rb
367
+ - spec/reserved_words_spec.rb
368
+ - spec/sequel_spec.rb
369
+ - spec/spec_helper.rb
370
+ - spec/speed_spec.rb
371
+ - spec/threaded_spec.rb
372
+ - spec/timezones_spec.rb
373
+ - spec/type_safety_spec.rb