pg_eventstore 1.1.2 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +7 -29
- data/docs/admin_ui.md +35 -0
- data/lib/pg_eventstore/abstract_command.rb +2 -0
- data/lib/pg_eventstore/callbacks.rb +3 -0
- data/lib/pg_eventstore/client.rb +6 -1
- data/lib/pg_eventstore/config.rb +1 -1
- data/lib/pg_eventstore/connection.rb +9 -1
- data/lib/pg_eventstore/errors.rb +45 -26
- data/lib/pg_eventstore/event.rb +2 -1
- data/lib/pg_eventstore/event_class_resolver.rb +1 -1
- data/lib/pg_eventstore/event_deserializer.rb +8 -2
- data/lib/pg_eventstore/event_serializer.rb +2 -0
- data/lib/pg_eventstore/extensions/callbacks_extension.rb +1 -0
- data/lib/pg_eventstore/extensions/options_extension.rb +3 -1
- data/lib/pg_eventstore/queries/event_queries.rb +12 -4
- data/lib/pg_eventstore/queries/links_resolver.rb +3 -0
- data/lib/pg_eventstore/queries/partition_queries.rb +6 -0
- data/lib/pg_eventstore/queries/transaction_queries.rb +4 -0
- data/lib/pg_eventstore/queries.rb +1 -1
- data/lib/pg_eventstore/query_builders/{events_filtering_query.rb → events_filtering.rb} +3 -0
- data/lib/pg_eventstore/sql_builder.rb +18 -10
- data/lib/pg_eventstore/stream.rb +13 -2
- data/lib/pg_eventstore/subscriptions/basic_runner.rb +2 -0
- data/lib/pg_eventstore/subscriptions/commands_handler.rb +5 -3
- data/lib/pg_eventstore/subscriptions/queries/subscription_command_queries.rb +6 -4
- data/lib/pg_eventstore/subscriptions/queries/subscription_queries.rb +4 -2
- data/lib/pg_eventstore/subscriptions/queries/subscriptions_set_command_queries.rb +6 -4
- data/lib/pg_eventstore/subscriptions/queries/subscriptions_set_queries.rb +3 -0
- data/lib/pg_eventstore/subscriptions/runner_state.rb +1 -0
- data/lib/pg_eventstore/subscriptions/subscription.rb +19 -17
- data/lib/pg_eventstore/subscriptions/subscription_feeder.rb +4 -0
- data/lib/pg_eventstore/subscriptions/subscription_feeder_commands/base.rb +4 -4
- data/lib/pg_eventstore/subscriptions/subscription_handler_performance.rb +2 -1
- data/lib/pg_eventstore/subscriptions/subscription_runner.rb +5 -0
- data/lib/pg_eventstore/subscriptions/subscription_runner_commands/base.rb +4 -4
- data/lib/pg_eventstore/subscriptions/subscriptions_manager.rb +6 -4
- data/lib/pg_eventstore/subscriptions/subscriptions_set.rb +10 -10
- data/lib/pg_eventstore/version.rb +2 -1
- data/lib/pg_eventstore/web/application.rb +12 -6
- data/lib/pg_eventstore/web/paginator/base_collection.rb +15 -1
- data/lib/pg_eventstore/web/paginator/event_types_collection.rb +2 -1
- data/lib/pg_eventstore/web/paginator/events_collection.rb +7 -4
- data/lib/pg_eventstore/web/paginator/helpers.rb +3 -3
- data/lib/pg_eventstore/web/paginator/stream_contexts_collection.rb +2 -1
- data/lib/pg_eventstore/web/paginator/stream_ids_collection.rb +2 -1
- data/lib/pg_eventstore/web/paginator/stream_names_collection.rb +2 -1
- data/lib/pg_eventstore/web/subscriptions/set_collection.rb +2 -0
- data/lib/pg_eventstore/web/subscriptions/subscriptions.rb +2 -0
- data/lib/pg_eventstore/web/subscriptions/subscriptions_set.rb +2 -0
- data/lib/pg_eventstore/web/subscriptions/subscriptions_to_set_association.rb +6 -1
- data/lib/pg_eventstore/web/views/layouts/application.erb +12 -12
- data/lib/pg_eventstore.rb +6 -1
- data/pg_eventstore.gemspec +1 -1
- data/rbs_collection.lock.yaml +16 -0
- data/rbs_collection.yaml +23 -0
- data/sig/interfaces/callback.rbs +3 -0
- data/sig/interfaces/event_class_resolver.rbs +3 -0
- data/sig/interfaces/event_modifier.rbs +3 -0
- data/sig/interfaces/restart_terminator.rbs +3 -0
- data/sig/interfaces/subscription_handler.rbs +3 -0
- data/sig/pg/basic_type_registry.rbs +21 -0
- data/sig/pg/connection.rbs +407 -0
- data/sig/pg/constants.rbs +153 -0
- data/sig/pg_eventstore/abstract_command.rbs +11 -0
- data/sig/pg_eventstore/callbacks.rbs +21 -0
- data/sig/pg_eventstore/client.rbs +67 -0
- data/sig/pg_eventstore/commands/append.rbs +33 -0
- data/sig/pg_eventstore/commands/event_modifiers/prepare_link_event.rbs +24 -0
- data/sig/pg_eventstore/commands/event_modifiers/prepare_regular_event.rbs +12 -0
- data/sig/pg_eventstore/commands/link_to.rbs +17 -0
- data/sig/pg_eventstore/commands/multiple.rbs +7 -0
- data/sig/pg_eventstore/commands/read.rbs +10 -0
- data/sig/pg_eventstore/commands/regular_stream_read_paginated.rbs +32 -0
- data/sig/pg_eventstore/commands/system_stream_read_paginated.rbs +30 -0
- data/sig/pg_eventstore/config.rbs +51 -0
- data/sig/pg_eventstore/connection.rbs +30 -0
- data/sig/pg_eventstore/errors.rbs +116 -0
- data/sig/pg_eventstore/event.rbs +46 -0
- data/sig/pg_eventstore/event_class_resolver.rbs +6 -0
- data/sig/pg_eventstore/event_deserializer.rbs +20 -0
- data/sig/pg_eventstore/event_serializer.rbs +13 -0
- data/sig/pg_eventstore/extensions/callbacks_extension.rbs +23 -0
- data/sig/pg_eventstore/extensions/options_extension.rbs +37 -0
- data/sig/pg_eventstore/extensions/using_connection_extension.rbs +14 -0
- data/sig/pg_eventstore/middleware.rbs +9 -0
- data/sig/pg_eventstore/pg_connection.rbs +13 -0
- data/sig/pg_eventstore/queries/event_queries.rbs +50 -0
- data/sig/pg_eventstore/queries/links_resolver.rbs +19 -0
- data/sig/pg_eventstore/queries/partition_queries.rbs +74 -0
- data/sig/pg_eventstore/queries/transaction_queries.rbs +21 -0
- data/sig/pg_eventstore/queries.rbs +23 -0
- data/sig/pg_eventstore/query_builders/events_filtering_query.rbs +62 -0
- data/sig/pg_eventstore/sql_builder.rbs +74 -0
- data/sig/pg_eventstore/stream.rbs +40 -0
- data/sig/pg_eventstore/subscriptions/basic_runner.rbs +37 -0
- data/sig/pg_eventstore/subscriptions/command_handlers/subscription_feeder_commands.rbs +16 -0
- data/sig/pg_eventstore/subscriptions/command_handlers/subscription_runners_commands.rbs +18 -0
- data/sig/pg_eventstore/subscriptions/commands_handler.rbs +25 -0
- data/sig/pg_eventstore/subscriptions/events_processor.rbs +34 -0
- data/sig/pg_eventstore/subscriptions/extensions/base_command_extension.rbs +20 -0
- data/sig/pg_eventstore/subscriptions/extensions/command_class_lookup_extension.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/queries/subscription_command_queries.rbs +56 -0
- data/sig/pg_eventstore/subscriptions/queries/subscription_queries.rbs +73 -0
- data/sig/pg_eventstore/subscriptions/queries/subscriptions_set_command_queries.rbs +39 -0
- data/sig/pg_eventstore/subscriptions/queries/subscriptions_set_queries.rbs +36 -0
- data/sig/pg_eventstore/subscriptions/runner_state.rbs +16 -0
- data/sig/pg_eventstore/subscriptions/subscription.rbs +96 -0
- data/sig/pg_eventstore/subscriptions/subscription_feeder.rbs +64 -0
- data/sig/pg_eventstore/subscriptions/subscription_feeder_commands/base.rbs +45 -0
- data/sig/pg_eventstore/subscriptions/subscription_feeder_commands/restore.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_feeder_commands/start_all.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_feeder_commands/stop.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_feeder_commands/stop_all.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_feeder_commands.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_handler_performance.rbs +12 -0
- data/sig/pg_eventstore/subscriptions/subscription_runner.rbs +55 -0
- data/sig/pg_eventstore/subscriptions/subscription_runner_commands/base.rbs +47 -0
- data/sig/pg_eventstore/subscriptions/subscription_runner_commands/reset_position.rbs +11 -0
- data/sig/pg_eventstore/subscriptions/subscription_runner_commands/restore.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_runner_commands/start.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_runner_commands/stop.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_runner_commands.rbs +8 -0
- data/sig/pg_eventstore/subscriptions/subscription_runners_feeder.rbs +13 -0
- data/sig/pg_eventstore/subscriptions/subscriptions_manager.rbs +60 -0
- data/sig/pg_eventstore/subscriptions/subscriptions_set.rbs +72 -0
- data/sig/pg_eventstore/utils.rbs +20 -0
- data/sig/pg_eventstore/version.rbs +3 -0
- data/sig/pg_eventstore/web/paginator/base_collection.rbs +51 -0
- data/sig/pg_eventstore/web/paginator/event_types_collection.rbs +15 -0
- data/sig/pg_eventstore/web/paginator/events_collection.rbs +31 -0
- data/sig/pg_eventstore/web/paginator/helpers.rbs +38 -0
- data/sig/pg_eventstore/web/paginator/stream_contexts_collection.rbs +15 -0
- data/sig/pg_eventstore/web/paginator/stream_ids_collection.rbs +15 -0
- data/sig/pg_eventstore/web/paginator/stream_names_collection.rbs +15 -0
- data/sig/pg_eventstore/web/subscriptions/helpers.rbs +48 -0
- data/sig/pg_eventstore/web/subscriptions/set_collection.rbs +18 -0
- data/sig/pg_eventstore/web/subscriptions/subscriptions.rbs +18 -0
- data/sig/pg_eventstore/web/subscriptions/subscriptions_set.rbs +18 -0
- data/sig/pg_eventstore/web/subscriptions/subscriptions_to_set_association.rbs +18 -0
- data/sig/pg_eventstore.rbs +42 -0
- metadata +91 -3
@@ -0,0 +1,407 @@
|
|
1
|
+
module PG
|
2
|
+
class Connection
|
3
|
+
include PG::Constants
|
4
|
+
|
5
|
+
def self.async_api=: (untyped enable) -> untyped
|
6
|
+
|
7
|
+
alias self.async_connect self.new
|
8
|
+
|
9
|
+
alias self.async_ping self.ping
|
10
|
+
|
11
|
+
def self.async_send_api=: (untyped enable) -> untyped
|
12
|
+
|
13
|
+
def self.conndefaults: () -> untyped
|
14
|
+
|
15
|
+
def self.conndefaults_hash: () -> untyped
|
16
|
+
|
17
|
+
alias self.connect self.new
|
18
|
+
|
19
|
+
def self.connect_hash_to_string: (untyped hash) -> untyped
|
20
|
+
|
21
|
+
def self.connect_start: (*untyped) -> untyped
|
22
|
+
|
23
|
+
def self.conninfo_parse: (untyped) -> untyped
|
24
|
+
|
25
|
+
def self.encrypt_password: (untyped, untyped) -> untyped
|
26
|
+
|
27
|
+
alias self.escape self.escape_string
|
28
|
+
|
29
|
+
def self.escape_bytea: (untyped) -> untyped
|
30
|
+
|
31
|
+
def self.escape_string: (untyped) -> untyped
|
32
|
+
|
33
|
+
def self.isthreadsafe: () -> untyped
|
34
|
+
|
35
|
+
def self.new: (*untyped args) ?{ (untyped) -> untyped } -> untyped
|
36
|
+
|
37
|
+
alias self.open self.new
|
38
|
+
|
39
|
+
def self.parse_connect_args: (*untyped args) -> untyped
|
40
|
+
|
41
|
+
def self.ping: (*untyped args) -> untyped
|
42
|
+
|
43
|
+
def self.quote_connstr: (untyped value) -> untyped
|
44
|
+
|
45
|
+
def self.quote_ident: (untyped) -> untyped
|
46
|
+
|
47
|
+
alias self.setdb self.new
|
48
|
+
|
49
|
+
alias self.setdblogin self.new
|
50
|
+
|
51
|
+
def self.sync_connect: (*untyped) -> untyped
|
52
|
+
|
53
|
+
def self.sync_ping: (*untyped) -> untyped
|
54
|
+
|
55
|
+
def self.unescape_bytea: (untyped) -> untyped
|
56
|
+
|
57
|
+
public
|
58
|
+
|
59
|
+
alias async_cancel cancel
|
60
|
+
|
61
|
+
alias async_describe_portal describe_portal
|
62
|
+
|
63
|
+
alias async_describe_prepared describe_prepared
|
64
|
+
|
65
|
+
alias async_encrypt_password encrypt_password
|
66
|
+
|
67
|
+
alias async_exec exec
|
68
|
+
|
69
|
+
alias async_exec_params exec_params
|
70
|
+
|
71
|
+
alias async_exec_prepared exec_prepared
|
72
|
+
|
73
|
+
alias async_flush flush
|
74
|
+
|
75
|
+
alias async_get_copy_data get_copy_data
|
76
|
+
|
77
|
+
alias async_get_last_result get_last_result
|
78
|
+
|
79
|
+
alias async_get_result get_result
|
80
|
+
|
81
|
+
alias async_isnonblocking isnonblocking
|
82
|
+
|
83
|
+
alias async_prepare prepare
|
84
|
+
|
85
|
+
alias async_put_copy_data put_copy_data
|
86
|
+
|
87
|
+
alias async_put_copy_end put_copy_end
|
88
|
+
|
89
|
+
alias async_query exec
|
90
|
+
|
91
|
+
alias async_reset reset
|
92
|
+
|
93
|
+
alias async_set_client_encoding set_client_encoding
|
94
|
+
|
95
|
+
alias async_setnonblocking setnonblocking
|
96
|
+
|
97
|
+
def backend_key: () -> untyped
|
98
|
+
|
99
|
+
def backend_pid: () -> untyped
|
100
|
+
|
101
|
+
def block: (*untyped) -> untyped
|
102
|
+
|
103
|
+
def cancel: () -> untyped
|
104
|
+
|
105
|
+
def check_socket: () -> untyped
|
106
|
+
|
107
|
+
alias client_encoding= set_client_encoding
|
108
|
+
|
109
|
+
alias close finish
|
110
|
+
|
111
|
+
def conndefaults: () -> untyped
|
112
|
+
|
113
|
+
def conndefaults_hash: () -> untyped
|
114
|
+
|
115
|
+
def connect_poll: () -> untyped
|
116
|
+
|
117
|
+
def connection_needs_password: () -> untyped
|
118
|
+
|
119
|
+
def connection_used_password: () -> untyped
|
120
|
+
|
121
|
+
def conninfo: () -> untyped
|
122
|
+
|
123
|
+
def conninfo_hash: () -> untyped
|
124
|
+
|
125
|
+
def consume_input: () -> untyped
|
126
|
+
|
127
|
+
def copy_data: (untyped sql, ?untyped coder) { (untyped) -> untyped } -> untyped
|
128
|
+
|
129
|
+
def db: () -> untyped
|
130
|
+
|
131
|
+
def decoder_for_get_copy_data: () -> untyped
|
132
|
+
|
133
|
+
def decoder_for_get_copy_data=: (untyped) -> untyped
|
134
|
+
|
135
|
+
def describe_portal: (untyped) -> untyped
|
136
|
+
|
137
|
+
def describe_prepared: (untyped) -> untyped
|
138
|
+
|
139
|
+
def discard_results: () -> untyped
|
140
|
+
|
141
|
+
def encoder_for_put_copy_data: () -> untyped
|
142
|
+
|
143
|
+
def encoder_for_put_copy_data=: (untyped) -> untyped
|
144
|
+
|
145
|
+
def encrypt_password: (untyped password, untyped username, ?untyped algorithm) -> untyped
|
146
|
+
|
147
|
+
def enter_pipeline_mode: () -> untyped
|
148
|
+
|
149
|
+
def error_message: () -> untyped
|
150
|
+
|
151
|
+
alias escape escape_string
|
152
|
+
|
153
|
+
def escape_bytea: (untyped) -> untyped
|
154
|
+
|
155
|
+
def escape_identifier: (untyped) -> untyped
|
156
|
+
|
157
|
+
def escape_literal: (untyped) -> untyped
|
158
|
+
|
159
|
+
def escape_string: (untyped) -> untyped
|
160
|
+
|
161
|
+
def exec: (*untyped) -> untyped
|
162
|
+
|
163
|
+
def exec_params: (*untyped) -> untyped
|
164
|
+
|
165
|
+
def exec_prepared: (*untyped) -> untyped
|
166
|
+
|
167
|
+
def exit_pipeline_mode: () -> untyped
|
168
|
+
|
169
|
+
def external_encoding: () -> untyped
|
170
|
+
|
171
|
+
def field_name_type: () -> untyped
|
172
|
+
|
173
|
+
def field_name_type=: (untyped) -> untyped
|
174
|
+
|
175
|
+
def finish: () -> untyped
|
176
|
+
|
177
|
+
def finished?: () -> untyped
|
178
|
+
|
179
|
+
def flush: () -> untyped
|
180
|
+
|
181
|
+
def get_client_encoding: () -> untyped
|
182
|
+
|
183
|
+
def get_copy_data: (?untyped async, ?untyped decoder) -> untyped
|
184
|
+
|
185
|
+
def get_last_result: () -> untyped
|
186
|
+
|
187
|
+
def get_result: () -> untyped
|
188
|
+
|
189
|
+
def host: () -> untyped
|
190
|
+
|
191
|
+
def hostaddr: () -> untyped
|
192
|
+
|
193
|
+
def inspect: () -> untyped
|
194
|
+
|
195
|
+
def internal_encoding: () -> untyped
|
196
|
+
|
197
|
+
def internal_encoding=: (untyped) -> untyped
|
198
|
+
|
199
|
+
def is_busy: () -> untyped
|
200
|
+
|
201
|
+
def isnonblocking: () -> untyped
|
202
|
+
|
203
|
+
def lo_close: (untyped) -> untyped
|
204
|
+
|
205
|
+
def lo_creat: (*untyped) -> untyped
|
206
|
+
|
207
|
+
def lo_create: (untyped) -> untyped
|
208
|
+
|
209
|
+
def lo_export: (untyped, untyped) -> untyped
|
210
|
+
|
211
|
+
def lo_import: (untyped) -> untyped
|
212
|
+
|
213
|
+
def lo_lseek: (untyped, untyped, untyped) -> untyped
|
214
|
+
|
215
|
+
def lo_open: (*untyped) -> untyped
|
216
|
+
|
217
|
+
def lo_read: (untyped, untyped) -> untyped
|
218
|
+
|
219
|
+
alias lo_seek lo_lseek
|
220
|
+
|
221
|
+
def lo_tell: (untyped) -> untyped
|
222
|
+
|
223
|
+
def lo_truncate: (untyped, untyped) -> untyped
|
224
|
+
|
225
|
+
def lo_unlink: (untyped) -> untyped
|
226
|
+
|
227
|
+
def lo_write: (untyped, untyped) -> untyped
|
228
|
+
|
229
|
+
alias loclose lo_close
|
230
|
+
|
231
|
+
alias locreat lo_creat
|
232
|
+
|
233
|
+
alias locreate lo_create
|
234
|
+
|
235
|
+
alias loexport lo_export
|
236
|
+
|
237
|
+
alias loimport lo_import
|
238
|
+
|
239
|
+
alias lolseek lo_lseek
|
240
|
+
|
241
|
+
alias loopen lo_open
|
242
|
+
|
243
|
+
alias loread lo_read
|
244
|
+
|
245
|
+
alias loseek lo_lseek
|
246
|
+
|
247
|
+
alias lotell lo_tell
|
248
|
+
|
249
|
+
alias lotruncate lo_truncate
|
250
|
+
|
251
|
+
alias lounlink lo_unlink
|
252
|
+
|
253
|
+
alias lowrite lo_write
|
254
|
+
|
255
|
+
def make_empty_pgresult: (untyped) -> untyped
|
256
|
+
|
257
|
+
alias nonblocking? isnonblocking
|
258
|
+
|
259
|
+
def notifies: () -> untyped
|
260
|
+
|
261
|
+
alias notifies_wait wait_for_notify
|
262
|
+
|
263
|
+
def options: () -> untyped
|
264
|
+
|
265
|
+
def parameter_status: (untyped) -> untyped
|
266
|
+
|
267
|
+
def pass: () -> untyped
|
268
|
+
|
269
|
+
def pipeline_status: () -> untyped
|
270
|
+
|
271
|
+
def pipeline_sync: () -> untyped
|
272
|
+
|
273
|
+
def port: () -> untyped
|
274
|
+
|
275
|
+
def prepare: (*untyped) -> untyped
|
276
|
+
|
277
|
+
def protocol_version: () -> untyped
|
278
|
+
|
279
|
+
def put_copy_data: (untyped buffer, ?untyped encoder) -> untyped
|
280
|
+
|
281
|
+
def put_copy_end: (*untyped args) -> untyped
|
282
|
+
|
283
|
+
alias query exec
|
284
|
+
|
285
|
+
def quote_ident: (untyped) -> untyped
|
286
|
+
|
287
|
+
def reset: () -> untyped
|
288
|
+
|
289
|
+
def reset_poll: () -> untyped
|
290
|
+
|
291
|
+
def reset_start: () -> untyped
|
292
|
+
|
293
|
+
def send_describe_portal: (untyped) -> untyped
|
294
|
+
|
295
|
+
def send_describe_prepared: (untyped) -> untyped
|
296
|
+
|
297
|
+
def send_flush_request: () -> untyped
|
298
|
+
|
299
|
+
def send_prepare: (*untyped) -> untyped
|
300
|
+
|
301
|
+
def send_query: (*untyped) -> untyped
|
302
|
+
|
303
|
+
def send_query_params: (*untyped) -> untyped
|
304
|
+
|
305
|
+
def send_query_prepared: (*untyped) -> untyped
|
306
|
+
|
307
|
+
def server_version: () -> untyped
|
308
|
+
|
309
|
+
def set_client_encoding: (untyped) -> untyped
|
310
|
+
|
311
|
+
def set_default_encoding: () -> untyped
|
312
|
+
|
313
|
+
def set_error_context_visibility: (untyped) -> untyped
|
314
|
+
|
315
|
+
def set_error_verbosity: (untyped) -> untyped
|
316
|
+
|
317
|
+
def set_notice_processor: () -> untyped
|
318
|
+
|
319
|
+
def set_notice_receiver: () -> untyped
|
320
|
+
|
321
|
+
def set_single_row_mode: () -> untyped
|
322
|
+
|
323
|
+
def setnonblocking: (untyped enabled) -> untyped
|
324
|
+
|
325
|
+
def socket: () -> untyped
|
326
|
+
|
327
|
+
def socket_io: () -> untyped
|
328
|
+
|
329
|
+
def ssl_attribute: (untyped) -> untyped
|
330
|
+
|
331
|
+
def ssl_attribute_names: () -> untyped
|
332
|
+
|
333
|
+
def ssl_attributes: () -> untyped
|
334
|
+
|
335
|
+
def ssl_in_use?: () -> untyped
|
336
|
+
|
337
|
+
def status: () -> untyped
|
338
|
+
|
339
|
+
def sync_cancel: () -> untyped
|
340
|
+
|
341
|
+
def sync_describe_portal: (untyped) -> untyped
|
342
|
+
|
343
|
+
def sync_describe_prepared: (untyped) -> untyped
|
344
|
+
|
345
|
+
def sync_encrypt_password: (*untyped) -> untyped
|
346
|
+
|
347
|
+
def sync_exec: (*untyped) -> untyped
|
348
|
+
|
349
|
+
def sync_exec_params: (*untyped) -> untyped
|
350
|
+
|
351
|
+
def sync_exec_prepared: (*untyped) -> untyped
|
352
|
+
|
353
|
+
def sync_flush: () -> untyped
|
354
|
+
|
355
|
+
def sync_get_copy_data: (*untyped) -> untyped
|
356
|
+
|
357
|
+
def sync_get_last_result: () -> untyped
|
358
|
+
|
359
|
+
def sync_get_result: () -> untyped
|
360
|
+
|
361
|
+
def sync_isnonblocking: () -> untyped
|
362
|
+
|
363
|
+
def sync_prepare: (*untyped) -> untyped
|
364
|
+
|
365
|
+
def sync_put_copy_data: (*untyped) -> untyped
|
366
|
+
|
367
|
+
def sync_put_copy_end: (*untyped) -> untyped
|
368
|
+
|
369
|
+
def sync_reset: () -> untyped
|
370
|
+
|
371
|
+
def sync_set_client_encoding: (untyped) -> untyped
|
372
|
+
|
373
|
+
def sync_setnonblocking: (untyped) -> untyped
|
374
|
+
|
375
|
+
def trace: (untyped) -> untyped
|
376
|
+
|
377
|
+
def transaction: () { (untyped) -> untyped } -> untyped
|
378
|
+
|
379
|
+
def transaction_status: () -> untyped
|
380
|
+
|
381
|
+
def tty: () -> untyped
|
382
|
+
|
383
|
+
def type_map_for_queries: () -> untyped
|
384
|
+
|
385
|
+
def type_map_for_queries=: (untyped) -> untyped
|
386
|
+
|
387
|
+
def type_map_for_results: () -> untyped
|
388
|
+
|
389
|
+
def type_map_for_results=: (untyped) -> untyped
|
390
|
+
|
391
|
+
def unescape_bytea: (untyped) -> untyped
|
392
|
+
|
393
|
+
def untrace: () -> untyped
|
394
|
+
|
395
|
+
def user: () -> untyped
|
396
|
+
|
397
|
+
def wait_for_notify: (*untyped) -> untyped
|
398
|
+
|
399
|
+
private
|
400
|
+
|
401
|
+
def async_connect_or_reset: (untyped poll_meth) -> untyped
|
402
|
+
|
403
|
+
def flush_data=: (untyped) -> untyped
|
404
|
+
|
405
|
+
def reset_start2: (untyped) -> untyped
|
406
|
+
end
|
407
|
+
end
|
@@ -0,0 +1,153 @@
|
|
1
|
+
module PG
|
2
|
+
module Constants
|
3
|
+
CONNECTION_AUTH_OK: ::Integer
|
4
|
+
|
5
|
+
CONNECTION_AWAITING_RESPONSE: ::Integer
|
6
|
+
|
7
|
+
CONNECTION_BAD: ::Integer
|
8
|
+
|
9
|
+
CONNECTION_CHECK_STANDBY: ::Integer
|
10
|
+
|
11
|
+
CONNECTION_CHECK_TARGET: ::Integer
|
12
|
+
|
13
|
+
CONNECTION_CHECK_WRITABLE: ::Integer
|
14
|
+
|
15
|
+
CONNECTION_CONSUME: ::Integer
|
16
|
+
|
17
|
+
CONNECTION_GSS_STARTUP: ::Integer
|
18
|
+
|
19
|
+
CONNECTION_MADE: ::Integer
|
20
|
+
|
21
|
+
CONNECTION_NEEDED: ::Integer
|
22
|
+
|
23
|
+
CONNECTION_OK: ::Integer
|
24
|
+
|
25
|
+
CONNECTION_SETENV: ::Integer
|
26
|
+
|
27
|
+
CONNECTION_SSL_STARTUP: ::Integer
|
28
|
+
|
29
|
+
CONNECTION_STARTED: ::Integer
|
30
|
+
|
31
|
+
DEF_PGPORT: ::Integer
|
32
|
+
|
33
|
+
INVALID_OID: ::Integer
|
34
|
+
|
35
|
+
INV_READ: ::Integer
|
36
|
+
|
37
|
+
INV_WRITE: ::Integer
|
38
|
+
|
39
|
+
InvalidOid: ::Integer
|
40
|
+
|
41
|
+
PGRES_BAD_RESPONSE: ::Integer
|
42
|
+
|
43
|
+
PGRES_COMMAND_OK: ::Integer
|
44
|
+
|
45
|
+
PGRES_COPY_BOTH: ::Integer
|
46
|
+
|
47
|
+
PGRES_COPY_IN: ::Integer
|
48
|
+
|
49
|
+
PGRES_COPY_OUT: ::Integer
|
50
|
+
|
51
|
+
PGRES_EMPTY_QUERY: ::Integer
|
52
|
+
|
53
|
+
PGRES_FATAL_ERROR: ::Integer
|
54
|
+
|
55
|
+
PGRES_NONFATAL_ERROR: ::Integer
|
56
|
+
|
57
|
+
PGRES_PIPELINE_ABORTED: ::Integer
|
58
|
+
|
59
|
+
PGRES_PIPELINE_SYNC: ::Integer
|
60
|
+
|
61
|
+
PGRES_POLLING_FAILED: ::Integer
|
62
|
+
|
63
|
+
PGRES_POLLING_OK: ::Integer
|
64
|
+
|
65
|
+
PGRES_POLLING_READING: ::Integer
|
66
|
+
|
67
|
+
PGRES_POLLING_WRITING: ::Integer
|
68
|
+
|
69
|
+
PGRES_SINGLE_TUPLE: ::Integer
|
70
|
+
|
71
|
+
PGRES_TUPLES_OK: ::Integer
|
72
|
+
|
73
|
+
PG_DIAG_COLUMN_NAME: ::Integer
|
74
|
+
|
75
|
+
PG_DIAG_CONSTRAINT_NAME: ::Integer
|
76
|
+
|
77
|
+
PG_DIAG_CONTEXT: ::Integer
|
78
|
+
|
79
|
+
PG_DIAG_DATATYPE_NAME: ::Integer
|
80
|
+
|
81
|
+
PG_DIAG_INTERNAL_POSITION: ::Integer
|
82
|
+
|
83
|
+
PG_DIAG_INTERNAL_QUERY: ::Integer
|
84
|
+
|
85
|
+
PG_DIAG_MESSAGE_DETAIL: ::Integer
|
86
|
+
|
87
|
+
PG_DIAG_MESSAGE_HINT: ::Integer
|
88
|
+
|
89
|
+
PG_DIAG_MESSAGE_PRIMARY: ::Integer
|
90
|
+
|
91
|
+
PG_DIAG_SCHEMA_NAME: ::Integer
|
92
|
+
|
93
|
+
PG_DIAG_SEVERITY: ::Integer
|
94
|
+
|
95
|
+
PG_DIAG_SEVERITY_NONLOCALIZED: ::Integer
|
96
|
+
|
97
|
+
PG_DIAG_SOURCE_FILE: ::Integer
|
98
|
+
|
99
|
+
PG_DIAG_SOURCE_FUNCTION: ::Integer
|
100
|
+
|
101
|
+
PG_DIAG_SOURCE_LINE: ::Integer
|
102
|
+
|
103
|
+
PG_DIAG_SQLSTATE: ::Integer
|
104
|
+
|
105
|
+
PG_DIAG_STATEMENT_POSITION: ::Integer
|
106
|
+
|
107
|
+
PG_DIAG_TABLE_NAME: ::Integer
|
108
|
+
|
109
|
+
PQERRORS_DEFAULT: ::Integer
|
110
|
+
|
111
|
+
PQERRORS_SQLSTATE: ::Integer
|
112
|
+
|
113
|
+
PQERRORS_TERSE: ::Integer
|
114
|
+
|
115
|
+
PQERRORS_VERBOSE: ::Integer
|
116
|
+
|
117
|
+
PQPING_NO_ATTEMPT: ::Integer
|
118
|
+
|
119
|
+
PQPING_NO_RESPONSE: ::Integer
|
120
|
+
|
121
|
+
PQPING_OK: ::Integer
|
122
|
+
|
123
|
+
PQPING_REJECT: ::Integer
|
124
|
+
|
125
|
+
PQSHOW_CONTEXT_ALWAYS: ::Integer
|
126
|
+
|
127
|
+
PQSHOW_CONTEXT_ERRORS: ::Integer
|
128
|
+
|
129
|
+
PQSHOW_CONTEXT_NEVER: ::Integer
|
130
|
+
|
131
|
+
PQTRANS_ACTIVE: ::Integer
|
132
|
+
|
133
|
+
PQTRANS_IDLE: ::Integer
|
134
|
+
|
135
|
+
PQTRANS_INERROR: ::Integer
|
136
|
+
|
137
|
+
PQTRANS_INTRANS: ::Integer
|
138
|
+
|
139
|
+
PQTRANS_UNKNOWN: ::Integer
|
140
|
+
|
141
|
+
PQ_PIPELINE_ABORTED: ::Integer
|
142
|
+
|
143
|
+
PQ_PIPELINE_OFF: ::Integer
|
144
|
+
|
145
|
+
PQ_PIPELINE_ON: ::Integer
|
146
|
+
|
147
|
+
SEEK_CUR: ::Integer
|
148
|
+
|
149
|
+
SEEK_END: ::Integer
|
150
|
+
|
151
|
+
SEEK_SET: ::Integer
|
152
|
+
end
|
153
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module PgEventstore
|
2
|
+
class AbstractCommand
|
3
|
+
# _@param_ `queries`
|
4
|
+
def initialize: (PgEventstore::Queries queries) -> void
|
5
|
+
|
6
|
+
def call: () -> untyped
|
7
|
+
|
8
|
+
# Returns the value of attribute queries.
|
9
|
+
attr_accessor queries: PgEventstore::Queries
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module PgEventstore
|
2
|
+
class Callbacks
|
3
|
+
def initialize: () -> void
|
4
|
+
|
5
|
+
# _@param_ `action` — an object, that represents your action. In most cases you want to use a symbol there
|
6
|
+
#
|
7
|
+
# _@param_ `filter` — callback filter. Supported values are :before, :after and :around
|
8
|
+
#
|
9
|
+
# _@param_ `callback`
|
10
|
+
def define_callback: (untyped action, Symbol filter, _Callback callback) -> void
|
11
|
+
|
12
|
+
# _@param_ `action` — an action to run
|
13
|
+
def run_callbacks: (untyped action, *untyped args, **untyped kwargs) ?{ () -> untyped } -> untyped
|
14
|
+
|
15
|
+
def run_before_callbacks: (untyped action, *untyped args, **untyped kwargs) -> void
|
16
|
+
|
17
|
+
def run_around_callbacks: (untyped action, *untyped args, **untyped kwargs) ?{ () -> untyped } -> untyped
|
18
|
+
|
19
|
+
def run_after_callbacks: (untyped action, *untyped args, **untyped kwargs) -> void
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module PgEventstore
|
2
|
+
class Client
|
3
|
+
# _@param_ `config`
|
4
|
+
def initialize: (PgEventstore::Config config) -> void
|
5
|
+
|
6
|
+
# _@param_ `stream`
|
7
|
+
#
|
8
|
+
# _@param_ `events_or_event`
|
9
|
+
#
|
10
|
+
# _@param_ `options`
|
11
|
+
#
|
12
|
+
# _@param_ `middlewares` — provide a list of middleware names to override a config's middlewares
|
13
|
+
def append_to_stream: (
|
14
|
+
PgEventstore::Stream stream,
|
15
|
+
(PgEventstore::Event | ::Array[PgEventstore::Event]) events_or_event,
|
16
|
+
?options: ::Hash[untyped, untyped],
|
17
|
+
?middlewares: ::Array[untyped]?
|
18
|
+
) -> (PgEventstore::Event | ::Array[PgEventstore::Event])
|
19
|
+
|
20
|
+
def multiple: () { () -> untyped } -> untyped
|
21
|
+
|
22
|
+
# _@param_ `stream`
|
23
|
+
#
|
24
|
+
# _@param_ `options` — request options
|
25
|
+
#
|
26
|
+
# _@param_ `middlewares` — provide a list of middleware names to override a config's middlewares
|
27
|
+
def read: (PgEventstore::Stream stream, ?options: ::Hash[untyped, untyped], ?middlewares: ::Array[::Symbol]?) -> ::Array[PgEventstore::Event]
|
28
|
+
|
29
|
+
# _@param_ `stream`
|
30
|
+
#
|
31
|
+
# _@param_ `options` — request options
|
32
|
+
#
|
33
|
+
# _@param_ `middlewares`
|
34
|
+
#
|
35
|
+
# _@return_ — enumerator will yield PgEventstore::Event
|
36
|
+
def read_paginated: (PgEventstore::Stream stream, ?options: ::Hash[untyped, untyped], ?middlewares: ::Array[::Symbol]?) -> ::Enumerator[Array[PgEventstore::Event], void]
|
37
|
+
|
38
|
+
# _@param_ `stream`
|
39
|
+
#
|
40
|
+
# _@param_ `events_or_event`
|
41
|
+
#
|
42
|
+
# _@param_ `options`
|
43
|
+
#
|
44
|
+
# _@param_ `middlewares` — provide a list of middleware names to use. Defaults to empty array, meaning no middlewares will be applied to the "link" event
|
45
|
+
def link_to: (
|
46
|
+
PgEventstore::Stream stream,
|
47
|
+
(PgEventstore::Event | ::Array[PgEventstore::Event]) events_or_event,
|
48
|
+
?options: ::Hash[untyped, untyped],
|
49
|
+
?middlewares: ::Array[::Symbol]
|
50
|
+
) -> (PgEventstore::Event | ::Array[PgEventstore::Event])
|
51
|
+
|
52
|
+
# _@param_ `middlewares`
|
53
|
+
def middlewares: (?::Array[::Symbol]? middlewares) -> ::Array[PgEventstore::Middleware]
|
54
|
+
|
55
|
+
def connection: () -> PgEventstore::Connection
|
56
|
+
|
57
|
+
def partition_queries: () -> PgEventstore::PartitionQueries
|
58
|
+
|
59
|
+
def transaction_queries: () -> PgEventstore::TransactionQueries
|
60
|
+
|
61
|
+
# _@param_ `middlewares`
|
62
|
+
def event_queries: (::Array[PgEventstore::Middleware] middlewares) -> PgEventstore::EventQueries
|
63
|
+
|
64
|
+
# Returns the value of attribute config.
|
65
|
+
attr_accessor config: PgEventstore::Config
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module PgEventstore
|
2
|
+
module Commands
|
3
|
+
class Append < PgEventstore::AbstractCommand
|
4
|
+
# _@param_ `stream`
|
5
|
+
#
|
6
|
+
# _@param_ `events`
|
7
|
+
#
|
8
|
+
# _@param_ `options`
|
9
|
+
#
|
10
|
+
# _@param_ `event_modifier`
|
11
|
+
#
|
12
|
+
# _@return_ — persisted events
|
13
|
+
def call: (
|
14
|
+
PgEventstore::Stream stream,
|
15
|
+
*PgEventstore::Event events,
|
16
|
+
?options: ::Hash[untyped, untyped],
|
17
|
+
?event_modifier: _EventModifier
|
18
|
+
) -> ::Array[PgEventstore::Event]
|
19
|
+
|
20
|
+
# _@param_ `stream`
|
21
|
+
#
|
22
|
+
# _@param_ `events`
|
23
|
+
def create_partitions: (PgEventstore::Stream stream, ::Array[PgEventstore::Event] events) -> void
|
24
|
+
|
25
|
+
# _@param_ `revision`
|
26
|
+
#
|
27
|
+
# _@param_ `expected_revision`
|
28
|
+
#
|
29
|
+
# _@param_ `stream`
|
30
|
+
def assert_expected_revision!: (Integer revision, (Symbol | Integer) expected_revision, PgEventstore::Stream stream) -> void
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module PgEventstore
|
2
|
+
module Commands
|
3
|
+
module EventModifiers
|
4
|
+
class PrepareLinkEvent
|
5
|
+
# _@param_ `partition_queries`
|
6
|
+
def initialize: (PgEventstore::PartitionQueries partition_queries) -> void
|
7
|
+
|
8
|
+
# _@param_ `event`
|
9
|
+
#
|
10
|
+
# _@param_ `revision`
|
11
|
+
def call: (PgEventstore::Event event, Integer revision) -> PgEventstore::Event
|
12
|
+
|
13
|
+
# _@param_ `event` — persisted event
|
14
|
+
#
|
15
|
+
# _@return_ — partition id
|
16
|
+
def partition_id: (PgEventstore::Event event) -> Integer
|
17
|
+
|
18
|
+
attr_reader partition_queries: PgEventstore::PartitionQueries
|
19
|
+
|
20
|
+
attr_reader partitions: Hash[untyped, untyped]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|