sequel-pgt_outbox 0.2.3 → 0.2.5
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/.release-please-manifest.json +1 -1
- data/.version.txt +1 -1
- data/CHANGELOG.md +14 -0
- data/Readme.adoc +5 -2
- data/lib/sequel/pgt_outbox/version.rb +1 -1
- data/lib/sequel/pgt_outbox.rb +3 -3
- data/oci/Gemfile +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cc58b4c71809dcbcde313ac69309d2377c683e99e40e8f84a08e940cbabbaaf
|
4
|
+
data.tar.gz: 2ade2c54c240874a84d5fbea716b0b805ca657616723d74f90be6244046efd6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17f3c2c624d42c0facdf4ac9498b38697df42baf8f013af60ee91610589453f09c38db9874fb86204a9ab0d6cd2e338b11e978f45d0bdfd38cd362211d496342
|
7
|
+
data.tar.gz: 1809b9b0a183a9a0a611e55dcd993c210e500c80392741d656eadef5d47d68568c0d961fbfeab310f797d45aa97705e26b192168ce38780d7586d1a0bdbde9b0
|
data/.version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.2.5](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.4...v0.2.5) (2025-02-16)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* Correct docs so that extension is used ([#13](https://github.com/rubyists/sequel-pgt_outbox/issues/13)) ([c050c5e](https://github.com/rubyists/sequel-pgt_outbox/commit/c050c5e831e3285b4b2168150ed3ea66dea680e6))
|
9
|
+
|
10
|
+
## [0.2.4](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.3...v0.2.4) (2025-02-16)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* Corrected indentation of guard clause ([#11](https://github.com/rubyists/sequel-pgt_outbox/issues/11)) ([1216606](https://github.com/rubyists/sequel-pgt_outbox/commit/12166061f54bfc395822dab58d065b3cab848537))
|
16
|
+
|
3
17
|
## [0.2.3](https://github.com/rubyists/sequel-pgt_outbox/compare/v0.2.2...v0.2.3) (2025-02-15)
|
4
18
|
|
5
19
|
|
data/Readme.adoc
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
= Transaction Outbox for Postgres
|
2
|
+
:context: https://morningcoffee.io/what-is-a-transaction-outbox-and-why-you-need-it.html[outbox pattern]
|
2
3
|
|
3
|
-
This gem provides a way to implement the transaction
|
4
|
+
This gem provides a way to implement the transaction {context} using triggers (stored procedures) in Postgres.
|
4
5
|
|
5
6
|
It utilizes the ruby Sequel ORM to interact with the database, but once it's set up,
|
6
7
|
it doesn't require any ruby nor Sequel code for the outbox population to operate. It
|
@@ -26,8 +27,10 @@ gem install sequel-pgt_outbox
|
|
26
27
|
### Using the sequel cli
|
27
28
|
|
28
29
|
```bash
|
29
|
-
sequel -r sequel/pgt_outbox postgres
|
30
|
+
sequel -r sequel/pgt_outbox postgres:///spgt_test
|
30
31
|
Your database is stored in DB...
|
32
|
+
irb(main):000> DB.extension :pgt_output
|
33
|
+
=> #<Sequel::Postgres::Database database=spgt_test>
|
31
34
|
irb(main):001> DB.create_table(:foo) { primary_key :id; String :s; Integer :i }
|
32
35
|
=> nil
|
33
36
|
irb(main):002> function = DB.pgt_setup_outbox(:foo)
|
data/lib/sequel/pgt_outbox.rb
CHANGED
@@ -39,9 +39,9 @@ module Rubyists
|
|
39
39
|
depth_limit = depth_limit.to_i
|
40
40
|
raise ArgumentError, ':trigger_depth_limit option must be at least 1' unless depth_limit >= 1
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
<<~SQL
|
43
|
+
IF pg_trigger_depth() > #{depth_limit} THEN
|
44
|
+
RETURN NEW;
|
45
45
|
END IF;
|
46
46
|
SQL
|
47
47
|
end
|
data/oci/Gemfile
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-pgt_outbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bougyman
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-02-
|
10
|
+
date: 2025-02-16 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: sequel_postgresql_triggers
|