pg_eventstore 1.5.0 → 1.7.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/CHANGELOG.md +7 -0
- data/README.md +49 -0
- data/db/migrations/7_support_reading_streams_system_stream.sql +2 -0
- data/docs/reading_events.md +16 -1
- data/docs/subscriptions.md +14 -56
- data/exe/pg-eventstore +16 -0
- data/lib/pg_eventstore/callbacks.rb +16 -0
- data/lib/pg_eventstore/cli/commands/base_command.rb +45 -0
- data/lib/pg_eventstore/cli/commands/callback_handlers/start_cmd_handlers.rb +38 -0
- data/lib/pg_eventstore/cli/commands/help_command.rb +22 -0
- data/lib/pg_eventstore/cli/commands/start_subscriptions_command.rb +96 -0
- data/lib/pg_eventstore/cli/commands/stop_subscriptions_command.rb +22 -0
- data/lib/pg_eventstore/cli/commands.rb +6 -0
- data/lib/pg_eventstore/cli/exit_codes.rb +12 -0
- data/lib/pg_eventstore/cli/parser_options/base_options.rb +46 -0
- data/lib/pg_eventstore/cli/parser_options/default_options.rb +10 -0
- data/lib/pg_eventstore/cli/parser_options/metadata.rb +34 -0
- data/lib/pg_eventstore/cli/parser_options/subscription_options.rb +31 -0
- data/lib/pg_eventstore/cli/parser_options.rb +6 -0
- data/lib/pg_eventstore/cli/parsers/base_parser.rb +33 -0
- data/lib/pg_eventstore/cli/parsers/default_parser.rb +24 -0
- data/lib/pg_eventstore/cli/parsers/subscription_parser.rb +24 -0
- data/lib/pg_eventstore/cli/parsers.rb +5 -0
- data/lib/pg_eventstore/cli/try_to_delete_subscriptions_set.rb +75 -0
- data/lib/pg_eventstore/cli/try_unlock_subscriptions_set.rb +16 -0
- data/lib/pg_eventstore/cli/wait_for_subscriptions_set_shutdown.rb +67 -0
- data/lib/pg_eventstore/cli.rb +42 -0
- data/lib/pg_eventstore/commands/read.rb +1 -1
- data/lib/pg_eventstore/extensions/options_extension.rb +53 -8
- data/lib/pg_eventstore/queries/event_queries.rb +1 -10
- data/lib/pg_eventstore/query_builders/events_filtering.rb +27 -0
- data/lib/pg_eventstore/rspec/has_option_matcher.rb +42 -41
- data/lib/pg_eventstore/stream.rb +8 -0
- data/lib/pg_eventstore/subscriptions/command_handlers/subscription_feeder_commands.rb +13 -1
- data/lib/pg_eventstore/subscriptions/command_handlers/subscription_runners_commands.rb +1 -1
- data/lib/pg_eventstore/subscriptions/queries/subscription_command_queries.rb +1 -1
- data/lib/pg_eventstore/subscriptions/queries/subscriptions_set_command_queries.rb +3 -1
- data/lib/pg_eventstore/subscriptions/subscription_feeder.rb +10 -50
- data/lib/pg_eventstore/subscriptions/subscription_feeder_commands/ping.rb +22 -0
- data/lib/pg_eventstore/subscriptions/subscription_feeder_commands.rb +1 -0
- data/lib/pg_eventstore/subscriptions/subscriptions_lifecycle.rb +7 -2
- data/lib/pg_eventstore/subscriptions/subscriptions_manager.rb +44 -10
- data/lib/pg_eventstore/subscriptions/subscriptions_set_lifecycle.rb +1 -1
- data/lib/pg_eventstore/utils.rb +32 -0
- data/lib/pg_eventstore/version.rb +1 -1
- data/lib/pg_eventstore/web/application.rb +12 -2
- data/lib/pg_eventstore/web/paginator/events_collection.rb +18 -5
- data/lib/pg_eventstore/web/public/javascripts/pg_eventstore.js +24 -2
- data/lib/pg_eventstore/web/views/home/dashboard.erb +9 -0
- data/lib/pg_eventstore/web/views/home/partials/event_filter.erb +1 -1
- data/lib/pg_eventstore/web/views/home/partials/events.erb +9 -6
- data/lib/pg_eventstore/web/views/home/partials/stream_filter.erb +3 -3
- data/lib/pg_eventstore/web/views/home/partials/system_stream_filter.erb +15 -0
- data/lib/pg_eventstore/web/views/layouts/application.erb +3 -3
- data/lib/pg_eventstore/web/views/subscriptions/index.erb +6 -6
- data/lib/pg_eventstore.rb +5 -2
- data/sig/pg_eventstore/callbacks.rbs +4 -0
- data/sig/pg_eventstore/cli/commands/base_command.rbs +13 -0
- data/sig/pg_eventstore/cli/commands/callback_handlers/start_cmd_handlers.rbs +14 -0
- data/sig/pg_eventstore/cli/commands/help_command.rbs +13 -0
- data/sig/pg_eventstore/cli/commands/start_subscriptions_command.rbs +28 -0
- data/sig/pg_eventstore/cli/commands/stop_subscriptions_command.rbs +11 -0
- data/sig/pg_eventstore/cli/exit_codes.rbs +8 -0
- data/sig/pg_eventstore/cli/parser_options/base_options.rbs +15 -0
- data/sig/pg_eventstore/cli/parser_options/default_options.rbs +8 -0
- data/sig/pg_eventstore/cli/parser_options/metadata.rbs +11 -0
- data/sig/pg_eventstore/cli/parser_options/subscription_options.rbs +9 -0
- data/sig/pg_eventstore/cli/parsers/base_parser.rbs +18 -0
- data/sig/pg_eventstore/cli/parsers/default_parser.rbs +9 -0
- data/sig/pg_eventstore/cli/parsers/subscription_parser.rbs +9 -0
- data/sig/pg_eventstore/cli/try_to_delete_subscriptions_set.rbs +24 -0
- data/sig/pg_eventstore/cli/try_unlock_subscriptions_set.rbs +7 -0
- data/sig/pg_eventstore/cli/wait_for_subscriptions_set_shutdown.rbs +26 -0
- data/sig/pg_eventstore/cli.rbs +10 -0
- data/sig/pg_eventstore/extensions/options_extension.rbs +18 -1
- data/sig/pg_eventstore/queries/event_queries.rbs +0 -5
- data/sig/pg_eventstore/query_builders/events_filtering_query.rbs +6 -0
- data/sig/pg_eventstore/stream.rbs +3 -0
- data/sig/pg_eventstore/subscriptions/command_handlers/subscription_feeder_commands.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/command_handlers/subscription_runners_commands.rbs +7 -1
- data/sig/pg_eventstore/subscriptions/queries/subscription_command_queries.rbs +1 -1
- data/sig/pg_eventstore/subscriptions/queries/subscriptions_set_command_queries.rbs +1 -1
- data/sig/pg_eventstore/subscriptions/subscription_feeder.rbs +10 -11
- data/sig/pg_eventstore/subscriptions/subscription_feeder_commands/ping.rbs +11 -0
- data/sig/pg_eventstore/subscriptions/subscriptions_lifecycle.rbs +1 -1
- data/sig/pg_eventstore/subscriptions/subscriptions_manager.rbs +13 -1
- data/sig/pg_eventstore/utils.rbs +2 -0
- data/sig/pg_eventstore/web/application.rbs +27 -0
- data/sig/pg_eventstore/web/paginator/base_collection.rbs +0 -9
- data/sig/pg_eventstore/web/paginator/event_types_collection.rbs +9 -0
- data/sig/pg_eventstore/web/paginator/events_collection.rbs +3 -1
- data/sig/pg_eventstore.rbs +2 -8
- metadata +47 -3
@@ -6,6 +6,8 @@ module PgEventstore
|
|
6
6
|
PER_PAGE: ::Hash[String, Integer]
|
7
7
|
MAX_NUMBER_TO_COUNT: Integer
|
8
8
|
|
9
|
+
@stream: PgEventstore::Stream
|
10
|
+
|
9
11
|
def collection: () -> ::Array[PgEventstore::Event]
|
10
12
|
|
11
13
|
def next_page_starting_id: () -> Integer?
|
@@ -15,7 +17,7 @@ module PgEventstore
|
|
15
17
|
def total_count: () -> Integer
|
16
18
|
|
17
19
|
# _@param_ `event`
|
18
|
-
def event_global_position: (PgEventstore::Event event) -> Integer?
|
20
|
+
def event_global_position: (PgEventstore::Event? event) -> Integer?
|
19
21
|
|
20
22
|
# _@param_ `sql_builder`
|
21
23
|
def estimate_count: (PgEventstore::SQLBuilder sql_builder) -> Integer
|
data/sig/pg_eventstore.rbs
CHANGED
@@ -12,18 +12,12 @@ module PgEventstore
|
|
12
12
|
# _@param_ `name`
|
13
13
|
def self.connection: (?Symbol name) -> PgEventstore::Connection
|
14
14
|
|
15
|
-
# _@param_ `config_name`
|
16
|
-
#
|
17
|
-
# _@param_ `subscription_set`
|
18
|
-
#
|
19
|
-
# _@param_ `max_retries` — max number of retries of failed SubscriptionsSet
|
20
|
-
#
|
21
|
-
# _@param_ `retries_interval` — a delay between retries of failed SubscriptionsSet
|
22
15
|
def self.subscriptions_manager: (
|
23
16
|
?Symbol config_name,
|
24
17
|
subscription_set: String,
|
25
18
|
?max_retries: Integer?,
|
26
|
-
?retries_interval: Integer
|
19
|
+
?retries_interval: Integer?,
|
20
|
+
?force_lock: bool
|
27
21
|
) -> PgEventstore::SubscriptionsManager
|
28
22
|
|
29
23
|
# _@param_ `name`
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_eventstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Dzyzenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -61,7 +61,8 @@ dependencies:
|
|
61
61
|
description: EventStore implementation using PostgreSQL
|
62
62
|
email:
|
63
63
|
- ivan.dzyzenko@gmail.com
|
64
|
-
executables:
|
64
|
+
executables:
|
65
|
+
- pg-eventstore
|
65
66
|
extensions: []
|
66
67
|
extra_rdoc_files: []
|
67
68
|
files:
|
@@ -76,6 +77,7 @@ files:
|
|
76
77
|
- db/migrations/4_create_subscriptions_set_commands.sql
|
77
78
|
- db/migrations/5_partitions.sql
|
78
79
|
- db/migrations/6_add_commands_data.sql
|
80
|
+
- db/migrations/7_support_reading_streams_system_stream.sql
|
79
81
|
- docs/admin_ui.md
|
80
82
|
- docs/appending_events.md
|
81
83
|
- docs/configuration.md
|
@@ -86,9 +88,30 @@ files:
|
|
86
88
|
- docs/reading_events.md
|
87
89
|
- docs/subscriptions.md
|
88
90
|
- docs/writing_middleware.md
|
91
|
+
- exe/pg-eventstore
|
89
92
|
- lib/pg_eventstore.rb
|
90
93
|
- lib/pg_eventstore/abstract_command.rb
|
91
94
|
- lib/pg_eventstore/callbacks.rb
|
95
|
+
- lib/pg_eventstore/cli.rb
|
96
|
+
- lib/pg_eventstore/cli/commands.rb
|
97
|
+
- lib/pg_eventstore/cli/commands/base_command.rb
|
98
|
+
- lib/pg_eventstore/cli/commands/callback_handlers/start_cmd_handlers.rb
|
99
|
+
- lib/pg_eventstore/cli/commands/help_command.rb
|
100
|
+
- lib/pg_eventstore/cli/commands/start_subscriptions_command.rb
|
101
|
+
- lib/pg_eventstore/cli/commands/stop_subscriptions_command.rb
|
102
|
+
- lib/pg_eventstore/cli/exit_codes.rb
|
103
|
+
- lib/pg_eventstore/cli/parser_options.rb
|
104
|
+
- lib/pg_eventstore/cli/parser_options/base_options.rb
|
105
|
+
- lib/pg_eventstore/cli/parser_options/default_options.rb
|
106
|
+
- lib/pg_eventstore/cli/parser_options/metadata.rb
|
107
|
+
- lib/pg_eventstore/cli/parser_options/subscription_options.rb
|
108
|
+
- lib/pg_eventstore/cli/parsers.rb
|
109
|
+
- lib/pg_eventstore/cli/parsers/base_parser.rb
|
110
|
+
- lib/pg_eventstore/cli/parsers/default_parser.rb
|
111
|
+
- lib/pg_eventstore/cli/parsers/subscription_parser.rb
|
112
|
+
- lib/pg_eventstore/cli/try_to_delete_subscriptions_set.rb
|
113
|
+
- lib/pg_eventstore/cli/try_unlock_subscriptions_set.rb
|
114
|
+
- lib/pg_eventstore/cli/wait_for_subscriptions_set_shutdown.rb
|
92
115
|
- lib/pg_eventstore/client.rb
|
93
116
|
- lib/pg_eventstore/commands.rb
|
94
117
|
- lib/pg_eventstore/commands/append.rb
|
@@ -142,6 +165,7 @@ files:
|
|
142
165
|
- lib/pg_eventstore/subscriptions/subscription_feeder.rb
|
143
166
|
- lib/pg_eventstore/subscriptions/subscription_feeder_commands.rb
|
144
167
|
- lib/pg_eventstore/subscriptions/subscription_feeder_commands/base.rb
|
168
|
+
- lib/pg_eventstore/subscriptions/subscription_feeder_commands/ping.rb
|
145
169
|
- lib/pg_eventstore/subscriptions/subscription_feeder_commands/restore.rb
|
146
170
|
- lib/pg_eventstore/subscriptions/subscription_feeder_commands/start_all.rb
|
147
171
|
- lib/pg_eventstore/subscriptions/subscription_feeder_commands/stop.rb
|
@@ -203,6 +227,7 @@ files:
|
|
203
227
|
- lib/pg_eventstore/web/views/home/partials/events.erb
|
204
228
|
- lib/pg_eventstore/web/views/home/partials/pagination_links.erb
|
205
229
|
- lib/pg_eventstore/web/views/home/partials/stream_filter.erb
|
230
|
+
- lib/pg_eventstore/web/views/home/partials/system_stream_filter.erb
|
206
231
|
- lib/pg_eventstore/web/views/layouts/application.erb
|
207
232
|
- lib/pg_eventstore/web/views/subscriptions/index.erb
|
208
233
|
- pg_eventstore.gemspec
|
@@ -221,6 +246,23 @@ files:
|
|
221
246
|
- sig/pg_eventstore.rbs
|
222
247
|
- sig/pg_eventstore/abstract_command.rbs
|
223
248
|
- sig/pg_eventstore/callbacks.rbs
|
249
|
+
- sig/pg_eventstore/cli.rbs
|
250
|
+
- sig/pg_eventstore/cli/commands/base_command.rbs
|
251
|
+
- sig/pg_eventstore/cli/commands/callback_handlers/start_cmd_handlers.rbs
|
252
|
+
- sig/pg_eventstore/cli/commands/help_command.rbs
|
253
|
+
- sig/pg_eventstore/cli/commands/start_subscriptions_command.rbs
|
254
|
+
- sig/pg_eventstore/cli/commands/stop_subscriptions_command.rbs
|
255
|
+
- sig/pg_eventstore/cli/exit_codes.rbs
|
256
|
+
- sig/pg_eventstore/cli/parser_options/base_options.rbs
|
257
|
+
- sig/pg_eventstore/cli/parser_options/default_options.rbs
|
258
|
+
- sig/pg_eventstore/cli/parser_options/metadata.rbs
|
259
|
+
- sig/pg_eventstore/cli/parser_options/subscription_options.rbs
|
260
|
+
- sig/pg_eventstore/cli/parsers/base_parser.rbs
|
261
|
+
- sig/pg_eventstore/cli/parsers/default_parser.rbs
|
262
|
+
- sig/pg_eventstore/cli/parsers/subscription_parser.rbs
|
263
|
+
- sig/pg_eventstore/cli/try_to_delete_subscriptions_set.rbs
|
264
|
+
- sig/pg_eventstore/cli/try_unlock_subscriptions_set.rbs
|
265
|
+
- sig/pg_eventstore/cli/wait_for_subscriptions_set_shutdown.rbs
|
224
266
|
- sig/pg_eventstore/client.rbs
|
225
267
|
- sig/pg_eventstore/commands/append.rbs
|
226
268
|
- sig/pg_eventstore/commands/event_modifiers/prepare_link_event.rbs
|
@@ -271,6 +313,7 @@ files:
|
|
271
313
|
- sig/pg_eventstore/subscriptions/subscription_feeder.rbs
|
272
314
|
- sig/pg_eventstore/subscriptions/subscription_feeder_commands.rbs
|
273
315
|
- sig/pg_eventstore/subscriptions/subscription_feeder_commands/base.rbs
|
316
|
+
- sig/pg_eventstore/subscriptions/subscription_feeder_commands/ping.rbs
|
274
317
|
- sig/pg_eventstore/subscriptions/subscription_feeder_commands/restore.rbs
|
275
318
|
- sig/pg_eventstore/subscriptions/subscription_feeder_commands/start_all.rbs
|
276
319
|
- sig/pg_eventstore/subscriptions/subscription_feeder_commands/stop.rbs
|
@@ -290,6 +333,7 @@ files:
|
|
290
333
|
- sig/pg_eventstore/subscriptions/subscriptions_set_lifecycle.rbs
|
291
334
|
- sig/pg_eventstore/utils.rbs
|
292
335
|
- sig/pg_eventstore/version.rbs
|
336
|
+
- sig/pg_eventstore/web/application.rbs
|
293
337
|
- sig/pg_eventstore/web/paginator/base_collection.rbs
|
294
338
|
- sig/pg_eventstore/web/paginator/event_types_collection.rbs
|
295
339
|
- sig/pg_eventstore/web/paginator/events_collection.rbs
|