activerecord-redshift-adapter 8.0.0.beta1 → 8.0.0.beta2
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 +3 -2
- data/lib/active_record/connection_adapters/redshift_7_0_adapter.rb +2 -5
- data/lib/active_record/connection_adapters/redshift_7_1_adapter.rb +2 -5
- data/lib/active_record/connection_adapters/redshift_7_2_adapter.rb +2 -5
- data/lib/active_record/connection_adapters/redshift_8_0_adapter.rb +2 -5
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35bf91b5a6116c1055f34e7bb0fc17805e6e693cec22520fc9014010962f2ee3
|
|
4
|
+
data.tar.gz: d4c0213bcee62e43faa979d0fdc1080b590f86d511a4b1f53c2ff623622737ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6075000b038c72d2e516173fa1ee3f29b3c80d2cff8036418f36b919ccc312e8085edfe841394642f906bbe6bf5161ccd6d0c0b42da10af061ce9618425194a1
|
|
7
|
+
data.tar.gz: f797bb18c2b7b4732ff0652b6f50b1f26cf0688a2d1c0eca5c2a0e310405af715f2ecfd1f9537b08dfbbbfb95e928eda10ffd6f35790db11eff5ff6e915d1430
|
data/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Thanks to the auhors.
|
|
|
11
11
|
Usage
|
|
12
12
|
-------------------
|
|
13
13
|
|
|
14
|
-
For Rails,
|
|
14
|
+
For Rails, add the following in the Gemfile:
|
|
15
15
|
|
|
16
16
|
```ruby
|
|
17
17
|
gem 'activerecord-redshift-adapter'
|
|
@@ -30,7 +30,8 @@ development:
|
|
|
30
30
|
encoding: utf8
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
or use it directly in the
|
|
33
|
+
or use it directly in the connection or `DATABASE_URL`:
|
|
34
|
+
|
|
34
35
|
```ruby
|
|
35
36
|
class SomeModel < ApplicationRecord
|
|
36
37
|
establish_connection('redshift://username:password@host/database')
|
|
@@ -330,11 +330,8 @@ module ActiveRecord
|
|
|
330
330
|
def translate_exception(exception, message:, sql:, binds:)
|
|
331
331
|
return exception unless exception.respond_to?(:result)
|
|
332
332
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
RecordNotUnique.new(message, exception)
|
|
336
|
-
when /violates foreign key constraint/
|
|
337
|
-
InvalidForeignKey.new(message, exception)
|
|
333
|
+
if exception.is_a?(PG::DuplicateDatabase)
|
|
334
|
+
DatabaseAlreadyExists.new(message, sql: sql, binds: binds)
|
|
338
335
|
else
|
|
339
336
|
super
|
|
340
337
|
end
|
|
@@ -353,11 +353,8 @@ module ActiveRecord
|
|
|
353
353
|
def translate_exception(exception, message:, sql:, binds:)
|
|
354
354
|
return exception unless exception.respond_to?(:result)
|
|
355
355
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
RecordNotUnique.new(message, exception)
|
|
359
|
-
when /violates foreign key constraint/
|
|
360
|
-
InvalidForeignKey.new(message, exception)
|
|
356
|
+
if exception.is_a?(PG::DuplicateDatabase)
|
|
357
|
+
DatabaseAlreadyExists.new(message, sql: sql, binds: binds)
|
|
361
358
|
else
|
|
362
359
|
super
|
|
363
360
|
end
|
|
@@ -353,11 +353,8 @@ module ActiveRecord
|
|
|
353
353
|
def translate_exception(exception, message:, sql:, binds:)
|
|
354
354
|
return exception unless exception.respond_to?(:result)
|
|
355
355
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
RecordNotUnique.new(message, exception)
|
|
359
|
-
when /violates foreign key constraint/
|
|
360
|
-
InvalidForeignKey.new(message, exception)
|
|
356
|
+
if exception.is_a?(PG::DuplicateDatabase)
|
|
357
|
+
DatabaseAlreadyExists.new(message, sql: sql, binds: binds)
|
|
361
358
|
else
|
|
362
359
|
super
|
|
363
360
|
end
|
|
@@ -353,11 +353,8 @@ module ActiveRecord
|
|
|
353
353
|
def translate_exception(exception, message:, sql:, binds:)
|
|
354
354
|
return exception unless exception.respond_to?(:result)
|
|
355
355
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
RecordNotUnique.new(message, exception)
|
|
359
|
-
when /violates foreign key constraint/
|
|
360
|
-
InvalidForeignKey.new(message, exception)
|
|
356
|
+
if exception.is_a?(PG::DuplicateDatabase)
|
|
357
|
+
DatabaseAlreadyExists.new(message, sql: sql, binds: binds)
|
|
361
358
|
else
|
|
362
359
|
super
|
|
363
360
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-redshift-adapter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.0.0.
|
|
4
|
+
version: 8.0.0.beta2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Janusz Mordarski
|
|
@@ -14,7 +14,7 @@ authors:
|
|
|
14
14
|
autorequire:
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
|
-
date: 2024-11-
|
|
17
|
+
date: 2024-11-26 00:00:00.000000000 Z
|
|
18
18
|
dependencies:
|
|
19
19
|
- !ruby/object:Gem::Dependency
|
|
20
20
|
name: activerecord
|
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
152
152
|
- !ruby/object:Gem::Version
|
|
153
153
|
version: '0'
|
|
154
154
|
requirements: []
|
|
155
|
-
rubygems_version: 3.5.
|
|
155
|
+
rubygems_version: 3.5.23
|
|
156
156
|
signing_key:
|
|
157
157
|
specification_version: 4
|
|
158
158
|
summary: Amazon Redshift adapter for ActiveRecord
|