pg_eventstore 1.13.3 → 2.0.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/.rubocop.yml +1 -1
- data/CHANGELOG.md +20 -3
- data/Dockerfile +3 -0
- data/README.md +20 -7
- data/db/migrations/10_setup_pg_cron.rb +23 -0
- data/db/migrations/11_add_events_link_global_position.sql +1 -0
- data/db/migrations/12_migrate_legacy_links.rb +83 -0
- data/db/migrations/13_remove_events_link_id.sql +6 -0
- data/db/migrations/14_remove_ids_events_id_index.sql +1 -0
- data/db/migrations/9_create_events_horizon.sql +21 -0
- data/docs/appending_events.md +1 -1
- data/docs/events_and_streams.md +1 -1
- data/docs/multiple_commands.md +16 -1
- data/lib/pg_eventstore/callbacks.rb +7 -5
- data/lib/pg_eventstore/cli/try_to_delete_subscriptions_set.rb +2 -2
- data/lib/pg_eventstore/client.rb +7 -5
- data/lib/pg_eventstore/commands/all_stream_read_grouped.rb +3 -3
- data/lib/pg_eventstore/commands/append.rb +3 -3
- data/lib/pg_eventstore/commands/event_modifiers/prepare_link_event.rb +5 -2
- data/lib/pg_eventstore/commands/event_modifiers/prepare_regular_event.rb +1 -1
- data/lib/pg_eventstore/commands/link_to.rb +6 -6
- data/lib/pg_eventstore/commands/multiple.rb +2 -2
- data/lib/pg_eventstore/commands/regular_stream_read_grouped.rb +1 -1
- data/lib/pg_eventstore/commands/regular_stream_read_paginated.rb +1 -1
- data/lib/pg_eventstore/commands/system_stream_read_paginated.rb +1 -1
- data/lib/pg_eventstore/connection.rb +1 -35
- data/lib/pg_eventstore/errors.rb +1 -1
- data/lib/pg_eventstore/event.rb +7 -5
- data/lib/pg_eventstore/extensions/options_extension.rb +40 -11
- data/lib/pg_eventstore/maintenance.rb +1 -1
- data/lib/pg_eventstore/queries/event_queries.rb +10 -9
- data/lib/pg_eventstore/queries/links_resolver.rb +6 -3
- data/lib/pg_eventstore/queries/partition_queries.rb +72 -7
- data/lib/pg_eventstore/queries/transaction_queries.rb +10 -4
- data/lib/pg_eventstore/query_builders/events_filtering.rb +3 -7
- data/lib/pg_eventstore/query_builders/partitions_filtering.rb +28 -18
- data/lib/pg_eventstore/sql_builder.rb +30 -12
- data/lib/pg_eventstore/stream.rb +1 -1
- data/lib/pg_eventstore/subscriptions/basic_runner.rb +4 -4
- data/lib/pg_eventstore/subscriptions/callback_handlers/subscription_feeder_handlers.rb +1 -1
- data/lib/pg_eventstore/subscriptions/callback_handlers/subscription_runner_handlers.rb +2 -2
- data/lib/pg_eventstore/subscriptions/events_processor.rb +1 -1
- data/lib/pg_eventstore/subscriptions/queries/subscription_command_queries.rb +5 -5
- data/lib/pg_eventstore/subscriptions/queries/subscription_queries.rb +3 -2
- data/lib/pg_eventstore/subscriptions/queries/subscription_service_queries.rb +78 -0
- data/lib/pg_eventstore/subscriptions/queries/subscriptions_set_command_queries.rb +2 -2
- data/lib/pg_eventstore/subscriptions/queries/subscriptions_set_queries.rb +1 -1
- data/lib/pg_eventstore/subscriptions/subscription.rb +18 -7
- data/lib/pg_eventstore/subscriptions/subscription_feeder.rb +8 -2
- data/lib/pg_eventstore/subscriptions/subscription_handler_performance.rb +1 -3
- data/lib/pg_eventstore/subscriptions/subscription_runner.rb +5 -2
- data/lib/pg_eventstore/subscriptions/subscription_runners_feeder.rb +9 -1
- data/lib/pg_eventstore/subscriptions/subscriptions_manager.rb +16 -10
- data/lib/pg_eventstore/tasks/setup.rake +30 -31
- data/lib/pg_eventstore/utils.rb +8 -0
- data/lib/pg_eventstore/version.rb +1 -1
- data/lib/pg_eventstore/web/application.rb +5 -5
- data/lib/pg_eventstore/web/paginator/events_collection.rb +4 -4
- data/lib/pg_eventstore/web/paginator/helpers.rb +3 -3
- data/lib/pg_eventstore/web/paginator/stream_ids_collection.rb +2 -2
- data/lib/pg_eventstore/web/subscriptions/helpers.rb +2 -2
- data/lib/pg_eventstore.rb +4 -4
- data/pg_eventstore.gemspec +1 -1
- data/sig/pg_eventstore/client.rbs +1 -1
- data/sig/pg_eventstore/commands/multiple.rbs +1 -1
- data/sig/pg_eventstore/event.rbs +7 -5
- data/sig/pg_eventstore/extensions/options_extension.rbs +9 -1
- data/sig/pg_eventstore/queries/event_queries.rbs +11 -11
- data/sig/pg_eventstore/queries/links_resolver.rbs +5 -5
- data/sig/pg_eventstore/queries/partition_queries.rbs +5 -1
- data/sig/pg_eventstore/queries/transaction_queries.rbs +2 -2
- data/sig/pg_eventstore/query_builders/partitions_filtering.rbs +9 -5
- data/sig/pg_eventstore/sql_builder.rbs +8 -2
- data/sig/pg_eventstore/subscriptions/queries/subscription_queries.rbs +13 -13
- data/sig/pg_eventstore/subscriptions/queries/subscription_service_queries.rbs +19 -0
- data/sig/pg_eventstore/subscriptions/subscription.rbs +2 -0
- data/sig/pg_eventstore/subscriptions/subscription_feeder.rbs +2 -0
- data/sig/pg_eventstore/subscriptions/subscription_runner.rbs +0 -2
- data/sig/pg_eventstore/subscriptions/subscription_runners_feeder.rbs +10 -3
- data/sig/pg_eventstore/subscriptions/subscriptions_manager.rbs +2 -0
- data/sig/pg_eventstore/utils.rbs +10 -2
- metadata +11 -2
data/sig/pg_eventstore/event.rbs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
module PgEventstore
|
|
2
2
|
class Event
|
|
3
|
-
include
|
|
3
|
+
include Extensions::OptionsExtension
|
|
4
|
+
|
|
4
5
|
LINK_TYPE: String
|
|
6
|
+
PRIMARY_TABLE_NAME: String
|
|
5
7
|
|
|
6
|
-
def ==: ((Object |
|
|
8
|
+
def ==: ((Object | Event) other) -> bool
|
|
7
9
|
|
|
8
10
|
def link?: () -> bool
|
|
9
11
|
|
|
@@ -27,7 +29,7 @@ module PgEventstore
|
|
|
27
29
|
|
|
28
30
|
attr_accessor global_position: Integer?
|
|
29
31
|
|
|
30
|
-
attr_accessor stream:
|
|
32
|
+
attr_accessor stream: Stream?
|
|
31
33
|
|
|
32
34
|
attr_accessor stream_revision: Integer?
|
|
33
35
|
|
|
@@ -35,11 +37,11 @@ module PgEventstore
|
|
|
35
37
|
|
|
36
38
|
attr_accessor metadata: ::Hash[untyped, untyped]
|
|
37
39
|
|
|
38
|
-
attr_accessor
|
|
40
|
+
attr_accessor link_global_position: Integer?
|
|
39
41
|
|
|
40
42
|
attr_accessor link_partition_id: Integer?
|
|
41
43
|
|
|
42
|
-
attr_accessor link:
|
|
44
|
+
attr_accessor link: Event?
|
|
43
45
|
|
|
44
46
|
attr_accessor created_at: Time?
|
|
45
47
|
end
|
|
@@ -15,7 +15,15 @@ module PgEventstore
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
class Options
|
|
18
|
-
|
|
18
|
+
attr_reader options: Hash[Extensions::OptionsExtension::Option, true]
|
|
19
|
+
|
|
20
|
+
def initialize: (?Array[Extensions::OptionsExtension::Option] options) -> void
|
|
21
|
+
|
|
22
|
+
def +: (Options other) -> Options
|
|
23
|
+
|
|
24
|
+
def []: (Symbol option_name) -> Extensions::OptionsExtension::Option?
|
|
25
|
+
|
|
26
|
+
def include?: (Extensions::OptionsExtension::Option option) -> bool
|
|
19
27
|
end
|
|
20
28
|
|
|
21
29
|
def self.included: (untyped klass) -> untyped
|
|
@@ -5,43 +5,43 @@ module PgEventstore
|
|
|
5
5
|
# _@param_ `serializer`
|
|
6
6
|
#
|
|
7
7
|
# _@param_ `deserializer`
|
|
8
|
-
def initialize: (
|
|
8
|
+
def initialize: (Connection connection, EventSerializer serializer, EventDeserializer deserializer) -> void
|
|
9
9
|
|
|
10
10
|
# _@param_ `event`
|
|
11
|
-
def event_exists?: (
|
|
11
|
+
def event_exists?: (Event event) -> bool
|
|
12
12
|
|
|
13
13
|
def grouped_events: (Stream stream, Array[Hash[untyped, untyped]] options_by_event_type, **untyped options)-> Array[Event]
|
|
14
14
|
|
|
15
15
|
# _@param_ `events`
|
|
16
|
-
def
|
|
16
|
+
def global_positions_from_db: (::Array[Event] events) -> ::Array[Integer]
|
|
17
17
|
|
|
18
18
|
# _@param_ `stream`
|
|
19
|
-
def stream_revision: (
|
|
19
|
+
def stream_revision: (Stream stream) -> Integer?
|
|
20
20
|
|
|
21
21
|
# _@param_ `stream`
|
|
22
22
|
#
|
|
23
23
|
# _@param_ `options`
|
|
24
|
-
def stream_events: (
|
|
24
|
+
def stream_events: (Stream stream, ::Hash[untyped, untyped] options) -> ::Array[Event]
|
|
25
25
|
|
|
26
26
|
# _@param_ `stream`
|
|
27
27
|
#
|
|
28
28
|
# _@param_ `events`
|
|
29
|
-
def insert: (
|
|
29
|
+
def insert: (Stream stream, ::Array[Event] events) -> ::Array[Event]
|
|
30
30
|
|
|
31
31
|
# _@param_ `stream`
|
|
32
32
|
#
|
|
33
33
|
# _@param_ `events`
|
|
34
|
-
def prepared_statements: (
|
|
34
|
+
def prepared_statements: (Stream stream, ::Array[Event] events) -> ::Array[(::Array[String] | ::Array[Object])]
|
|
35
35
|
|
|
36
|
-
def links_resolver: () ->
|
|
36
|
+
def links_resolver: () -> LinksResolver
|
|
37
37
|
|
|
38
38
|
# Returns the value of attribute connection.
|
|
39
|
-
attr_accessor connection:
|
|
39
|
+
attr_accessor connection: Connection
|
|
40
40
|
|
|
41
41
|
# Returns the value of attribute serializer.
|
|
42
|
-
attr_accessor serializer:
|
|
42
|
+
attr_accessor serializer: EventSerializer
|
|
43
43
|
|
|
44
44
|
# Returns the value of attribute deserializer.
|
|
45
|
-
attr_accessor deserializer:
|
|
45
|
+
attr_accessor deserializer: EventDeserializer
|
|
46
46
|
end
|
|
47
47
|
end
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
module PgEventstore
|
|
2
2
|
class LinksResolver
|
|
3
3
|
# _@param_ `connection`
|
|
4
|
-
def initialize: (
|
|
4
|
+
def initialize: (Connection connection) -> void
|
|
5
5
|
|
|
6
6
|
# _@param_ `raw_events`
|
|
7
|
-
def resolve: (::Array[::Hash[
|
|
7
|
+
def resolve: (::Array[::Hash[String, untyped]] raw_events) -> ::Array[::Hash[String, untyped]]
|
|
8
8
|
|
|
9
9
|
# _@param_ `link_events` — partition id to link events association
|
|
10
10
|
#
|
|
11
11
|
# _@return_ — original events
|
|
12
|
-
def load_original_events: (::Hash[Integer, ::Array[::Hash[
|
|
12
|
+
def load_original_events: (::Hash[Integer, ::Array[::Hash[String, untyped]]] link_events) -> ::Array[::Hash[String, untyped]]
|
|
13
13
|
|
|
14
|
-
def partition_queries: () ->
|
|
14
|
+
def partition_queries: () -> PartitionQueries
|
|
15
15
|
|
|
16
16
|
# Returns the value of attribute connection.
|
|
17
|
-
attr_accessor connection:
|
|
17
|
+
attr_accessor connection: Connection
|
|
18
18
|
end
|
|
19
19
|
end
|
|
@@ -39,7 +39,8 @@ module PgEventstore
|
|
|
39
39
|
# _@return_ — partition attributes
|
|
40
40
|
def context_partition: (PgEventstore::Stream stream) -> ::Hash[untyped, untyped]?
|
|
41
41
|
|
|
42
|
-
def partitions: (Array[Hash[Symbol, String | nil]] stream_filters, Array[String] event_filters
|
|
42
|
+
def partitions: (Array[Hash[Symbol, String | nil]] stream_filters, Array[String] event_filters,
|
|
43
|
+
?scope: Symbol) -> Array[Partition]
|
|
43
44
|
|
|
44
45
|
# _@param_ `stream`
|
|
45
46
|
#
|
|
@@ -76,5 +77,8 @@ module PgEventstore
|
|
|
76
77
|
private
|
|
77
78
|
|
|
78
79
|
def deserialize: (Hash[untyped, untyped] attrs)-> Partition
|
|
80
|
+
|
|
81
|
+
def set_partitions_scope: (QueryBuilders::PartitionsFiltering partitions_filter, Array[untyped] stream_filters,
|
|
82
|
+
Array[untyped] event_filters, Symbol scope) -> SQLBuilder
|
|
79
83
|
end
|
|
80
84
|
end
|
|
@@ -6,12 +6,12 @@ module PgEventstore
|
|
|
6
6
|
def initialize: (PgEventstore::Connection connection) -> void
|
|
7
7
|
|
|
8
8
|
# _@param_ `level` — transaction isolation level
|
|
9
|
-
def transaction: (?Symbol level) { () -> untyped } -> void
|
|
9
|
+
def transaction: (?Symbol level, ?read_only: bool) { () -> untyped } -> void
|
|
10
10
|
|
|
11
11
|
# _@param_ `level` — PostgreSQL transaction isolation level
|
|
12
12
|
#
|
|
13
13
|
# _@param_ `pg_connection`
|
|
14
|
-
def pg_transaction: (String level, PG::Connection pg_connection) { () -> untyped } -> void
|
|
14
|
+
def pg_transaction: (String level, bool read_only, PG::Connection pg_connection) { () -> untyped } -> void
|
|
15
15
|
|
|
16
16
|
def partition_queries: () -> PgEventstore::PartitionQueries
|
|
17
17
|
|
|
@@ -7,15 +7,19 @@ module PgEventstore
|
|
|
7
7
|
|
|
8
8
|
def self.extract_streams_filter: (Hash[untyped, untyped] options) -> Array[Hash[untyped, untyped]]
|
|
9
9
|
|
|
10
|
-
def
|
|
10
|
+
def self.correct_stream_filter?: (::Hash[untyped, untyped] stream_attrs) -> bool
|
|
11
11
|
|
|
12
|
-
def
|
|
12
|
+
def add_event_types: (::Array[String] event_types) -> SQLBuilder
|
|
13
13
|
|
|
14
|
-
def
|
|
14
|
+
def add_stream_attrs: (?context: String?, ?stream_name: String?) -> SQLBuilder
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
def with_event_types: -> SQLBuilder
|
|
17
17
|
|
|
18
|
-
def
|
|
18
|
+
def with_stream_names: -> SQLBuilder
|
|
19
|
+
|
|
20
|
+
def without_event_types: -> SQLBuilder
|
|
21
|
+
|
|
22
|
+
def without_stream_names: -> SQLBuilder
|
|
19
23
|
end
|
|
20
24
|
end
|
|
21
25
|
end
|
|
@@ -2,6 +2,8 @@ module PgEventstore
|
|
|
2
2
|
class SQLBuilder
|
|
3
3
|
def initialize: () -> void
|
|
4
4
|
|
|
5
|
+
def from_sql: -> String
|
|
6
|
+
|
|
5
7
|
# _@param_ `sql`
|
|
6
8
|
def select: (String sql) -> self
|
|
7
9
|
|
|
@@ -18,7 +20,7 @@ module PgEventstore
|
|
|
18
20
|
def where_or: (String sql, *Object arguments) -> self
|
|
19
21
|
|
|
20
22
|
# _@param_ `table_name`
|
|
21
|
-
def from: (String table_name) -> self
|
|
23
|
+
def from: (String | SQLBuilder table_name) -> self
|
|
22
24
|
|
|
23
25
|
# _@param_ `sql`
|
|
24
26
|
#
|
|
@@ -53,7 +55,7 @@ module PgEventstore
|
|
|
53
55
|
# _@param_ `val`
|
|
54
56
|
def positional_values_size=: (Integer val) -> Integer
|
|
55
57
|
|
|
56
|
-
def _to_exec_params: () ->
|
|
58
|
+
def _to_exec_params: () -> [String, ::Array[untyped]]
|
|
57
59
|
|
|
58
60
|
def single_query_sql: () -> String
|
|
59
61
|
|
|
@@ -70,5 +72,9 @@ module PgEventstore
|
|
|
70
72
|
|
|
71
73
|
# _@param_ `sql`
|
|
72
74
|
def extract_positional_args: (String sql, *untyped arguments) -> String
|
|
75
|
+
|
|
76
|
+
private
|
|
77
|
+
|
|
78
|
+
def merge: (SQLBuilder builder)-> String
|
|
73
79
|
end
|
|
74
80
|
end
|
|
@@ -4,28 +4,28 @@ module PgEventstore
|
|
|
4
4
|
def initialize: (PgEventstore::Connection connection) -> void
|
|
5
5
|
|
|
6
6
|
# _@param_ `attrs`
|
|
7
|
-
def find_or_create_by: (::Hash[untyped, untyped] attrs) -> ::Hash[
|
|
7
|
+
def find_or_create_by: (::Hash[untyped, untyped] attrs) -> ::Hash[Symbol, untyped]
|
|
8
8
|
|
|
9
9
|
# _@param_ `attrs`
|
|
10
|
-
def find_by: (::Hash[untyped, untyped] attrs) -> ::Hash[
|
|
10
|
+
def find_by: (::Hash[untyped, untyped] attrs) -> ::Hash[Symbol, untyped]?
|
|
11
11
|
|
|
12
12
|
# _@param_ `attrs`
|
|
13
|
-
def find_all: (::Hash[untyped, untyped] attrs) -> ::Array[::Hash[
|
|
13
|
+
def find_all: (::Hash[untyped, untyped] attrs) -> ::Array[::Hash[Symbol, untyped]]
|
|
14
14
|
|
|
15
15
|
def set_collection: (?String? state) -> ::Array[String]
|
|
16
16
|
|
|
17
17
|
# _@param_ `id`
|
|
18
|
-
def find!: (Integer id) -> ::Hash[
|
|
18
|
+
def find!: (Integer id) -> ::Hash[Symbol, untyped]
|
|
19
19
|
|
|
20
20
|
# _@param_ `attrs`
|
|
21
|
-
def create: (::Hash[untyped, untyped] attrs) -> ::Hash[
|
|
21
|
+
def create: (::Hash[untyped, untyped] attrs) -> ::Hash[Symbol, untyped]
|
|
22
22
|
|
|
23
23
|
# _@param_ `id`
|
|
24
24
|
#
|
|
25
25
|
# _@param_ `attrs`
|
|
26
26
|
#
|
|
27
27
|
# _@param_ `locked_by`
|
|
28
|
-
def update: (Integer id, attrs: ::Hash[
|
|
28
|
+
def update: (Integer id, attrs: ::Hash[Symbol, untyped], locked_by: Integer?) -> ::Hash[Symbol, untyped]
|
|
29
29
|
|
|
30
30
|
# _@param_ `subscriptions_set_id` — SubscriptionsSet#id
|
|
31
31
|
#
|
|
@@ -52,22 +52,22 @@ module PgEventstore
|
|
|
52
52
|
# _@param_ `id` — runner id
|
|
53
53
|
#
|
|
54
54
|
# _@param_ `options` — query options
|
|
55
|
-
def query_builder: (Integer id, ::Hash[untyped, untyped] options) ->
|
|
55
|
+
def query_builder: (Integer id, ::Hash[untyped, untyped] options) -> SQLBuilder
|
|
56
56
|
|
|
57
57
|
# _@param_ `builders`
|
|
58
|
-
def union_builders: (::Array[
|
|
58
|
+
def union_builders: (::Array[SQLBuilder] builders) -> SQLBuilder
|
|
59
59
|
|
|
60
|
-
def transaction_queries: () ->
|
|
60
|
+
def transaction_queries: () -> TransactionQueries
|
|
61
61
|
|
|
62
|
-
def links_resolver: () ->
|
|
62
|
+
def links_resolver: () -> LinksResolver
|
|
63
63
|
|
|
64
64
|
# _@param_ `hash`
|
|
65
|
-
def deserialize: (::Hash[
|
|
65
|
+
def deserialize: (::Hash[String, untyped] hash) -> ::Hash[Symbol, untyped]
|
|
66
66
|
|
|
67
67
|
# _@param_ `attrs`
|
|
68
|
-
def find_by_attrs_builder: (::Hash[untyped, untyped] attrs) ->
|
|
68
|
+
def find_by_attrs_builder: (::Hash[untyped, untyped] attrs) -> SQLBuilder
|
|
69
69
|
|
|
70
70
|
# Returns the value of attribute connection.
|
|
71
|
-
attr_accessor connection:
|
|
71
|
+
attr_accessor connection: Connection
|
|
72
72
|
end
|
|
73
73
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module PgEventstore
|
|
2
|
+
class SubscriptionServiceQueries
|
|
3
|
+
DEFAULT_SAFE_POSITION: Integer
|
|
4
|
+
|
|
5
|
+
attr_reader connection: Connection
|
|
6
|
+
|
|
7
|
+
def initialize: (Connection connection) -> void
|
|
8
|
+
|
|
9
|
+
def events_horizon_present?: -> bool
|
|
10
|
+
|
|
11
|
+
def init_events_horizon: -> void
|
|
12
|
+
|
|
13
|
+
def safe_global_position: -> Integer
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def transaction_queries: -> TransactionQueries
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -12,8 +12,6 @@ module PgEventstore
|
|
|
12
12
|
stats: SubscriptionHandlerPerformance,
|
|
13
13
|
events_processor: EventsProcessor,
|
|
14
14
|
subscription: Subscription,
|
|
15
|
-
?restart_terminator: _RestartTerminator?,
|
|
16
|
-
?failed_subscription_notifier: _FailedSubscriptionNotifier?
|
|
17
15
|
) -> void
|
|
18
16
|
|
|
19
17
|
def next_chunk_query_opts: () -> ::Hash[untyped, untyped]
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
module PgEventstore
|
|
2
2
|
class SubscriptionRunnersFeeder
|
|
3
|
+
@config_name: Symbol
|
|
4
|
+
@current_database_id: Integer
|
|
5
|
+
|
|
3
6
|
# _@param_ `config_name`
|
|
4
7
|
def initialize: (Symbol config_name) -> void
|
|
5
8
|
|
|
6
9
|
# _@param_ `runners`
|
|
7
|
-
def feed: (::Array[
|
|
10
|
+
def feed: (::Array[SubscriptionRunner] runners) -> void
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def connection: () -> Connection
|
|
8
15
|
|
|
9
|
-
def
|
|
16
|
+
def subscription_queries: () -> SubscriptionQueries
|
|
10
17
|
|
|
11
|
-
def
|
|
18
|
+
def subscription_service_queries: -> SubscriptionServiceQueries
|
|
12
19
|
end
|
|
13
20
|
end
|
data/sig/pg_eventstore/utils.rbs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
module PgEventstore
|
|
2
2
|
class Utils
|
|
3
|
+
def self.benchmark: { -> untyped } -> Float
|
|
4
|
+
|
|
3
5
|
# _@param_ `object`
|
|
4
6
|
def self.deep_transform_keys: (untyped object) { (untyped key) -> untyped } -> Object
|
|
5
7
|
|
|
@@ -16,13 +18,19 @@ module PgEventstore
|
|
|
16
18
|
# _@param_ `error`
|
|
17
19
|
def self.error_info: (StandardError error) -> ::Hash[untyped, untyped]
|
|
18
20
|
|
|
21
|
+
def self.read_pid: (String file_path) -> String?
|
|
22
|
+
|
|
23
|
+
def self.remove_file: (String file_path) -> void
|
|
24
|
+
|
|
19
25
|
# _@param_ `str`
|
|
20
26
|
def self.underscore_str: (String str) -> String
|
|
21
27
|
|
|
22
28
|
def self.original_global_position: (Hash[untyped, untyped] raw_event) -> Integer
|
|
23
29
|
|
|
24
|
-
def self.unwrap_exception: (
|
|
30
|
+
def self.unwrap_exception: (WrappedException | StandardError wrapped_exception)-> StandardError
|
|
31
|
+
|
|
32
|
+
def self.wrap_exception: (StandardError exception, **untyped extra)-> WrappedException
|
|
25
33
|
|
|
26
|
-
def self.
|
|
34
|
+
def self.write_to_file: (String file_path, String content) -> void
|
|
27
35
|
end
|
|
28
36
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pg_eventstore
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Dzyzenko
|
|
@@ -68,9 +68,15 @@ files:
|
|
|
68
68
|
- ".rubocop.yml"
|
|
69
69
|
- CHANGELOG.md
|
|
70
70
|
- CODE_OF_CONDUCT.md
|
|
71
|
+
- Dockerfile
|
|
71
72
|
- LICENSE.txt
|
|
72
73
|
- README.md
|
|
73
74
|
- db/migrations/0_create_extensions.sql
|
|
75
|
+
- db/migrations/10_setup_pg_cron.rb
|
|
76
|
+
- db/migrations/11_add_events_link_global_position.sql
|
|
77
|
+
- db/migrations/12_migrate_legacy_links.rb
|
|
78
|
+
- db/migrations/13_remove_events_link_id.sql
|
|
79
|
+
- db/migrations/14_remove_ids_events_id_index.sql
|
|
74
80
|
- db/migrations/1_create_events.sql
|
|
75
81
|
- db/migrations/2_create_subscriptions.sql
|
|
76
82
|
- db/migrations/3_create_subscription_commands.sql
|
|
@@ -79,6 +85,7 @@ files:
|
|
|
79
85
|
- db/migrations/6_add_commands_data.sql
|
|
80
86
|
- db/migrations/7_support_reading_streams_system_stream.sql
|
|
81
87
|
- db/migrations/8_improve_0_revision_partial_index.sql
|
|
88
|
+
- db/migrations/9_create_events_horizon.sql
|
|
82
89
|
- docs/admin_ui.md
|
|
83
90
|
- docs/appending_events.md
|
|
84
91
|
- docs/configuration.md
|
|
@@ -169,6 +176,7 @@ files:
|
|
|
169
176
|
- lib/pg_eventstore/subscriptions/extensions/command_class_lookup_extension.rb
|
|
170
177
|
- lib/pg_eventstore/subscriptions/queries/subscription_command_queries.rb
|
|
171
178
|
- lib/pg_eventstore/subscriptions/queries/subscription_queries.rb
|
|
179
|
+
- lib/pg_eventstore/subscriptions/queries/subscription_service_queries.rb
|
|
172
180
|
- lib/pg_eventstore/subscriptions/queries/subscriptions_set_command_queries.rb
|
|
173
181
|
- lib/pg_eventstore/subscriptions/queries/subscriptions_set_queries.rb
|
|
174
182
|
- lib/pg_eventstore/subscriptions/runner_recovery_strategies.rb
|
|
@@ -334,6 +342,7 @@ files:
|
|
|
334
342
|
- sig/pg_eventstore/subscriptions/extensions/command_class_lookup_extension.rbs
|
|
335
343
|
- sig/pg_eventstore/subscriptions/queries/subscription_command_queries.rbs
|
|
336
344
|
- sig/pg_eventstore/subscriptions/queries/subscription_queries.rbs
|
|
345
|
+
- sig/pg_eventstore/subscriptions/queries/subscription_service_queries.rbs
|
|
337
346
|
- sig/pg_eventstore/subscriptions/queries/subscriptions_set_command_queries.rbs
|
|
338
347
|
- sig/pg_eventstore/subscriptions/queries/subscriptions_set_queries.rbs
|
|
339
348
|
- sig/pg_eventstore/subscriptions/runner_recovery_strategies/restore_connection.rbs
|
|
@@ -397,7 +406,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
397
406
|
requirements:
|
|
398
407
|
- - ">="
|
|
399
408
|
- !ruby/object:Gem::Version
|
|
400
|
-
version: '3.
|
|
409
|
+
version: '3.2'
|
|
401
410
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
402
411
|
requirements:
|
|
403
412
|
- - ">="
|