active_record_upsert 0.4.0 → 0.5.0
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/active_record_upsert/active_record/persistence.rb +0 -3
- data/lib/active_record_upsert/active_record/relation.rb +0 -2
- data/lib/active_record_upsert/active_record/timestamp.rb +0 -2
- data/lib/active_record_upsert/active_record/transactions.rb +0 -2
- data/lib/active_record_upsert/active_record.rb +7 -0
- data/lib/active_record_upsert/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ea38395a34ac563cfd8115846c310970a85a4f5
|
|
4
|
+
data.tar.gz: 1ed0d73191b13a214e82a855fdf50da8c1d1d03d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 93a316ed4a487e6156a97c91b1184bbe7211a1a6c3087a415c0bbeb4438ecd38ad8fcb5387a508aeafd498805f43e450746004b67668c8966f226b701092b434
|
|
7
|
+
data.tar.gz: 773c2edf9eaae7a2e9ce5aea7e55fd0b5b272b98ce4765a85bd6938bde7a330515f09110ca4a9df819ef09728a23c7c14e6782748ae303604a51ffb36ca8b57a
|
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# ActiveRecordUpsert
|
|
5
5
|
|
|
6
|
-
Real upsert for PostgreSQL 9.5+ and ActiveRecord. Uses [ON CONFLICT DO UPDATE](http://www.postgresql.org/docs/9.5/static/sql-insert.html).
|
|
6
|
+
Real upsert for PostgreSQL 9.5+ and Rails 5 / ActiveRecord 5. Uses [ON CONFLICT DO UPDATE](http://www.postgresql.org/docs/9.5/static/sql-insert.html).
|
|
7
7
|
|
|
8
8
|
## Main points
|
|
9
9
|
|
|
@@ -7,3 +7,10 @@ end
|
|
|
7
7
|
module ActiveRecord
|
|
8
8
|
RecordSavedError = Class.new(ActiveRecordError)
|
|
9
9
|
end
|
|
10
|
+
|
|
11
|
+
::ActiveRecord::Base.prepend(ActiveRecordUpsert::ActiveRecord::PersistenceExtensions)
|
|
12
|
+
::ActiveRecord::Base.extend(ActiveRecordUpsert::ActiveRecord::PersistenceExtensions::ClassMethods)
|
|
13
|
+
::ActiveRecord::Base.prepend(ActiveRecordUpsert::ActiveRecord::TimestampExtensions)
|
|
14
|
+
::ActiveRecord::Base.prepend(ActiveRecordUpsert::ActiveRecord::TransactionsExtensions)
|
|
15
|
+
|
|
16
|
+
::ActiveRecord::Relation.include(ActiveRecordUpsert::ActiveRecord::RelationExtensions)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_record_upsert
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jesper Josefsson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -183,3 +183,4 @@ signing_key:
|
|
|
183
183
|
specification_version: 4
|
|
184
184
|
summary: Real PostgreSQL 9.5+ upserts using ON CONFLICT for ActiveRecord
|
|
185
185
|
test_files: []
|
|
186
|
+
has_rdoc:
|