wal 0.0.1 → 0.0.3

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.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -7
  3. data/lib/wal/noop_watcher.rb +0 -4
  4. data/lib/wal/record_watcher.rb +4 -58
  5. data/lib/wal/replicator.rb +2 -21
  6. data/lib/wal/streaming_watcher.rb +0 -9
  7. data/lib/wal/version.rb +1 -2
  8. data/lib/wal/watcher.rb +0 -25
  9. data/lib/wal.rb +9 -68
  10. data/rbi/wal.rbi +5 -85
  11. data/sig/wal.rbs +4 -4
  12. metadata +2 -161
  13. data/sorbet/config +0 -7
  14. data/sorbet/rbi/annotations/.gitattributes +0 -1
  15. data/sorbet/rbi/annotations/activemodel.rbi +0 -89
  16. data/sorbet/rbi/annotations/activerecord.rbi +0 -98
  17. data/sorbet/rbi/annotations/activesupport.rbi +0 -463
  18. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  19. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  20. data/sorbet/rbi/gems/.gitattributes +0 -1
  21. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +0 -9
  22. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +0 -9
  23. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +0 -9
  24. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +0 -21122
  25. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +0 -9
  26. data/sorbet/rbi/gems/actionview@8.0.2.rbi +0 -16423
  27. data/sorbet/rbi/gems/activejob@8.0.2.rbi +0 -9
  28. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +0 -6866
  29. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +0 -43227
  30. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +0 -9
  31. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +0 -21110
  32. data/sorbet/rbi/gems/ast@2.4.3.rbi +0 -585
  33. data/sorbet/rbi/gems/base64@0.3.0.rbi +0 -545
  34. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +0 -619
  35. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +0 -78
  36. data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
  37. data/sorbet/rbi/gems/commander@5.0.0.rbi +0 -9
  38. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +0 -11657
  39. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +0 -9
  40. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
  41. data/sorbet/rbi/gems/date@3.4.1.rbi +0 -75
  42. data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +0 -1134
  43. data/sorbet/rbi/gems/docker-api@2.4.0.rbi +0 -1719
  44. data/sorbet/rbi/gems/docopt@0.6.1.rbi +0 -9
  45. data/sorbet/rbi/gems/drb@2.2.3.rbi +0 -1661
  46. data/sorbet/rbi/gems/erubi@1.13.1.rbi +0 -155
  47. data/sorbet/rbi/gems/excon@1.2.7.rbi +0 -1514
  48. data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
  49. data/sorbet/rbi/gems/highline@3.0.1.rbi +0 -9
  50. data/sorbet/rbi/gems/i18n@1.14.7.rbi +0 -2359
  51. data/sorbet/rbi/gems/io-console@0.8.0.rbi +0 -9
  52. data/sorbet/rbi/gems/logger@1.7.0.rbi +0 -963
  53. data/sorbet/rbi/gems/loofah@2.24.1.rbi +0 -1105
  54. data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
  55. data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
  56. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
  57. data/sorbet/rbi/gems/minitest@5.25.5.rbi +0 -1704
  58. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  59. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +0 -9
  60. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
  61. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
  62. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +0 -9
  63. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  64. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
  65. data/sorbet/rbi/gems/nokogiri@1.18.8.rbi +0 -8206
  66. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +0 -354
  67. data/sorbet/rbi/gems/parallel@1.27.0.rbi +0 -291
  68. data/sorbet/rbi/gems/parlour@9.1.1.rbi +0 -3071
  69. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +0 -7338
  70. data/sorbet/rbi/gems/pg-replication-protocol@0.0.7.rbi +0 -633
  71. data/sorbet/rbi/gems/pg@1.5.9.rbi +0 -2806
  72. data/sorbet/rbi/gems/pp@0.6.2.rbi +0 -368
  73. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +0 -477
  74. data/sorbet/rbi/gems/prism@1.4.0.rbi +0 -41732
  75. data/sorbet/rbi/gems/psych@5.2.3.rbi +0 -2435
  76. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -160
  77. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +0 -727
  78. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +0 -734
  79. data/sorbet/rbi/gems/rack@3.1.16.rbi +0 -4940
  80. data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
  81. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +0 -858
  82. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -785
  83. data/sorbet/rbi/gems/rails@8.0.2.rbi +0 -9
  84. data/sorbet/rbi/gems/railties@8.0.2.rbi +0 -3865
  85. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  86. data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3120
  87. data/sorbet/rbi/gems/rbi@0.3.6.rbi +0 -6893
  88. data/sorbet/rbi/gems/rbs@3.9.4.rbi +0 -6978
  89. data/sorbet/rbi/gems/rdoc@6.12.0.rbi +0 -12760
  90. data/sorbet/rbi/gems/reline@0.6.0.rbi +0 -2451
  91. data/sorbet/rbi/gems/rexml@3.4.1.rbi +0 -5240
  92. data/sorbet/rbi/gems/rspec-core@3.13.4.rbi +0 -11348
  93. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +0 -8189
  94. data/sorbet/rbi/gems/rspec-mocks@3.13.5.rbi +0 -5350
  95. data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +0 -164
  96. data/sorbet/rbi/gems/rspec-support@3.13.4.rbi +0 -1630
  97. data/sorbet/rbi/gems/rspec@3.13.1.rbi +0 -83
  98. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +0 -75
  99. data/sorbet/rbi/gems/spoom@1.6.3.rbi +0 -6985
  100. data/sorbet/rbi/gems/stringio@3.1.5.rbi +0 -9
  101. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +0 -3628
  102. data/sorbet/rbi/gems/testcontainers-core@0.2.0.rbi +0 -1005
  103. data/sorbet/rbi/gems/testcontainers-postgres@0.2.0.rbi +0 -145
  104. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  105. data/sorbet/rbi/gems/timeout@0.4.3.rbi +0 -157
  106. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  107. data/sorbet/rbi/gems/uri@1.0.3.rbi +0 -2349
  108. data/sorbet/rbi/gems/useragent@0.16.11.rbi +0 -9
  109. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +0 -9
  110. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
  111. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  112. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18379
  113. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +0 -9
  114. data/sorbet/tapioca/config.yml +0 -5
  115. data/sorbet/tapioca/require.rb +0 -12
@@ -1,2806 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `pg` gem.
5
- # Please instead update this file by running `bin/tapioca gem pg`.
6
-
7
-
8
- # The top-level PG namespace.
9
- #
10
- # source://pg//lib/pg.rb#6
11
- module PG
12
- include ::PG::Constants
13
-
14
- class << self
15
- # Convenience alias for PG::Connection.new.
16
- #
17
- # source://pg//lib/pg.rb#62
18
- def connect(*args, &block); end
19
-
20
- def init_openssl(_arg0, _arg1); end
21
- def init_ssl(_arg0); end
22
- def is_threadsafe?; end
23
- def isthreadsafe; end
24
- def library_version; end
25
-
26
- # source://pg//lib/pg.rb#67
27
- def make_shareable(obj); end
28
-
29
- # Ruby-3.4+ prints a warning, if bigdecimal is required but not in the Gemfile.
30
- # But it's a false positive, since we enable bigdecimal depending features only if it's available.
31
- # And most people don't need these features.
32
- #
33
- # source://pg//lib/pg.rb#132
34
- def require_bigdecimal_without_warning; end
35
-
36
- def threadsafe?; end
37
-
38
- # Get the PG library version.
39
- #
40
- # +include_buildnum+ is no longer used and any value passed will be ignored.
41
- #
42
- # source://pg//lib/pg.rb#56
43
- def version_string(include_buildnum = T.unsafe(nil)); end
44
- end
45
- end
46
-
47
- class PG::ActiveSqlTransaction < ::PG::InvalidTransactionState; end
48
- class PG::AdminShutdown < ::PG::OperatorIntervention; end
49
- class PG::AmbiguousAlias < ::PG::SyntaxErrorOrAccessRuleViolation; end
50
- class PG::AmbiguousColumn < ::PG::SyntaxErrorOrAccessRuleViolation; end
51
- class PG::AmbiguousFunction < ::PG::SyntaxErrorOrAccessRuleViolation; end
52
- class PG::AmbiguousParameter < ::PG::SyntaxErrorOrAccessRuleViolation; end
53
- class PG::ArraySubscriptError < ::PG::DataException; end
54
- class PG::AssertFailure < ::PG::PlpgsqlError; end
55
- class PG::BadCopyFileFormat < ::PG::DataException; end
56
-
57
- # Simple set of rules for type casting common PostgreSQL types from Ruby
58
- # to PostgreSQL.
59
- #
60
- # OIDs of supported type casts are not hard-coded in the sources, but are retrieved from the
61
- # PostgreSQL's +pg_type+ table in PG::BasicTypeMapBasedOnResult.new .
62
- #
63
- # This class works equal to PG::BasicTypeMapForResults, but does not define decoders for
64
- # the given result OIDs, but encoders. So it can be used to type cast field values based on
65
- # the type OID retrieved by a separate SQL query.
66
- #
67
- # PG::TypeMapByOid#build_column_map(result) can be used to generate a result independent
68
- # PG::TypeMapByColumn type map, which can subsequently be used to cast query bind parameters
69
- # or #put_copy_data fields.
70
- #
71
- # Example:
72
- # conn.exec( "CREATE TEMP TABLE copytable (t TEXT, i INT, ai INT[])" )
73
- #
74
- # # Retrieve table OIDs per empty result set.
75
- # res = conn.exec( "SELECT * FROM copytable LIMIT 0" )
76
- # # Build a type map for common ruby to database type encoders.
77
- # btm = PG::BasicTypeMapBasedOnResult.new(conn)
78
- # # Build a PG::TypeMapByColumn with encoders suitable for copytable.
79
- # tm = btm.build_column_map( res )
80
- # row_encoder = PG::TextEncoder::CopyRow.new type_map: tm
81
- #
82
- # conn.copy_data( "COPY copytable FROM STDIN", row_encoder ) do |res|
83
- # conn.put_copy_data ['a', 123, [5,4,3]]
84
- # end
85
- # This inserts a single row into copytable with type casts from ruby to
86
- # database types using text format.
87
- #
88
- # Very similar with binary format:
89
- #
90
- # conn.exec( "CREATE TEMP TABLE copytable (t TEXT, i INT, blob bytea, created_at timestamp)" )
91
- # # Retrieve table OIDs per empty result set in binary format.
92
- # res = conn.exec_params( "SELECT * FROM copytable LIMIT 0", [], 1 )
93
- # # Build a type map for common ruby to database type encoders.
94
- # btm = PG::BasicTypeMapBasedOnResult.new(conn)
95
- # # Build a PG::TypeMapByColumn with encoders suitable for copytable.
96
- # tm = btm.build_column_map( res )
97
- # row_encoder = PG::BinaryEncoder::CopyRow.new type_map: tm
98
- #
99
- # conn.copy_data( "COPY copytable FROM STDIN WITH (FORMAT binary)", row_encoder ) do |res|
100
- # conn.put_copy_data ['a', 123, "\xff\x00".b, Time.now]
101
- # end
102
- #
103
- # This inserts a single row into copytable with type casts from ruby to
104
- # database types using binary copy and value format.
105
- # Binary COPY is faster than text format but less portable and less readable and pg offers fewer en-/decoders of database types.
106
- #
107
- # source://pg//lib/pg/basic_type_map_based_on_result.rb#56
108
- class PG::BasicTypeMapBasedOnResult < ::PG::TypeMapByOid
109
- include ::PG::BasicTypeRegistry::Checker
110
-
111
- # @return [BasicTypeMapBasedOnResult] a new instance of BasicTypeMapBasedOnResult
112
- #
113
- # source://pg//lib/pg/basic_type_map_based_on_result.rb#59
114
- def initialize(connection_or_coder_maps, registry: T.unsafe(nil)); end
115
- end
116
-
117
- # Simple set of rules for type casting common Ruby types to PostgreSQL.
118
- #
119
- # OIDs of supported type casts are not hard-coded in the sources, but are retrieved from the
120
- # PostgreSQL's pg_type table in PG::BasicTypeMapForQueries.new .
121
- #
122
- # Query params are type casted based on the class of the given value.
123
- #
124
- # Higher level libraries will most likely not make use of this class, but use their
125
- # own derivation of PG::TypeMapByClass or another set of rules to choose suitable
126
- # encoders and decoders for the values to be sent.
127
- #
128
- # Example:
129
- # conn = PG::Connection.new
130
- # # Assign a default ruleset for type casts of input and output values.
131
- # conn.type_map_for_queries = PG::BasicTypeMapForQueries.new(conn)
132
- # # Execute a query. The Integer param value is typecasted internally by PG::BinaryEncoder::Int8.
133
- # # The format of the parameter is set to 0 (text) and the OID of this parameter is set to 20 (int8).
134
- # res = conn.exec_params( "SELECT $1", [5] )
135
- #
136
- # source://pg//lib/pg/basic_type_map_for_queries.rb#24
137
- class PG::BasicTypeMapForQueries < ::PG::TypeMapByClass
138
- include ::PG::BasicTypeRegistry::Checker
139
-
140
- # Create a new type map for query submission
141
- #
142
- # Options:
143
- # * +registry+: Custom type registry, nil for default global registry
144
- # * +if_undefined+: Optional +Proc+ object which is called, if no type for an parameter class is not defined in the registry.
145
- # The +Proc+ object is called with the name and format of the missing type.
146
- # Its return value is not used.
147
- #
148
- # @return [BasicTypeMapForQueries] a new instance of BasicTypeMapForQueries
149
- #
150
- # source://pg//lib/pg/basic_type_map_for_queries.rb#52
151
- def initialize(connection_or_coder_maps, registry: T.unsafe(nil), if_undefined: T.unsafe(nil)); end
152
-
153
- # Returns the value of attribute encode_array_as.
154
- #
155
- # source://pg//lib/pg/basic_type_map_for_queries.rb#90
156
- def encode_array_as; end
157
-
158
- # Change the mechanism that is used to encode ruby array values
159
- #
160
- # Possible values:
161
- # * +:array+ : Encode the ruby array as a PostgreSQL array.
162
- # The array element type is inferred from the class of the first array element. This is the default.
163
- # * +:json+ : Encode the ruby array as a JSON document.
164
- # * +:record+ : Encode the ruby array as a composite type row.
165
- # * <code>"_type"</code> : Encode the ruby array as a particular PostgreSQL type.
166
- # All PostgreSQL array types are supported.
167
- # If there's an encoder registered for the elements +type+, it will be used.
168
- # Otherwise a string conversion (by +value.to_s+) is done.
169
- #
170
- # source://pg//lib/pg/basic_type_map_for_queries.rb#75
171
- def encode_array_as=(pg_type); end
172
-
173
- private
174
-
175
- # source://pg//lib/pg/basic_type_map_for_queries.rb#152
176
- def array_encoders_by_klass; end
177
-
178
- # source://pg//lib/pg/basic_type_map_for_queries.rb#100
179
- def coder_by_name(format, direction, name); end
180
-
181
- # source://pg//lib/pg/basic_type_map_for_queries.rb#159
182
- def get_array_type(value); end
183
-
184
- # source://pg//lib/pg/basic_type_map_for_queries.rb#94
185
- def init_encoders; end
186
-
187
- # source://pg//lib/pg/basic_type_map_for_queries.rb#109
188
- def populate_encoder_list; end
189
-
190
- # @raise [UndefinedEncoder]
191
- #
192
- # source://pg//lib/pg/basic_type_map_for_queries.rb#60
193
- def raise_undefined_type(oid_name, format); end
194
-
195
- # source://pg//lib/pg/basic_type_map_for_queries.rb#105
196
- def undefined(name, format); end
197
- end
198
-
199
- # Helper class for submission of binary strings into bytea columns.
200
- #
201
- # Since PG::BasicTypeMapForQueries chooses the encoder to be used by the class of the submitted value,
202
- # it's necessary to send binary strings as BinaryData.
203
- # That way they're distinct from text strings.
204
- # Please note however that PG::BasicTypeMapForResults delivers bytea columns as plain String
205
- # with binary encoding.
206
- #
207
- # conn.type_map_for_queries = PG::BasicTypeMapForQueries.new(conn)
208
- # conn.exec("CREATE TEMP TABLE test (data bytea)")
209
- # bd = PG::BasicTypeMapForQueries::BinaryData.new("ab\xff\0cd")
210
- # conn.exec_params("INSERT INTO test (data) VALUES ($1)", [bd])
211
- #
212
- # source://pg//lib/pg/basic_type_map_for_queries.rb#37
213
- class PG::BasicTypeMapForQueries::BinaryData < ::String; end
214
-
215
- # source://pg//lib/pg/basic_type_map_for_queries.rb#192
216
- PG::BasicTypeMapForQueries::DEFAULT_ARRAY_TYPE_MAP = T.let(T.unsafe(nil), Hash)
217
-
218
- # source://pg//lib/pg/basic_type_map_for_queries.rb#175
219
- PG::BasicTypeMapForQueries::DEFAULT_TYPE_MAP = T.let(T.unsafe(nil), Hash)
220
-
221
- # source://pg//lib/pg/basic_type_map_for_queries.rb#40
222
- class PG::BasicTypeMapForQueries::UndefinedEncoder < ::RuntimeError; end
223
-
224
- # Simple set of rules for type casting common PostgreSQL types to Ruby.
225
- #
226
- # OIDs of supported type casts are not hard-coded in the sources, but are retrieved from the
227
- # PostgreSQL's +pg_type+ table in PG::BasicTypeMapForResults.new .
228
- #
229
- # Result values are type casted based on the type OID of the given result column.
230
- #
231
- # Higher level libraries will most likely not make use of this class, but use their
232
- # own set of rules to choose suitable encoders and decoders.
233
- #
234
- # Example:
235
- # conn = PG::Connection.new
236
- # # Assign a default ruleset for type casts of output values.
237
- # conn.type_map_for_results = PG::BasicTypeMapForResults.new(conn)
238
- # # Execute a query.
239
- # res = conn.exec_params( "SELECT $1::INT", ['5'] )
240
- # # Retrieve and cast the result value. Value format is 0 (text) and OID is 20. Therefore typecasting
241
- # # is done by PG::TextDecoder::Integer internally for all value retrieval methods.
242
- # res.values # => [[5]]
243
- #
244
- # PG::TypeMapByOid#build_column_map(result) can be used to generate
245
- # a result independent PG::TypeMapByColumn type map, which can subsequently be used
246
- # to cast #get_copy_data fields:
247
- #
248
- # For the following table:
249
- # conn.exec( "CREATE TABLE copytable AS VALUES('a', 123, '{5,4,3}'::INT[])" )
250
- #
251
- # # Retrieve table OIDs per empty result set.
252
- # res = conn.exec( "SELECT * FROM copytable LIMIT 0" )
253
- # # Build a type map for common database to ruby type decoders.
254
- # btm = PG::BasicTypeMapForResults.new(conn)
255
- # # Build a PG::TypeMapByColumn with decoders suitable for copytable.
256
- # tm = btm.build_column_map( res )
257
- # row_decoder = PG::TextDecoder::CopyRow.new type_map: tm
258
- #
259
- # conn.copy_data( "COPY copytable TO STDOUT", row_decoder ) do |res|
260
- # while row=conn.get_copy_data
261
- # p row
262
- # end
263
- # end
264
- # This prints the rows with type casted columns:
265
- # ["a", 123, [5, 4, 3]]
266
- #
267
- # Very similar with binary format:
268
- #
269
- # conn.exec( "CREATE TABLE copytable AS VALUES('a', 123, '2023-03-19 18:39:44'::TIMESTAMP)" )
270
- #
271
- # # Retrieve table OIDs per empty result set in binary format.
272
- # res = conn.exec_params( "SELECT * FROM copytable LIMIT 0", [], 1 )
273
- # # Build a type map for common database to ruby type decoders.
274
- # btm = PG::BasicTypeMapForResults.new(conn)
275
- # # Build a PG::TypeMapByColumn with decoders suitable for copytable.
276
- # tm = btm.build_column_map( res )
277
- # row_decoder = PG::BinaryDecoder::CopyRow.new type_map: tm
278
- #
279
- # conn.copy_data( "COPY copytable TO STDOUT WITH (FORMAT binary)", row_decoder ) do |res|
280
- # while row=conn.get_copy_data
281
- # p row
282
- # end
283
- # end
284
- # This prints the rows with type casted columns:
285
- # ["a", 123, 2023-03-19 18:39:44 UTC]
286
- #
287
- # See also PG::BasicTypeMapBasedOnResult for the encoder direction and PG::BasicTypeRegistry for the definition of additional types.
288
- #
289
- # source://pg//lib/pg/basic_type_map_for_results.rb#70
290
- class PG::BasicTypeMapForResults < ::PG::TypeMapByOid
291
- include ::PG::BasicTypeRegistry::Checker
292
-
293
- # @return [BasicTypeMapForResults] a new instance of BasicTypeMapForResults
294
- #
295
- # source://pg//lib/pg/basic_type_map_for_results.rb#93
296
- def initialize(connection_or_coder_maps, registry: T.unsafe(nil)); end
297
- end
298
-
299
- # source://pg//lib/pg/basic_type_map_for_results.rb#73
300
- class PG::BasicTypeMapForResults::WarningTypeMap < ::PG::TypeMapInRuby
301
- # @return [WarningTypeMap] a new instance of WarningTypeMap
302
- #
303
- # source://pg//lib/pg/basic_type_map_for_results.rb#74
304
- def initialize(typenames); end
305
-
306
- # source://pg//lib/pg/basic_type_map_for_results.rb#79
307
- def typecast_result_value(result, _tuple, field); end
308
- end
309
-
310
- # This class defines the mapping between PostgreSQL types and encoder/decoder classes for PG::BasicTypeMapForResults, PG::BasicTypeMapForQueries and PG::BasicTypeMapBasedOnResult.
311
- #
312
- # Additional types can be added like so:
313
- #
314
- # require 'pg'
315
- # require 'ipaddr'
316
- #
317
- # class InetDecoder < PG::SimpleDecoder
318
- # def decode(string, tuple=nil, field=nil)
319
- # IPAddr.new(string)
320
- # end
321
- # end
322
- # class InetEncoder < PG::SimpleEncoder
323
- # def encode(ip_addr)
324
- # ip_addr.to_s
325
- # end
326
- # end
327
- #
328
- # conn = PG.connect
329
- # regi = PG::BasicTypeRegistry.new.register_default_types
330
- # regi.register_type(0, 'inet', InetEncoder, InetDecoder)
331
- # conn.type_map_for_results = PG::BasicTypeMapForResults.new(conn, registry: regi)
332
- #
333
- # source://pg//lib/pg/basic_type_registry.rb#28
334
- class PG::BasicTypeRegistry
335
- include ::PG::BasicTypeRegistry::Checker
336
-
337
- # @return [BasicTypeRegistry] a new instance of BasicTypeRegistry
338
- #
339
- # source://pg//lib/pg/basic_type_registry.rb#173
340
- def initialize; end
341
-
342
- # Alias the +old+ type to the +new+ type.
343
- #
344
- # source://pg//lib/pg/basic_type_registry.rb#216
345
- def alias_type(format, new, old); end
346
-
347
- # Retrieve a Hash of all en- or decoders for a given wire format.
348
- # The hash key is the name as defined in table +pg_type+.
349
- # The hash value is the registered coder object.
350
- #
351
- # source://pg//lib/pg/basic_type_registry.rb#188
352
- def coders_for(format, direction); end
353
-
354
- # Populate the registry with all builtin types of ruby-pg
355
- #
356
- # source://pg//lib/pg/basic_type_registry.rb#229
357
- def define_default_types; end
358
-
359
- # Register an encoder or decoder instance for casting a PostgreSQL type.
360
- #
361
- # Coder#name must correspond to the +typname+ column in the +pg_type+ table.
362
- # Coder#format can be 0 for text format and 1 for binary.
363
- #
364
- # source://pg//lib/pg/basic_type_registry.rb#197
365
- def register_coder(coder); end
366
-
367
- # Populate the registry with all builtin types of ruby-pg
368
- #
369
- # source://pg//lib/pg/basic_type_registry.rb#229
370
- def register_default_types; end
371
-
372
- # Register the given +encoder_class+ and/or +decoder_class+ for casting a PostgreSQL type.
373
- #
374
- # +name+ must correspond to the +typname+ column in the +pg_type+ table.
375
- # +format+ can be 0 for text format and 1 for binary.
376
- #
377
- # source://pg//lib/pg/basic_type_registry.rb#209
378
- def register_type(format, name, encoder_class, decoder_class); end
379
- end
380
-
381
- # source://pg//lib/pg/basic_type_registry.rb#151
382
- module PG::BasicTypeRegistry::Checker
383
- protected
384
-
385
- # source://pg//lib/pg/basic_type_registry.rb#161
386
- def build_coder_maps(conn_or_maps, registry: T.unsafe(nil)); end
387
-
388
- # @raise [ArgumentError]
389
- #
390
- # source://pg//lib/pg/basic_type_registry.rb#156
391
- def check_format_and_direction(format, direction); end
392
- end
393
-
394
- # source://pg//lib/pg/basic_type_registry.rb#153
395
- PG::BasicTypeRegistry::Checker::ValidDirections = T.let(T.unsafe(nil), Hash)
396
-
397
- # source://pg//lib/pg/basic_type_registry.rb#152
398
- PG::BasicTypeRegistry::Checker::ValidFormats = T.let(T.unsafe(nil), Hash)
399
-
400
- # An instance of this class stores the coders that should be used for a particular wire format (text or binary)
401
- # and type cast direction (encoder or decoder).
402
- #
403
- # Each coder object is filled with the PostgreSQL type name, OID, wire format and array coders are filled with the base elements_type.
404
- #
405
- # source://pg//lib/pg/basic_type_registry.rb#33
406
- class PG::BasicTypeRegistry::CoderMap
407
- # @return [CoderMap] a new instance of CoderMap
408
- #
409
- # source://pg//lib/pg/basic_type_registry.rb#45
410
- def initialize(result, coders_by_name, format, arraycoder); end
411
-
412
- # source://pg//lib/pg/basic_type_registry.rb#85
413
- def coder_by_name(name); end
414
-
415
- # source://pg//lib/pg/basic_type_registry.rb#89
416
- def coder_by_oid(oid); end
417
-
418
- # Returns the value of attribute coders.
419
- #
420
- # source://pg//lib/pg/basic_type_registry.rb#81
421
- def coders; end
422
-
423
- # Returns the value of attribute coders_by_name.
424
- #
425
- # source://pg//lib/pg/basic_type_registry.rb#83
426
- def coders_by_name; end
427
-
428
- # Returns the value of attribute coders_by_oid.
429
- #
430
- # source://pg//lib/pg/basic_type_registry.rb#82
431
- def coders_by_oid; end
432
- end
433
-
434
- # Hash of text types that don't require quotation, when used within composite types.
435
- # type.name => true
436
- #
437
- # source://pg//lib/pg/basic_type_registry.rb#36
438
- PG::BasicTypeRegistry::CoderMap::DONT_QUOTE_TYPES = T.let(T.unsafe(nil), Hash)
439
-
440
- # An instance of this class stores CoderMap instances to be used for text and binary wire formats
441
- # as well as encoder and decoder directions.
442
- #
443
- # A PG::BasicTypeRegistry::CoderMapsBundle instance retrieves all type definitions from the PostgreSQL server and matches them with the coder definitions of the global PG::BasicTypeRegistry .
444
- # It provides 4 separate CoderMap instances for the combinations of the two formats and directions.
445
- #
446
- # A PG::BasicTypeRegistry::CoderMapsBundle instance can be used to initialize an instance of
447
- # * PG::BasicTypeMapForResults
448
- # * PG::BasicTypeMapForQueries
449
- # * PG::BasicTypeMapBasedOnResult
450
- # by passing it instead of the connection object like so:
451
- #
452
- # conn = PG::Connection.new
453
- # maps = PG::BasicTypeRegistry::CoderMapsBundle.new(conn)
454
- # conn.type_map_for_results = PG::BasicTypeMapForResults.new(maps)
455
- #
456
- # source://pg//lib/pg/basic_type_registry.rb#110
457
- class PG::BasicTypeRegistry::CoderMapsBundle
458
- # @return [CoderMapsBundle] a new instance of CoderMapsBundle
459
- #
460
- # source://pg//lib/pg/basic_type_registry.rb#113
461
- def initialize(connection, registry: T.unsafe(nil)); end
462
-
463
- # source://pg//lib/pg/basic_type_registry.rb#142
464
- def each_format(direction); end
465
-
466
- # source://pg//lib/pg/basic_type_registry.rb#146
467
- def map_for(format, direction); end
468
-
469
- # Returns the value of attribute typenames_by_oid.
470
- #
471
- # source://pg//lib/pg/basic_type_registry.rb#111
472
- def typenames_by_oid; end
473
-
474
- private
475
-
476
- # source://pg//lib/pg/basic_type_registry.rb#126
477
- def init_maps(registry, result); end
478
- end
479
-
480
- # source://pg//lib/pg/basic_type_registry.rb#309
481
- PG::BasicTypeRegistry::DEFAULT_TYPE_REGISTRY = T.let(T.unsafe(nil), PG::BasicTypeRegistry)
482
-
483
- # source://pg//lib/pg.rb#76
484
- module PG::BinaryDecoder
485
- class << self
486
- private
487
-
488
- def init_date; end
489
- end
490
- end
491
-
492
- class PG::BinaryDecoder::Boolean < ::PG::SimpleDecoder
493
- include ::PG::Coder::BinaryFormatting
494
-
495
- def decode(*_arg0); end
496
- end
497
-
498
- PG::BinaryDecoder::Boolean::CFUNC = T.let(T.unsafe(nil), Object)
499
-
500
- class PG::BinaryDecoder::Bytea < ::PG::SimpleDecoder
501
- include ::PG::Coder::BinaryFormatting
502
-
503
- def decode(*_arg0); end
504
- end
505
-
506
- PG::BinaryDecoder::Bytea::CFUNC = T.let(T.unsafe(nil), Object)
507
-
508
- class PG::BinaryDecoder::CopyRow < ::PG::CopyDecoder
509
- include ::PG::Coder::BinaryFormatting
510
-
511
- def decode(*_arg0); end
512
- end
513
-
514
- PG::BinaryDecoder::CopyRow::CFUNC = T.let(T.unsafe(nil), Object)
515
-
516
- class PG::BinaryDecoder::Date < ::PG::SimpleDecoder
517
- include ::PG::Coder::BinaryFormatting
518
-
519
- def decode(*_arg0); end
520
- end
521
-
522
- # source://pg//lib/pg/binary_decoder/date.rb#7
523
- PG::BinaryDecoder::Date::CFUNC = T.let(T.unsafe(nil), Object)
524
-
525
- class PG::BinaryDecoder::Float < ::PG::SimpleDecoder
526
- include ::PG::Coder::BinaryFormatting
527
-
528
- def decode(*_arg0); end
529
- end
530
-
531
- PG::BinaryDecoder::Float::CFUNC = T.let(T.unsafe(nil), Object)
532
-
533
- class PG::BinaryDecoder::Integer < ::PG::SimpleDecoder
534
- include ::PG::Coder::BinaryFormatting
535
-
536
- def decode(*_arg0); end
537
- end
538
-
539
- PG::BinaryDecoder::Integer::CFUNC = T.let(T.unsafe(nil), Object)
540
-
541
- class PG::BinaryDecoder::String < ::PG::SimpleDecoder
542
- include ::PG::Coder::BinaryFormatting
543
-
544
- def decode(*_arg0); end
545
- end
546
-
547
- PG::BinaryDecoder::String::CFUNC = T.let(T.unsafe(nil), Object)
548
-
549
- class PG::BinaryDecoder::Timestamp < ::PG::SimpleDecoder
550
- include ::PG::Coder::BinaryFormatting
551
-
552
- def decode(*_arg0); end
553
- end
554
-
555
- PG::BinaryDecoder::Timestamp::CFUNC = T.let(T.unsafe(nil), Object)
556
-
557
- # source://pg//lib/pg/binary_decoder/timestamp.rb#19
558
- class PG::BinaryDecoder::TimestampLocal < ::PG::BinaryDecoder::Timestamp
559
- # @return [TimestampLocal] a new instance of TimestampLocal
560
- #
561
- # source://pg//lib/pg/binary_decoder/timestamp.rb#20
562
- def initialize(hash = T.unsafe(nil), **kwargs); end
563
- end
564
-
565
- # Convenience classes for timezone options
566
- #
567
- # source://pg//lib/pg/binary_decoder/timestamp.rb#7
568
- class PG::BinaryDecoder::TimestampUtc < ::PG::BinaryDecoder::Timestamp
569
- # @return [TimestampUtc] a new instance of TimestampUtc
570
- #
571
- # source://pg//lib/pg/binary_decoder/timestamp.rb#8
572
- def initialize(hash = T.unsafe(nil), **kwargs); end
573
- end
574
-
575
- # source://pg//lib/pg/binary_decoder/timestamp.rb#13
576
- class PG::BinaryDecoder::TimestampUtcToLocal < ::PG::BinaryDecoder::Timestamp
577
- # @return [TimestampUtcToLocal] a new instance of TimestampUtcToLocal
578
- #
579
- # source://pg//lib/pg/binary_decoder/timestamp.rb#14
580
- def initialize(hash = T.unsafe(nil), **kwargs); end
581
- end
582
-
583
- class PG::BinaryDecoder::ToBase64 < ::PG::CompositeDecoder
584
- include ::PG::Coder::BinaryFormatting
585
-
586
- def decode(*_arg0); end
587
- end
588
-
589
- PG::BinaryDecoder::ToBase64::CFUNC = T.let(T.unsafe(nil), Object)
590
-
591
- # source://pg//lib/pg.rb#82
592
- module PG::BinaryEncoder; end
593
-
594
- class PG::BinaryEncoder::Boolean < ::PG::SimpleEncoder
595
- include ::PG::Coder::BinaryFormatting
596
-
597
- def encode(*_arg0); end
598
- end
599
-
600
- PG::BinaryEncoder::Boolean::CFUNC = T.let(T.unsafe(nil), Object)
601
-
602
- class PG::BinaryEncoder::Bytea < ::PG::SimpleEncoder
603
- include ::PG::Coder::BinaryFormatting
604
-
605
- def encode(*_arg0); end
606
- end
607
-
608
- PG::BinaryEncoder::Bytea::CFUNC = T.let(T.unsafe(nil), Object)
609
-
610
- class PG::BinaryEncoder::CopyRow < ::PG::CopyEncoder
611
- include ::PG::Coder::BinaryFormatting
612
-
613
- def encode(*_arg0); end
614
- end
615
-
616
- PG::BinaryEncoder::CopyRow::CFUNC = T.let(T.unsafe(nil), Object)
617
-
618
- class PG::BinaryEncoder::Date < ::PG::SimpleEncoder
619
- include ::PG::Coder::BinaryFormatting
620
-
621
- def encode(*_arg0); end
622
- end
623
-
624
- PG::BinaryEncoder::Date::CFUNC = T.let(T.unsafe(nil), Object)
625
-
626
- class PG::BinaryEncoder::Float4 < ::PG::SimpleEncoder
627
- include ::PG::Coder::BinaryFormatting
628
-
629
- def encode(*_arg0); end
630
- end
631
-
632
- PG::BinaryEncoder::Float4::CFUNC = T.let(T.unsafe(nil), Object)
633
-
634
- class PG::BinaryEncoder::Float8 < ::PG::SimpleEncoder
635
- include ::PG::Coder::BinaryFormatting
636
-
637
- def encode(*_arg0); end
638
- end
639
-
640
- PG::BinaryEncoder::Float8::CFUNC = T.let(T.unsafe(nil), Object)
641
-
642
- class PG::BinaryEncoder::FromBase64 < ::PG::CompositeEncoder
643
- include ::PG::Coder::BinaryFormatting
644
-
645
- def encode(*_arg0); end
646
- end
647
-
648
- PG::BinaryEncoder::FromBase64::CFUNC = T.let(T.unsafe(nil), Object)
649
-
650
- class PG::BinaryEncoder::Int2 < ::PG::SimpleEncoder
651
- include ::PG::Coder::BinaryFormatting
652
-
653
- def encode(*_arg0); end
654
- end
655
-
656
- PG::BinaryEncoder::Int2::CFUNC = T.let(T.unsafe(nil), Object)
657
-
658
- class PG::BinaryEncoder::Int4 < ::PG::SimpleEncoder
659
- include ::PG::Coder::BinaryFormatting
660
-
661
- def encode(*_arg0); end
662
- end
663
-
664
- PG::BinaryEncoder::Int4::CFUNC = T.let(T.unsafe(nil), Object)
665
-
666
- class PG::BinaryEncoder::Int8 < ::PG::SimpleEncoder
667
- include ::PG::Coder::BinaryFormatting
668
-
669
- def encode(*_arg0); end
670
- end
671
-
672
- PG::BinaryEncoder::Int8::CFUNC = T.let(T.unsafe(nil), Object)
673
-
674
- class PG::BinaryEncoder::String < ::PG::SimpleEncoder
675
- include ::PG::Coder::BinaryFormatting
676
-
677
- def encode(*_arg0); end
678
- end
679
-
680
- PG::BinaryEncoder::String::CFUNC = T.let(T.unsafe(nil), Object)
681
-
682
- class PG::BinaryEncoder::Timestamp < ::PG::SimpleEncoder
683
- include ::PG::Coder::BinaryFormatting
684
-
685
- def encode(*_arg0); end
686
- end
687
-
688
- PG::BinaryEncoder::Timestamp::CFUNC = T.let(T.unsafe(nil), Object)
689
-
690
- # source://pg//lib/pg/binary_encoder/timestamp.rb#13
691
- class PG::BinaryEncoder::TimestampLocal < ::PG::BinaryEncoder::Timestamp
692
- # @return [TimestampLocal] a new instance of TimestampLocal
693
- #
694
- # source://pg//lib/pg/binary_encoder/timestamp.rb#14
695
- def initialize(hash = T.unsafe(nil), **kwargs); end
696
- end
697
-
698
- # Convenience classes for timezone options
699
- #
700
- # source://pg//lib/pg/binary_encoder/timestamp.rb#7
701
- class PG::BinaryEncoder::TimestampUtc < ::PG::BinaryEncoder::Timestamp
702
- # @return [TimestampUtc] a new instance of TimestampUtc
703
- #
704
- # source://pg//lib/pg/binary_encoder/timestamp.rb#8
705
- def initialize(hash = T.unsafe(nil), **kwargs); end
706
- end
707
-
708
- class PG::BranchTransactionAlreadyActive < ::PG::InvalidTransactionState; end
709
- class PG::CannotCoerce < ::PG::SyntaxErrorOrAccessRuleViolation; end
710
- class PG::CannotConnectNow < ::PG::OperatorIntervention; end
711
- class PG::CantChangeRuntimeParam < ::PG::ObjectNotInPrerequisiteState; end
712
- class PG::CardinalityViolation < ::PG::ServerError; end
713
- class PG::CaseNotFound < ::PG::ServerError; end
714
- class PG::CharacterNotInRepertoire < ::PG::DataException; end
715
- class PG::CheckViolation < ::PG::IntegrityConstraintViolation; end
716
-
717
- # source://pg//lib/pg/coder.rb#6
718
- class PG::Coder
719
- # Create a new coder object based on the attribute Hash.
720
- #
721
- # @return [Coder] a new instance of Coder
722
- #
723
- # source://pg//lib/pg/coder.rb#17
724
- def initialize(hash = T.unsafe(nil), **kwargs); end
725
-
726
- # source://pg//lib/pg/coder.rb#39
727
- def ==(v); end
728
-
729
- # source://pg//lib/pg/coder.rb#25
730
- def dup; end
731
-
732
- def flags; end
733
- def flags=(_arg0); end
734
- def format; end
735
- def format=(_arg0); end
736
-
737
- # source://pg//lib/pg/coder.rb#51
738
- def inspect; end
739
-
740
- # source://pg//lib/pg/coder.rb#60
741
- def inspect_short; end
742
-
743
- # source://pg//lib/pg/coder.rb#43
744
- def marshal_dump; end
745
-
746
- # source://pg//lib/pg/coder.rb#47
747
- def marshal_load(str); end
748
-
749
- def name; end
750
- def name=(_arg0); end
751
- def oid; end
752
- def oid=(_arg0); end
753
-
754
- # Returns coder attributes as Hash.
755
- #
756
- # source://pg//lib/pg/coder.rb#30
757
- def to_h; end
758
- end
759
-
760
- # source://pg//lib/pg/coder.rb#8
761
- module PG::Coder::BinaryFormatting
762
- # source://pg//lib/pg/coder.rb#9
763
- def initialize(hash = T.unsafe(nil), **kwargs); end
764
- end
765
-
766
- PG::Coder::FORMAT_ERROR_MASK = T.let(T.unsafe(nil), Integer)
767
- PG::Coder::FORMAT_ERROR_TO_PARTIAL = T.let(T.unsafe(nil), Integer)
768
- PG::Coder::FORMAT_ERROR_TO_RAISE = T.let(T.unsafe(nil), Integer)
769
- PG::Coder::FORMAT_ERROR_TO_STRING = T.let(T.unsafe(nil), Integer)
770
- PG::Coder::TIMESTAMP_APP_LOCAL = T.let(T.unsafe(nil), Integer)
771
- PG::Coder::TIMESTAMP_APP_UTC = T.let(T.unsafe(nil), Integer)
772
- PG::Coder::TIMESTAMP_DB_LOCAL = T.let(T.unsafe(nil), Integer)
773
- PG::Coder::TIMESTAMP_DB_UTC = T.let(T.unsafe(nil), Integer)
774
- class PG::CollationMismatch < ::PG::SyntaxErrorOrAccessRuleViolation; end
775
-
776
- # source://pg//lib/pg/coder.rb#73
777
- class PG::CompositeCoder < ::PG::Coder
778
- def delimiter; end
779
- def delimiter=(_arg0); end
780
- def elements_type; end
781
- def elements_type=(_arg0); end
782
-
783
- # source://pg//lib/pg/coder.rb#82
784
- def inspect; end
785
-
786
- def needs_quotation=(_arg0); end
787
- def needs_quotation?; end
788
-
789
- # source://pg//lib/pg/coder.rb#74
790
- def to_h; end
791
- end
792
-
793
- class PG::CompositeDecoder < ::PG::CompositeCoder; end
794
- class PG::CompositeEncoder < ::PG::CompositeCoder; end
795
- class PG::ConfigFileError < ::PG::ServerError; end
796
- class PG::ConfigurationLimitExceeded < ::PG::InsufficientResources; end
797
-
798
- # The PostgreSQL connection class. The interface for this class is based on
799
- # {libpq}[http://www.postgresql.org/docs/current/libpq.html], the C
800
- # application programmer's interface to PostgreSQL. Some familiarity with libpq
801
- # is recommended, but not necessary.
802
- #
803
- # For example, to send query to the database on the localhost:
804
- #
805
- # require 'pg'
806
- # conn = PG::Connection.open(:dbname => 'test')
807
- # res = conn.exec_params('SELECT $1 AS a, $2 AS b, $3 AS c', [1, 2, nil])
808
- # # Equivalent to:
809
- # # res = conn.exec('SELECT 1 AS a, 2 AS b, NULL AS c')
810
- #
811
- # See the PG::Result class for information on working with the results of a query.
812
- #
813
- # Many methods of this class have three variants kind of:
814
- # 1. #exec - the base method which is an alias to #async_exec .
815
- # This is the method that should be used in general.
816
- # 2. #async_exec - the async aware version of the method, implemented by libpq's async API.
817
- # 3. #sync_exec - the method version that is implemented by blocking function(s) of libpq.
818
- #
819
- # Sync and async version of the method can be switched by Connection.async_api= , however it is not recommended to change the default.
820
- #
821
- # source://pg//lib/pg/connection.rb#30
822
- class PG::Connection
823
- include ::PG::Constants
824
-
825
- # call-seq:
826
- # conn.cancel() -> String
827
- #
828
- # Requests cancellation of the command currently being
829
- # processed.
830
- #
831
- # Returns +nil+ on success, or a string containing the
832
- # error message if a failure occurs.
833
- #
834
- # source://pg//lib/pg/connection.rb#597
835
- def async_cancel; end
836
-
837
- def async_describe_portal(_arg0); end
838
- def async_describe_prepared(_arg0); end
839
-
840
- # call-seq:
841
- # conn.encrypt_password( password, username, algorithm=nil ) -> String
842
- #
843
- # This function is intended to be used by client applications that wish to send commands like <tt>ALTER USER joe PASSWORD 'pwd'</tt>.
844
- # It is good practice not to send the original cleartext password in such a command, because it might be exposed in command logs, activity displays, and so on.
845
- # Instead, use this function to convert the password to encrypted form before it is sent.
846
- #
847
- # The +password+ and +username+ arguments are the cleartext password, and the SQL name of the user it is for.
848
- # +algorithm+ specifies the encryption algorithm to use to encrypt the password.
849
- # Currently supported algorithms are +md5+ and +scram-sha-256+ (+on+ and +off+ are also accepted as aliases for +md5+, for compatibility with older server versions).
850
- # Note that support for +scram-sha-256+ was introduced in PostgreSQL version 10, and will not work correctly with older server versions.
851
- # If algorithm is omitted or +nil+, this function will query the server for the current value of the +password_encryption+ setting.
852
- # That can block, and will fail if the current transaction is aborted, or if the connection is busy executing another query.
853
- # If you wish to use the default algorithm for the server but want to avoid blocking, query +password_encryption+ yourself before calling #encrypt_password, and pass that value as the algorithm.
854
- #
855
- # Return value is the encrypted password.
856
- # The caller can assume the string doesn't contain any special characters that would require escaping.
857
- #
858
- # Available since PostgreSQL-10.
859
- # See also corresponding {libpq function}[https://www.postgresql.org/docs/current/libpq-misc.html#LIBPQ-PQENCRYPTPASSWORDCONN].
860
- #
861
- # source://pg//lib/pg/connection.rb#563
862
- def async_encrypt_password(password, username, algorithm = T.unsafe(nil)); end
863
-
864
- def async_exec(*_arg0); end
865
- def async_exec_params(*_arg0); end
866
- def async_exec_prepared(*_arg0); end
867
- def async_flush; end
868
-
869
- # call-seq:
870
- # conn.get_copy_data( [ nonblock = false [, decoder = nil ]] ) -> Object
871
- #
872
- # Return one row of data, +nil+
873
- # if the copy is done, or +false+ if the call would
874
- # block (only possible if _nonblock_ is true).
875
- #
876
- # If _decoder_ is not set or +nil+, data is returned as binary string.
877
- #
878
- # If _decoder_ is set to a PG::Coder derivation, the return type depends on this decoder.
879
- # PG::TextDecoder::CopyRow decodes the received data fields from one row of PostgreSQL's
880
- # COPY text format to an Array of Strings.
881
- # Optionally the decoder can type cast the single fields to various Ruby types in one step,
882
- # if PG::TextDecoder::CopyRow#type_map is set accordingly.
883
- #
884
- # See also #copy_data.
885
- #
886
- # source://pg//lib/pg/connection.rb#431
887
- def async_get_copy_data(async = T.unsafe(nil), decoder = T.unsafe(nil)); end
888
-
889
- def async_get_last_result; end
890
-
891
- # call-seq:
892
- # conn.get_result() -> PG::Result
893
- # conn.get_result() {|pg_result| block }
894
- #
895
- # Blocks waiting for the next result from a call to
896
- # #send_query (or another asynchronous command), and returns
897
- # it. Returns +nil+ if no more results are available.
898
- #
899
- # Note: call this function repeatedly until it returns +nil+, or else
900
- # you will not be able to issue further commands.
901
- #
902
- # If the optional code block is given, it will be passed <i>result</i> as an argument,
903
- # and the PG::Result object will automatically be cleared when the block terminates.
904
- # In this instance, <code>conn.exec</code> returns the value of the block.
905
- #
906
- # source://pg//lib/pg/connection.rb#408
907
- def async_get_result; end
908
-
909
- # call-seq:
910
- # conn.isnonblocking() -> Boolean
911
- #
912
- # Returns the blocking status of the database connection.
913
- # Returns +true+ if the connection is set to nonblocking mode and +false+ if blocking.
914
- #
915
- # source://pg//lib/pg/connection.rb#479
916
- def async_isnonblocking; end
917
-
918
- def async_prepare(*_arg0); end
919
-
920
- # call-seq:
921
- # conn.put_copy_data( buffer [, encoder] ) -> Boolean
922
- #
923
- # Transmits _buffer_ as copy data to the server.
924
- # Returns true if the data was sent, false if it was
925
- # not sent (false is only possible if the connection
926
- # is in nonblocking mode, and this command would block).
927
- #
928
- # _encoder_ can be a PG::Coder derivation (typically PG::TextEncoder::CopyRow).
929
- # This encodes the data fields given as _buffer_ from an Array of Strings to
930
- # PostgreSQL's COPY text format inclusive proper escaping. Optionally
931
- # the encoder can type cast the fields from various Ruby types in one step,
932
- # if PG::TextEncoder::CopyRow#type_map is set accordingly.
933
- #
934
- # Raises an exception if an error occurs.
935
- #
936
- # See also #copy_data.
937
- #
938
- # source://pg//lib/pg/connection.rb#503
939
- def async_put_copy_data(buffer, encoder = T.unsafe(nil)); end
940
-
941
- # call-seq:
942
- # conn.put_copy_end( [ error_message ] ) -> Boolean
943
- #
944
- # Sends end-of-data indication to the server.
945
- #
946
- # _error_message_ is an optional parameter, and if set,
947
- # forces the COPY command to fail with the string
948
- # _error_message_.
949
- #
950
- # Returns true if the end-of-data was sent, #false* if it was
951
- # not sent (*false* is only possible if the connection
952
- # is in nonblocking mode, and this command would block).
953
- #
954
- # source://pg//lib/pg/connection.rb#533
955
- def async_put_copy_end(*args); end
956
-
957
- def async_query(*_arg0); end
958
-
959
- # call-seq:
960
- # conn.reset()
961
- #
962
- # Resets the backend connection. This method closes the
963
- # backend connection and tries to re-connect.
964
- #
965
- # source://pg//lib/pg/connection.rb#575
966
- def async_reset; end
967
-
968
- def async_set_client_encoding(_arg0); end
969
-
970
- # call-seq:
971
- # conn.setnonblocking(Boolean) -> nil
972
- #
973
- # Sets the nonblocking status of the connection.
974
- # In the blocking state, calls to #send_query
975
- # will block until the message is sent to the server,
976
- # but will not wait for the query results.
977
- # In the nonblocking state, calls to #send_query
978
- # will return an error if the socket is not ready for
979
- # writing.
980
- # Note: This function does not affect #exec, because
981
- # that function doesn't return until the server has
982
- # processed the query and returned the results.
983
- #
984
- # Returns +nil+.
985
- #
986
- # source://pg//lib/pg/connection.rb#465
987
- def async_setnonblocking(enabled); end
988
-
989
- def backend_key; end
990
- def backend_pid; end
991
- def block(*_arg0); end
992
-
993
- # call-seq:
994
- # conn.cancel() -> String
995
- #
996
- # Requests cancellation of the command currently being
997
- # processed.
998
- #
999
- # Returns +nil+ on success, or a string containing the
1000
- # error message if a failure occurs.
1001
- #
1002
- # source://pg//lib/pg/connection.rb#597
1003
- def cancel; end
1004
-
1005
- # Read all pending socket input to internal memory and raise an exception in case of errors.
1006
- #
1007
- # This verifies that the connection socket is in a usable state and not aborted in any way.
1008
- # No communication is done with the server.
1009
- # Only pending data is read from the socket - the method doesn't wait for any outstanding server answers.
1010
- #
1011
- # Raises a kind of PG::Error if there was an error reading the data or if the socket is in a failure state.
1012
- #
1013
- # The method doesn't verify that the server is still responding.
1014
- # To verify that the communication to the server works, it is recommended to use something like <tt>conn.exec('')</tt> instead.
1015
- #
1016
- # source://pg//lib/pg/connection.rb#387
1017
- def check_socket; end
1018
-
1019
- def client_encoding=(_arg0); end
1020
- def close; end
1021
-
1022
- # Returns an array of Hashes with connection defaults. See ::conndefaults
1023
- # for details.
1024
- #
1025
- # source://pg//lib/pg/connection.rb#329
1026
- def conndefaults; end
1027
-
1028
- # Returns a Hash with connection defaults. See ::conndefaults_hash
1029
- # for details.
1030
- #
1031
- # source://pg//lib/pg/connection.rb#345
1032
- def conndefaults_hash; end
1033
-
1034
- def connect_poll; end
1035
- def connection_needs_password; end
1036
- def connection_used_password; end
1037
- def conninfo; end
1038
-
1039
- # Return the Postgres connection info structure as a Hash keyed by option
1040
- # keyword (as a Symbol).
1041
- #
1042
- # See also #conninfo
1043
- #
1044
- # source://pg//lib/pg/connection.rb#353
1045
- def conninfo_hash; end
1046
-
1047
- def consume_input; end
1048
-
1049
- # call-seq:
1050
- # conn.copy_data( sql [, coder] ) {|sql_result| ... } -> PG::Result
1051
- #
1052
- # Execute a copy process for transferring data to or from the server.
1053
- #
1054
- # This issues the SQL COPY command via #exec. The response to this
1055
- # (if there is no error in the command) is a PG::Result object that
1056
- # is passed to the block, bearing a status code of PGRES_COPY_OUT or
1057
- # PGRES_COPY_IN (depending on the specified copy direction).
1058
- # The application should then use #put_copy_data or #get_copy_data
1059
- # to receive or transmit data rows and should return from the block
1060
- # when finished.
1061
- #
1062
- # #copy_data returns another PG::Result object when the data transfer
1063
- # is complete. An exception is raised if some problem was encountered,
1064
- # so it isn't required to make use of any of them.
1065
- # At this point further SQL commands can be issued via #exec.
1066
- # (It is not possible to execute other SQL commands using the same
1067
- # connection while the COPY operation is in progress.)
1068
- #
1069
- # This method ensures, that the copy process is properly terminated
1070
- # in case of client side or server side failures. Therefore, in case
1071
- # of blocking mode of operation, #copy_data is preferred to raw calls
1072
- # of #put_copy_data, #get_copy_data and #put_copy_end.
1073
- #
1074
- # _coder_ can be a PG::Coder derivation
1075
- # (typically PG::TextEncoder::CopyRow or PG::TextDecoder::CopyRow).
1076
- # This enables encoding of data fields given to #put_copy_data
1077
- # or decoding of fields received by #get_copy_data.
1078
- #
1079
- # Example with CSV input format:
1080
- # conn.exec "create table my_table (a text,b text,c text,d text)"
1081
- # conn.copy_data "COPY my_table FROM STDIN CSV" do
1082
- # conn.put_copy_data "some,data,to,copy\n"
1083
- # conn.put_copy_data "more,data,to,copy\n"
1084
- # end
1085
- # This creates +my_table+ and inserts two CSV rows.
1086
- #
1087
- # The same with text format encoder PG::TextEncoder::CopyRow
1088
- # and Array input:
1089
- # enco = PG::TextEncoder::CopyRow.new
1090
- # conn.copy_data "COPY my_table FROM STDIN", enco do
1091
- # conn.put_copy_data ['some', 'data', 'to', 'copy']
1092
- # conn.put_copy_data ['more', 'data', 'to', 'copy']
1093
- # end
1094
- #
1095
- # All 4 CopyRow classes can take a type map to specify how the columns are mapped to and from the database format.
1096
- # For details see the particular CopyRow class description.
1097
- #
1098
- # PG::BinaryEncoder::CopyRow can be used to send data in binary format to the server.
1099
- # In this case copy_data generates the header and trailer data automatically:
1100
- # enco = PG::BinaryEncoder::CopyRow.new
1101
- # conn.copy_data "COPY my_table FROM STDIN (FORMAT binary)", enco do
1102
- # conn.put_copy_data ['some', 'data', 'to', 'copy']
1103
- # conn.put_copy_data ['more', 'data', 'to', 'copy']
1104
- # end
1105
- #
1106
- # Example with CSV output format:
1107
- # conn.copy_data "COPY my_table TO STDOUT CSV" do
1108
- # while row=conn.get_copy_data
1109
- # p row
1110
- # end
1111
- # end
1112
- # This prints all rows of +my_table+ to stdout:
1113
- # "some,data,to,copy\n"
1114
- # "more,data,to,copy\n"
1115
- #
1116
- # The same with text format decoder PG::TextDecoder::CopyRow
1117
- # and Array output:
1118
- # deco = PG::TextDecoder::CopyRow.new
1119
- # conn.copy_data "COPY my_table TO STDOUT", deco do
1120
- # while row=conn.get_copy_data
1121
- # p row
1122
- # end
1123
- # end
1124
- # This receives all rows of +my_table+ as ruby array:
1125
- # ["some", "data", "to", "copy"]
1126
- # ["more", "data", "to", "copy"]
1127
- #
1128
- # Also PG::BinaryDecoder::CopyRow can be used to retrieve data in binary format from the server.
1129
- # In this case the header and trailer data is processed by the decoder and the remaining +nil+ from get_copy_data is processed by copy_data, so that binary data can be processed equally to text data:
1130
- # deco = PG::BinaryDecoder::CopyRow.new
1131
- # conn.copy_data "COPY my_table TO STDOUT (FORMAT binary)", deco do
1132
- # while row=conn.get_copy_data
1133
- # p row
1134
- # end
1135
- # end
1136
- # This receives all rows of +my_table+ as ruby array:
1137
- # ["some", "data", "to", "copy"]
1138
- # ["more", "data", "to", "copy"]
1139
- #
1140
- # @raise [PG::NotInBlockingMode]
1141
- #
1142
- # source://pg//lib/pg/connection.rb#214
1143
- def copy_data(sql, coder = T.unsafe(nil)); end
1144
-
1145
- def db; end
1146
- def decoder_for_get_copy_data; end
1147
- def decoder_for_get_copy_data=(_arg0); end
1148
- def describe_portal(_arg0); end
1149
- def describe_prepared(_arg0); end
1150
- def discard_results; end
1151
- def encoder_for_put_copy_data; end
1152
- def encoder_for_put_copy_data=(_arg0); end
1153
-
1154
- # call-seq:
1155
- # conn.encrypt_password( password, username, algorithm=nil ) -> String
1156
- #
1157
- # This function is intended to be used by client applications that wish to send commands like <tt>ALTER USER joe PASSWORD 'pwd'</tt>.
1158
- # It is good practice not to send the original cleartext password in such a command, because it might be exposed in command logs, activity displays, and so on.
1159
- # Instead, use this function to convert the password to encrypted form before it is sent.
1160
- #
1161
- # The +password+ and +username+ arguments are the cleartext password, and the SQL name of the user it is for.
1162
- # +algorithm+ specifies the encryption algorithm to use to encrypt the password.
1163
- # Currently supported algorithms are +md5+ and +scram-sha-256+ (+on+ and +off+ are also accepted as aliases for +md5+, for compatibility with older server versions).
1164
- # Note that support for +scram-sha-256+ was introduced in PostgreSQL version 10, and will not work correctly with older server versions.
1165
- # If algorithm is omitted or +nil+, this function will query the server for the current value of the +password_encryption+ setting.
1166
- # That can block, and will fail if the current transaction is aborted, or if the connection is busy executing another query.
1167
- # If you wish to use the default algorithm for the server but want to avoid blocking, query +password_encryption+ yourself before calling #encrypt_password, and pass that value as the algorithm.
1168
- #
1169
- # Return value is the encrypted password.
1170
- # The caller can assume the string doesn't contain any special characters that would require escaping.
1171
- #
1172
- # Available since PostgreSQL-10.
1173
- # See also corresponding {libpq function}[https://www.postgresql.org/docs/current/libpq-misc.html#LIBPQ-PQENCRYPTPASSWORDCONN].
1174
- #
1175
- # source://pg//lib/pg/connection.rb#563
1176
- def encrypt_password(password, username, algorithm = T.unsafe(nil)); end
1177
-
1178
- def enter_pipeline_mode; end
1179
- def error_message; end
1180
- def escape(_arg0); end
1181
- def escape_bytea(_arg0); end
1182
- def escape_identifier(_arg0); end
1183
- def escape_literal(_arg0); end
1184
- def escape_string(_arg0); end
1185
- def exec(*_arg0); end
1186
- def exec_params(*_arg0); end
1187
- def exec_prepared(*_arg0); end
1188
- def exit_pipeline_mode; end
1189
- def external_encoding; end
1190
- def field_name_type; end
1191
- def field_name_type=(_arg0); end
1192
- def finish; end
1193
- def finished?; end
1194
- def flush; end
1195
- def get_client_encoding; end
1196
-
1197
- # call-seq:
1198
- # conn.get_copy_data( [ nonblock = false [, decoder = nil ]] ) -> Object
1199
- #
1200
- # Return one row of data, +nil+
1201
- # if the copy is done, or +false+ if the call would
1202
- # block (only possible if _nonblock_ is true).
1203
- #
1204
- # If _decoder_ is not set or +nil+, data is returned as binary string.
1205
- #
1206
- # If _decoder_ is set to a PG::Coder derivation, the return type depends on this decoder.
1207
- # PG::TextDecoder::CopyRow decodes the received data fields from one row of PostgreSQL's
1208
- # COPY text format to an Array of Strings.
1209
- # Optionally the decoder can type cast the single fields to various Ruby types in one step,
1210
- # if PG::TextDecoder::CopyRow#type_map is set accordingly.
1211
- #
1212
- # See also #copy_data.
1213
- #
1214
- # source://pg//lib/pg/connection.rb#431
1215
- def get_copy_data(async = T.unsafe(nil), decoder = T.unsafe(nil)); end
1216
-
1217
- def get_last_result; end
1218
-
1219
- # call-seq:
1220
- # conn.get_result() -> PG::Result
1221
- # conn.get_result() {|pg_result| block }
1222
- #
1223
- # Blocks waiting for the next result from a call to
1224
- # #send_query (or another asynchronous command), and returns
1225
- # it. Returns +nil+ if no more results are available.
1226
- #
1227
- # Note: call this function repeatedly until it returns +nil+, or else
1228
- # you will not be able to issue further commands.
1229
- #
1230
- # If the optional code block is given, it will be passed <i>result</i> as an argument,
1231
- # and the PG::Result object will automatically be cleared when the block terminates.
1232
- # In this instance, <code>conn.exec</code> returns the value of the block.
1233
- #
1234
- # source://pg//lib/pg/connection.rb#408
1235
- def get_result; end
1236
-
1237
- def host; end
1238
- def hostaddr; end
1239
-
1240
- # Return a String representation of the object suitable for debugging.
1241
- #
1242
- # source://pg//lib/pg/connection.rb#100
1243
- def inspect; end
1244
-
1245
- def internal_encoding; end
1246
- def internal_encoding=(_arg0); end
1247
- def is_busy; end
1248
-
1249
- # call-seq:
1250
- # conn.isnonblocking() -> Boolean
1251
- #
1252
- # Returns the blocking status of the database connection.
1253
- # Returns +true+ if the connection is set to nonblocking mode and +false+ if blocking.
1254
- #
1255
- # source://pg//lib/pg/connection.rb#479
1256
- def isnonblocking; end
1257
-
1258
- def lo_close(_arg0); end
1259
- def lo_creat(*_arg0); end
1260
- def lo_create(_arg0); end
1261
- def lo_export(_arg0, _arg1); end
1262
- def lo_import(_arg0); end
1263
- def lo_lseek(_arg0, _arg1, _arg2); end
1264
- def lo_open(*_arg0); end
1265
- def lo_read(_arg0, _arg1); end
1266
- def lo_seek(_arg0, _arg1, _arg2); end
1267
- def lo_tell(_arg0); end
1268
- def lo_truncate(_arg0, _arg1); end
1269
- def lo_unlink(_arg0); end
1270
- def lo_write(_arg0, _arg1); end
1271
- def loclose(_arg0); end
1272
- def locreat(*_arg0); end
1273
- def locreate(_arg0); end
1274
- def loexport(_arg0, _arg1); end
1275
- def loimport(_arg0); end
1276
- def lolseek(_arg0, _arg1, _arg2); end
1277
- def loopen(*_arg0); end
1278
- def loread(_arg0, _arg1); end
1279
- def loseek(_arg0, _arg1, _arg2); end
1280
- def lotell(_arg0); end
1281
- def lotruncate(_arg0, _arg1); end
1282
- def lounlink(_arg0); end
1283
- def lowrite(_arg0, _arg1); end
1284
- def make_empty_pgresult(_arg0); end
1285
-
1286
- # call-seq:
1287
- # conn.isnonblocking() -> Boolean
1288
- #
1289
- # Returns the blocking status of the database connection.
1290
- # Returns +true+ if the connection is set to nonblocking mode and +false+ if blocking.
1291
- #
1292
- # source://pg//lib/pg/connection.rb#479
1293
- def nonblocking?; end
1294
-
1295
- def notifies; end
1296
- def notifies_wait(*_arg0); end
1297
- def options; end
1298
- def parameter_status(_arg0); end
1299
- def pass; end
1300
- def pipeline_status; end
1301
- def pipeline_sync; end
1302
- def port; end
1303
- def prepare(*_arg0); end
1304
- def protocol_version; end
1305
-
1306
- # call-seq:
1307
- # conn.put_copy_data( buffer [, encoder] ) -> Boolean
1308
- #
1309
- # Transmits _buffer_ as copy data to the server.
1310
- # Returns true if the data was sent, false if it was
1311
- # not sent (false is only possible if the connection
1312
- # is in nonblocking mode, and this command would block).
1313
- #
1314
- # _encoder_ can be a PG::Coder derivation (typically PG::TextEncoder::CopyRow).
1315
- # This encodes the data fields given as _buffer_ from an Array of Strings to
1316
- # PostgreSQL's COPY text format inclusive proper escaping. Optionally
1317
- # the encoder can type cast the fields from various Ruby types in one step,
1318
- # if PG::TextEncoder::CopyRow#type_map is set accordingly.
1319
- #
1320
- # Raises an exception if an error occurs.
1321
- #
1322
- # See also #copy_data.
1323
- #
1324
- # source://pg//lib/pg/connection.rb#503
1325
- def put_copy_data(buffer, encoder = T.unsafe(nil)); end
1326
-
1327
- # call-seq:
1328
- # conn.put_copy_end( [ error_message ] ) -> Boolean
1329
- #
1330
- # Sends end-of-data indication to the server.
1331
- #
1332
- # _error_message_ is an optional parameter, and if set,
1333
- # forces the COPY command to fail with the string
1334
- # _error_message_.
1335
- #
1336
- # Returns true if the end-of-data was sent, #false* if it was
1337
- # not sent (*false* is only possible if the connection
1338
- # is in nonblocking mode, and this command would block).
1339
- #
1340
- # source://pg//lib/pg/connection.rb#533
1341
- def put_copy_end(*args); end
1342
-
1343
- def query(*_arg0); end
1344
- def quote_ident(_arg0); end
1345
-
1346
- # call-seq:
1347
- # conn.reset()
1348
- #
1349
- # Resets the backend connection. This method closes the
1350
- # backend connection and tries to re-connect.
1351
- #
1352
- # source://pg//lib/pg/connection.rb#575
1353
- def reset; end
1354
-
1355
- def reset_poll; end
1356
- def reset_start; end
1357
- def send_describe_portal(_arg0); end
1358
- def send_describe_prepared(_arg0); end
1359
- def send_flush_request; end
1360
- def send_prepare(*_arg0); end
1361
- def send_query(*_arg0); end
1362
- def send_query_params(*_arg0); end
1363
- def send_query_prepared(*_arg0); end
1364
- def server_version; end
1365
- def set_client_encoding(_arg0); end
1366
- def set_default_encoding; end
1367
- def set_error_context_visibility(_arg0); end
1368
- def set_error_verbosity(_arg0); end
1369
- def set_notice_processor; end
1370
- def set_notice_receiver; end
1371
- def set_single_row_mode; end
1372
-
1373
- # call-seq:
1374
- # conn.setnonblocking(Boolean) -> nil
1375
- #
1376
- # Sets the nonblocking status of the connection.
1377
- # In the blocking state, calls to #send_query
1378
- # will block until the message is sent to the server,
1379
- # but will not wait for the query results.
1380
- # In the nonblocking state, calls to #send_query
1381
- # will return an error if the socket is not ready for
1382
- # writing.
1383
- # Note: This function does not affect #exec, because
1384
- # that function doesn't return until the server has
1385
- # processed the query and returned the results.
1386
- #
1387
- # Returns +nil+.
1388
- #
1389
- # source://pg//lib/pg/connection.rb#465
1390
- def setnonblocking(enabled); end
1391
-
1392
- def socket; end
1393
- def socket_io; end
1394
- def ssl_attribute(_arg0); end
1395
- def ssl_attribute_names; end
1396
-
1397
- # call-seq:
1398
- # conn.ssl_attributes -> Hash<String,String>
1399
- #
1400
- # Returns SSL-related information about the connection as key/value pairs
1401
- #
1402
- # The available attributes varies depending on the SSL library being used,
1403
- # and the type of connection.
1404
- #
1405
- # See also #ssl_attribute
1406
- #
1407
- # source://pg//lib/pg/connection.rb#370
1408
- def ssl_attributes; end
1409
-
1410
- def ssl_in_use?; end
1411
- def status; end
1412
- def sync_cancel; end
1413
- def sync_describe_portal(_arg0); end
1414
- def sync_describe_prepared(_arg0); end
1415
- def sync_encrypt_password(*_arg0); end
1416
- def sync_exec(*_arg0); end
1417
- def sync_exec_params(*_arg0); end
1418
- def sync_exec_prepared(*_arg0); end
1419
- def sync_flush; end
1420
- def sync_get_copy_data(*_arg0); end
1421
- def sync_get_last_result; end
1422
- def sync_get_result; end
1423
- def sync_isnonblocking; end
1424
- def sync_prepare(*_arg0); end
1425
- def sync_put_copy_data(*_arg0); end
1426
- def sync_put_copy_end(*_arg0); end
1427
- def sync_reset; end
1428
- def sync_set_client_encoding(_arg0); end
1429
- def sync_setnonblocking(_arg0); end
1430
- def trace(_arg0); end
1431
-
1432
- # call-seq:
1433
- # conn.transaction { |conn| ... } -> result of the block
1434
- #
1435
- # Executes a +BEGIN+ at the start of the block,
1436
- # and a +COMMIT+ at the end of the block, or
1437
- # +ROLLBACK+ if any exception occurs.
1438
- #
1439
- # source://pg//lib/pg/connection.rb#308
1440
- def transaction; end
1441
-
1442
- def transaction_status; end
1443
- def tty; end
1444
- def type_map_for_queries; end
1445
- def type_map_for_queries=(_arg0); end
1446
- def type_map_for_results; end
1447
- def type_map_for_results=(_arg0); end
1448
- def unescape_bytea(_arg0); end
1449
- def untrace; end
1450
- def user; end
1451
- def wait_for_notify(*_arg0); end
1452
-
1453
- private
1454
-
1455
- # source://pg//lib/pg/connection.rb#652
1456
- def async_connect_or_reset(poll_meth); end
1457
-
1458
- def flush_data=(_arg0); end
1459
- def reset_start2(_arg0); end
1460
-
1461
- class << self
1462
- # Switch between sync and async libpq API.
1463
- #
1464
- # PG::Connection.async_api = true
1465
- # this is the default.
1466
- # It sets an alias from #exec to #async_exec, #reset to #async_reset and so on.
1467
- #
1468
- # PG::Connection.async_api = false
1469
- # sets an alias from #exec to #sync_exec, #reset to #sync_reset and so on.
1470
- #
1471
- # pg-1.1.0+ defaults to libpq's async API for query related blocking methods.
1472
- # pg-1.3.0+ defaults to libpq's async API for all possibly blocking methods.
1473
- #
1474
- # _PLEASE_ _NOTE_: This method is not part of the public API and is for debug and development use only.
1475
- # Do not use this method in production code.
1476
- # Any issues with the default setting of <tt>async_api=true</tt> should be reported to the maintainers instead.
1477
- #
1478
- # source://pg//lib/pg/connection.rb#957
1479
- def async_api=(enable); end
1480
-
1481
- # call-seq:
1482
- # PG::Connection.new -> conn
1483
- # PG::Connection.new(connection_hash) -> conn
1484
- # PG::Connection.new(connection_string) -> conn
1485
- # PG::Connection.new(host, port, options, tty, dbname, user, password) -> conn
1486
- #
1487
- # Create a connection to the specified server.
1488
- #
1489
- # +connection_hash+ must be a ruby Hash with connection parameters.
1490
- # See the {list of valid parameters}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS] in the PostgreSQL documentation.
1491
- #
1492
- # There are two accepted formats for +connection_string+: plain <code>keyword = value</code> strings and URIs.
1493
- # See the documentation of {connection strings}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING].
1494
- #
1495
- # The positional parameter form has the same functionality except that the missing parameters will always take on default values. The parameters are:
1496
- # [+host+]
1497
- # server hostname
1498
- # [+port+]
1499
- # server port number
1500
- # [+options+]
1501
- # backend options
1502
- # [+tty+]
1503
- # (ignored in all versions of PostgreSQL)
1504
- # [+dbname+]
1505
- # connecting database name
1506
- # [+user+]
1507
- # login user name
1508
- # [+password+]
1509
- # login password
1510
- #
1511
- # Examples:
1512
- #
1513
- # # Connect using all defaults
1514
- # PG::Connection.new
1515
- #
1516
- # # As a Hash
1517
- # PG::Connection.new( dbname: 'test', port: 5432 )
1518
- #
1519
- # # As a String
1520
- # PG::Connection.new( "dbname=test port=5432" )
1521
- #
1522
- # # As an Array
1523
- # PG::Connection.new( nil, 5432, nil, nil, 'test', nil, nil )
1524
- #
1525
- # # As an URI
1526
- # PG::Connection.new( "postgresql://user:pass@pgsql.example.com:5432/testdb?sslmode=require" )
1527
- #
1528
- # If the Ruby default internal encoding is set (i.e., <code>Encoding.default_internal != nil</code>), the
1529
- # connection will have its +client_encoding+ set accordingly.
1530
- #
1531
- # Raises a PG::Error if the connection fails.
1532
- #
1533
- # source://pg//lib/pg/connection.rb#771
1534
- def async_connect(*args); end
1535
-
1536
- # call-seq:
1537
- # PG::Connection.ping(connection_hash) -> Integer
1538
- # PG::Connection.ping(connection_string) -> Integer
1539
- # PG::Connection.ping(host, port, options, tty, dbname, login, password) -> Integer
1540
- #
1541
- # PQpingParams reports the status of the server.
1542
- #
1543
- # It accepts connection parameters identical to those of PQ::Connection.new .
1544
- # It is not necessary to supply correct user name, password, or database name values to obtain the server status; however, if incorrect values are provided, the server will log a failed connection attempt.
1545
- #
1546
- # See PG::Connection.new for a description of the parameters.
1547
- #
1548
- # Returns one of:
1549
- # [+PQPING_OK+]
1550
- # server is accepting connections
1551
- # [+PQPING_REJECT+]
1552
- # server is alive but rejecting connections
1553
- # [+PQPING_NO_RESPONSE+]
1554
- # could not establish connection
1555
- # [+PQPING_NO_ATTEMPT+]
1556
- # connection not attempted (bad params)
1557
- #
1558
- # See also check_socket for a way to check the connection without doing any server communication.
1559
- #
1560
- # source://pg//lib/pg/connection.rb#878
1561
- def async_ping(*args); end
1562
-
1563
- # source://pg//lib/pg/connection.rb#934
1564
- def async_send_api=(enable); end
1565
-
1566
- def conndefaults; end
1567
-
1568
- # Return the Postgres connection defaults structure as a Hash keyed by option
1569
- # keyword (as a Symbol).
1570
- #
1571
- # See also #conndefaults
1572
- #
1573
- # source://pg//lib/pg/connection.rb#337
1574
- def conndefaults_hash; end
1575
-
1576
- # call-seq:
1577
- # PG::Connection.new -> conn
1578
- # PG::Connection.new(connection_hash) -> conn
1579
- # PG::Connection.new(connection_string) -> conn
1580
- # PG::Connection.new(host, port, options, tty, dbname, user, password) -> conn
1581
- #
1582
- # Create a connection to the specified server.
1583
- #
1584
- # +connection_hash+ must be a ruby Hash with connection parameters.
1585
- # See the {list of valid parameters}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS] in the PostgreSQL documentation.
1586
- #
1587
- # There are two accepted formats for +connection_string+: plain <code>keyword = value</code> strings and URIs.
1588
- # See the documentation of {connection strings}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING].
1589
- #
1590
- # The positional parameter form has the same functionality except that the missing parameters will always take on default values. The parameters are:
1591
- # [+host+]
1592
- # server hostname
1593
- # [+port+]
1594
- # server port number
1595
- # [+options+]
1596
- # backend options
1597
- # [+tty+]
1598
- # (ignored in all versions of PostgreSQL)
1599
- # [+dbname+]
1600
- # connecting database name
1601
- # [+user+]
1602
- # login user name
1603
- # [+password+]
1604
- # login password
1605
- #
1606
- # Examples:
1607
- #
1608
- # # Connect using all defaults
1609
- # PG::Connection.new
1610
- #
1611
- # # As a Hash
1612
- # PG::Connection.new( dbname: 'test', port: 5432 )
1613
- #
1614
- # # As a String
1615
- # PG::Connection.new( "dbname=test port=5432" )
1616
- #
1617
- # # As an Array
1618
- # PG::Connection.new( nil, 5432, nil, nil, 'test', nil, nil )
1619
- #
1620
- # # As an URI
1621
- # PG::Connection.new( "postgresql://user:pass@pgsql.example.com:5432/testdb?sslmode=require" )
1622
- #
1623
- # If the Ruby default internal encoding is set (i.e., <code>Encoding.default_internal != nil</code>), the
1624
- # connection will have its +client_encoding+ set accordingly.
1625
- #
1626
- # Raises a PG::Error if the connection fails.
1627
- #
1628
- # source://pg//lib/pg/connection.rb#771
1629
- def connect(*args); end
1630
-
1631
- # Convert Hash options to connection String
1632
- #
1633
- # Values are properly quoted and escaped.
1634
- #
1635
- # source://pg//lib/pg/connection.rb#44
1636
- def connect_hash_to_string(hash); end
1637
-
1638
- def connect_start(*_arg0); end
1639
- def conninfo_parse(_arg0); end
1640
- def encrypt_password(_arg0, _arg1); end
1641
- def escape(_arg0); end
1642
- def escape_bytea(_arg0); end
1643
- def escape_string(_arg0); end
1644
- def isthreadsafe; end
1645
-
1646
- # call-seq:
1647
- # PG::Connection.new -> conn
1648
- # PG::Connection.new(connection_hash) -> conn
1649
- # PG::Connection.new(connection_string) -> conn
1650
- # PG::Connection.new(host, port, options, tty, dbname, user, password) -> conn
1651
- #
1652
- # Create a connection to the specified server.
1653
- #
1654
- # +connection_hash+ must be a ruby Hash with connection parameters.
1655
- # See the {list of valid parameters}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS] in the PostgreSQL documentation.
1656
- #
1657
- # There are two accepted formats for +connection_string+: plain <code>keyword = value</code> strings and URIs.
1658
- # See the documentation of {connection strings}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING].
1659
- #
1660
- # The positional parameter form has the same functionality except that the missing parameters will always take on default values. The parameters are:
1661
- # [+host+]
1662
- # server hostname
1663
- # [+port+]
1664
- # server port number
1665
- # [+options+]
1666
- # backend options
1667
- # [+tty+]
1668
- # (ignored in all versions of PostgreSQL)
1669
- # [+dbname+]
1670
- # connecting database name
1671
- # [+user+]
1672
- # login user name
1673
- # [+password+]
1674
- # login password
1675
- #
1676
- # Examples:
1677
- #
1678
- # # Connect using all defaults
1679
- # PG::Connection.new
1680
- #
1681
- # # As a Hash
1682
- # PG::Connection.new( dbname: 'test', port: 5432 )
1683
- #
1684
- # # As a String
1685
- # PG::Connection.new( "dbname=test port=5432" )
1686
- #
1687
- # # As an Array
1688
- # PG::Connection.new( nil, 5432, nil, nil, 'test', nil, nil )
1689
- #
1690
- # # As an URI
1691
- # PG::Connection.new( "postgresql://user:pass@pgsql.example.com:5432/testdb?sslmode=require" )
1692
- #
1693
- # If the Ruby default internal encoding is set (i.e., <code>Encoding.default_internal != nil</code>), the
1694
- # connection will have its +client_encoding+ set accordingly.
1695
- #
1696
- # Raises a PG::Error if the connection fails.
1697
- #
1698
- # source://pg//lib/pg/connection.rb#771
1699
- def new(*args); end
1700
-
1701
- # call-seq:
1702
- # PG::Connection.new -> conn
1703
- # PG::Connection.new(connection_hash) -> conn
1704
- # PG::Connection.new(connection_string) -> conn
1705
- # PG::Connection.new(host, port, options, tty, dbname, user, password) -> conn
1706
- #
1707
- # Create a connection to the specified server.
1708
- #
1709
- # +connection_hash+ must be a ruby Hash with connection parameters.
1710
- # See the {list of valid parameters}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS] in the PostgreSQL documentation.
1711
- #
1712
- # There are two accepted formats for +connection_string+: plain <code>keyword = value</code> strings and URIs.
1713
- # See the documentation of {connection strings}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING].
1714
- #
1715
- # The positional parameter form has the same functionality except that the missing parameters will always take on default values. The parameters are:
1716
- # [+host+]
1717
- # server hostname
1718
- # [+port+]
1719
- # server port number
1720
- # [+options+]
1721
- # backend options
1722
- # [+tty+]
1723
- # (ignored in all versions of PostgreSQL)
1724
- # [+dbname+]
1725
- # connecting database name
1726
- # [+user+]
1727
- # login user name
1728
- # [+password+]
1729
- # login password
1730
- #
1731
- # Examples:
1732
- #
1733
- # # Connect using all defaults
1734
- # PG::Connection.new
1735
- #
1736
- # # As a Hash
1737
- # PG::Connection.new( dbname: 'test', port: 5432 )
1738
- #
1739
- # # As a String
1740
- # PG::Connection.new( "dbname=test port=5432" )
1741
- #
1742
- # # As an Array
1743
- # PG::Connection.new( nil, 5432, nil, nil, 'test', nil, nil )
1744
- #
1745
- # # As an URI
1746
- # PG::Connection.new( "postgresql://user:pass@pgsql.example.com:5432/testdb?sslmode=require" )
1747
- #
1748
- # If the Ruby default internal encoding is set (i.e., <code>Encoding.default_internal != nil</code>), the
1749
- # connection will have its +client_encoding+ set accordingly.
1750
- #
1751
- # Raises a PG::Error if the connection fails.
1752
- #
1753
- # source://pg//lib/pg/connection.rb#771
1754
- def open(*args); end
1755
-
1756
- # Parse the connection +args+ into a connection-parameter string.
1757
- # See PG::Connection.new for valid arguments.
1758
- #
1759
- # It accepts:
1760
- # * an option String kind of "host=name port=5432"
1761
- # * an option Hash kind of {host: "name", port: 5432}
1762
- # * URI string
1763
- # * URI object
1764
- # * positional arguments
1765
- #
1766
- # The method adds the option "fallback_application_name" if it isn't already set.
1767
- # It returns a connection string with "key=value" pairs.
1768
- #
1769
- # source://pg//lib/pg/connection.rb#64
1770
- def parse_connect_args(*args); end
1771
-
1772
- # call-seq:
1773
- # PG::Connection.ping(connection_hash) -> Integer
1774
- # PG::Connection.ping(connection_string) -> Integer
1775
- # PG::Connection.ping(host, port, options, tty, dbname, login, password) -> Integer
1776
- #
1777
- # PQpingParams reports the status of the server.
1778
- #
1779
- # It accepts connection parameters identical to those of PQ::Connection.new .
1780
- # It is not necessary to supply correct user name, password, or database name values to obtain the server status; however, if incorrect values are provided, the server will log a failed connection attempt.
1781
- #
1782
- # See PG::Connection.new for a description of the parameters.
1783
- #
1784
- # Returns one of:
1785
- # [+PQPING_OK+]
1786
- # server is accepting connections
1787
- # [+PQPING_REJECT+]
1788
- # server is alive but rejecting connections
1789
- # [+PQPING_NO_RESPONSE+]
1790
- # could not establish connection
1791
- # [+PQPING_NO_ATTEMPT+]
1792
- # connection not attempted (bad params)
1793
- #
1794
- # See also check_socket for a way to check the connection without doing any server communication.
1795
- #
1796
- # source://pg//lib/pg/connection.rb#878
1797
- def ping(*args); end
1798
-
1799
- # Quote a single +value+ for use in a connection-parameter string.
1800
- #
1801
- # source://pg//lib/pg/connection.rb#37
1802
- def quote_connstr(value); end
1803
-
1804
- def quote_ident(_arg0); end
1805
-
1806
- # call-seq:
1807
- # PG::Connection.new -> conn
1808
- # PG::Connection.new(connection_hash) -> conn
1809
- # PG::Connection.new(connection_string) -> conn
1810
- # PG::Connection.new(host, port, options, tty, dbname, user, password) -> conn
1811
- #
1812
- # Create a connection to the specified server.
1813
- #
1814
- # +connection_hash+ must be a ruby Hash with connection parameters.
1815
- # See the {list of valid parameters}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS] in the PostgreSQL documentation.
1816
- #
1817
- # There are two accepted formats for +connection_string+: plain <code>keyword = value</code> strings and URIs.
1818
- # See the documentation of {connection strings}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING].
1819
- #
1820
- # The positional parameter form has the same functionality except that the missing parameters will always take on default values. The parameters are:
1821
- # [+host+]
1822
- # server hostname
1823
- # [+port+]
1824
- # server port number
1825
- # [+options+]
1826
- # backend options
1827
- # [+tty+]
1828
- # (ignored in all versions of PostgreSQL)
1829
- # [+dbname+]
1830
- # connecting database name
1831
- # [+user+]
1832
- # login user name
1833
- # [+password+]
1834
- # login password
1835
- #
1836
- # Examples:
1837
- #
1838
- # # Connect using all defaults
1839
- # PG::Connection.new
1840
- #
1841
- # # As a Hash
1842
- # PG::Connection.new( dbname: 'test', port: 5432 )
1843
- #
1844
- # # As a String
1845
- # PG::Connection.new( "dbname=test port=5432" )
1846
- #
1847
- # # As an Array
1848
- # PG::Connection.new( nil, 5432, nil, nil, 'test', nil, nil )
1849
- #
1850
- # # As an URI
1851
- # PG::Connection.new( "postgresql://user:pass@pgsql.example.com:5432/testdb?sslmode=require" )
1852
- #
1853
- # If the Ruby default internal encoding is set (i.e., <code>Encoding.default_internal != nil</code>), the
1854
- # connection will have its +client_encoding+ set accordingly.
1855
- #
1856
- # Raises a PG::Error if the connection fails.
1857
- #
1858
- # source://pg//lib/pg/connection.rb#771
1859
- def setdb(*args); end
1860
-
1861
- # call-seq:
1862
- # PG::Connection.new -> conn
1863
- # PG::Connection.new(connection_hash) -> conn
1864
- # PG::Connection.new(connection_string) -> conn
1865
- # PG::Connection.new(host, port, options, tty, dbname, user, password) -> conn
1866
- #
1867
- # Create a connection to the specified server.
1868
- #
1869
- # +connection_hash+ must be a ruby Hash with connection parameters.
1870
- # See the {list of valid parameters}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS] in the PostgreSQL documentation.
1871
- #
1872
- # There are two accepted formats for +connection_string+: plain <code>keyword = value</code> strings and URIs.
1873
- # See the documentation of {connection strings}[https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING].
1874
- #
1875
- # The positional parameter form has the same functionality except that the missing parameters will always take on default values. The parameters are:
1876
- # [+host+]
1877
- # server hostname
1878
- # [+port+]
1879
- # server port number
1880
- # [+options+]
1881
- # backend options
1882
- # [+tty+]
1883
- # (ignored in all versions of PostgreSQL)
1884
- # [+dbname+]
1885
- # connecting database name
1886
- # [+user+]
1887
- # login user name
1888
- # [+password+]
1889
- # login password
1890
- #
1891
- # Examples:
1892
- #
1893
- # # Connect using all defaults
1894
- # PG::Connection.new
1895
- #
1896
- # # As a Hash
1897
- # PG::Connection.new( dbname: 'test', port: 5432 )
1898
- #
1899
- # # As a String
1900
- # PG::Connection.new( "dbname=test port=5432" )
1901
- #
1902
- # # As an Array
1903
- # PG::Connection.new( nil, 5432, nil, nil, 'test', nil, nil )
1904
- #
1905
- # # As an URI
1906
- # PG::Connection.new( "postgresql://user:pass@pgsql.example.com:5432/testdb?sslmode=require" )
1907
- #
1908
- # If the Ruby default internal encoding is set (i.e., <code>Encoding.default_internal != nil</code>), the
1909
- # connection will have its +client_encoding+ set accordingly.
1910
- #
1911
- # Raises a PG::Error if the connection fails.
1912
- #
1913
- # source://pg//lib/pg/connection.rb#771
1914
- def setdblogin(*args); end
1915
-
1916
- def sync_connect(*_arg0); end
1917
- def sync_ping(*_arg0); end
1918
- def unescape_bytea(_arg0); end
1919
-
1920
- private
1921
-
1922
- # source://pg//lib/pg/connection.rb#823
1923
- def connect_to_hosts(*args); end
1924
-
1925
- # source://pg//lib/pg/connection.rb#848
1926
- def host_is_named_pipe?(host_string); end
1927
-
1928
- # source://pg//lib/pg/connection.rb#792
1929
- def resolve_hosts(iopts); end
1930
- end
1931
- end
1932
-
1933
- # source://pg//lib/pg/connection.rb#120
1934
- PG::Connection::BinarySignature = T.let(T.unsafe(nil), String)
1935
-
1936
- # The order the options are passed to the ::connect method.
1937
- #
1938
- # source://pg//lib/pg/connection.rb#33
1939
- PG::Connection::CONNECT_ARGUMENT_ORDER = T.let(T.unsafe(nil), Array)
1940
-
1941
- # Shareable program name for Ractor
1942
- #
1943
- # source://pg//lib/pg/connection.rb#49
1944
- PG::Connection::PROGRAM_NAME = T.let(T.unsafe(nil), String)
1945
-
1946
- class PG::ConnectionBad < ::PG::Error; end
1947
- class PG::ConnectionDoesNotExist < ::PG::ConnectionException; end
1948
- class PG::ConnectionException < ::PG::ServerError; end
1949
- class PG::ConnectionFailure < ::PG::ConnectionException; end
1950
- module PG::Constants; end
1951
- PG::Constants::CONNECTION_AUTH_OK = T.let(T.unsafe(nil), Integer)
1952
- PG::Constants::CONNECTION_AWAITING_RESPONSE = T.let(T.unsafe(nil), Integer)
1953
- PG::Constants::CONNECTION_BAD = T.let(T.unsafe(nil), Integer)
1954
- PG::Constants::CONNECTION_CHECK_STANDBY = T.let(T.unsafe(nil), Integer)
1955
- PG::Constants::CONNECTION_CHECK_TARGET = T.let(T.unsafe(nil), Integer)
1956
- PG::Constants::CONNECTION_CHECK_WRITABLE = T.let(T.unsafe(nil), Integer)
1957
- PG::Constants::CONNECTION_CONSUME = T.let(T.unsafe(nil), Integer)
1958
- PG::Constants::CONNECTION_GSS_STARTUP = T.let(T.unsafe(nil), Integer)
1959
- PG::Constants::CONNECTION_MADE = T.let(T.unsafe(nil), Integer)
1960
- PG::Constants::CONNECTION_NEEDED = T.let(T.unsafe(nil), Integer)
1961
- PG::Constants::CONNECTION_OK = T.let(T.unsafe(nil), Integer)
1962
- PG::Constants::CONNECTION_SETENV = T.let(T.unsafe(nil), Integer)
1963
- PG::Constants::CONNECTION_SSL_STARTUP = T.let(T.unsafe(nil), Integer)
1964
- PG::Constants::CONNECTION_STARTED = T.let(T.unsafe(nil), Integer)
1965
- PG::Constants::DEF_PGPORT = T.let(T.unsafe(nil), Integer)
1966
- PG::Constants::INVALID_OID = T.let(T.unsafe(nil), Integer)
1967
- PG::Constants::INV_READ = T.let(T.unsafe(nil), Integer)
1968
- PG::Constants::INV_WRITE = T.let(T.unsafe(nil), Integer)
1969
- PG::Constants::InvalidOid = T.let(T.unsafe(nil), Integer)
1970
- PG::Constants::PGRES_BAD_RESPONSE = T.let(T.unsafe(nil), Integer)
1971
- PG::Constants::PGRES_COMMAND_OK = T.let(T.unsafe(nil), Integer)
1972
- PG::Constants::PGRES_COPY_BOTH = T.let(T.unsafe(nil), Integer)
1973
- PG::Constants::PGRES_COPY_IN = T.let(T.unsafe(nil), Integer)
1974
- PG::Constants::PGRES_COPY_OUT = T.let(T.unsafe(nil), Integer)
1975
- PG::Constants::PGRES_EMPTY_QUERY = T.let(T.unsafe(nil), Integer)
1976
- PG::Constants::PGRES_FATAL_ERROR = T.let(T.unsafe(nil), Integer)
1977
- PG::Constants::PGRES_NONFATAL_ERROR = T.let(T.unsafe(nil), Integer)
1978
- PG::Constants::PGRES_PIPELINE_ABORTED = T.let(T.unsafe(nil), Integer)
1979
- PG::Constants::PGRES_PIPELINE_SYNC = T.let(T.unsafe(nil), Integer)
1980
- PG::Constants::PGRES_POLLING_FAILED = T.let(T.unsafe(nil), Integer)
1981
- PG::Constants::PGRES_POLLING_OK = T.let(T.unsafe(nil), Integer)
1982
- PG::Constants::PGRES_POLLING_READING = T.let(T.unsafe(nil), Integer)
1983
- PG::Constants::PGRES_POLLING_WRITING = T.let(T.unsafe(nil), Integer)
1984
- PG::Constants::PGRES_SINGLE_TUPLE = T.let(T.unsafe(nil), Integer)
1985
- PG::Constants::PGRES_TUPLES_OK = T.let(T.unsafe(nil), Integer)
1986
- PG::Constants::PG_DIAG_COLUMN_NAME = T.let(T.unsafe(nil), Integer)
1987
- PG::Constants::PG_DIAG_CONSTRAINT_NAME = T.let(T.unsafe(nil), Integer)
1988
- PG::Constants::PG_DIAG_CONTEXT = T.let(T.unsafe(nil), Integer)
1989
- PG::Constants::PG_DIAG_DATATYPE_NAME = T.let(T.unsafe(nil), Integer)
1990
- PG::Constants::PG_DIAG_INTERNAL_POSITION = T.let(T.unsafe(nil), Integer)
1991
- PG::Constants::PG_DIAG_INTERNAL_QUERY = T.let(T.unsafe(nil), Integer)
1992
- PG::Constants::PG_DIAG_MESSAGE_DETAIL = T.let(T.unsafe(nil), Integer)
1993
- PG::Constants::PG_DIAG_MESSAGE_HINT = T.let(T.unsafe(nil), Integer)
1994
- PG::Constants::PG_DIAG_MESSAGE_PRIMARY = T.let(T.unsafe(nil), Integer)
1995
- PG::Constants::PG_DIAG_SCHEMA_NAME = T.let(T.unsafe(nil), Integer)
1996
- PG::Constants::PG_DIAG_SEVERITY = T.let(T.unsafe(nil), Integer)
1997
- PG::Constants::PG_DIAG_SEVERITY_NONLOCALIZED = T.let(T.unsafe(nil), Integer)
1998
- PG::Constants::PG_DIAG_SOURCE_FILE = T.let(T.unsafe(nil), Integer)
1999
- PG::Constants::PG_DIAG_SOURCE_FUNCTION = T.let(T.unsafe(nil), Integer)
2000
- PG::Constants::PG_DIAG_SOURCE_LINE = T.let(T.unsafe(nil), Integer)
2001
- PG::Constants::PG_DIAG_SQLSTATE = T.let(T.unsafe(nil), Integer)
2002
- PG::Constants::PG_DIAG_STATEMENT_POSITION = T.let(T.unsafe(nil), Integer)
2003
- PG::Constants::PG_DIAG_TABLE_NAME = T.let(T.unsafe(nil), Integer)
2004
- PG::Constants::PQERRORS_DEFAULT = T.let(T.unsafe(nil), Integer)
2005
- PG::Constants::PQERRORS_SQLSTATE = T.let(T.unsafe(nil), Integer)
2006
- PG::Constants::PQERRORS_TERSE = T.let(T.unsafe(nil), Integer)
2007
- PG::Constants::PQERRORS_VERBOSE = T.let(T.unsafe(nil), Integer)
2008
- PG::Constants::PQPING_NO_ATTEMPT = T.let(T.unsafe(nil), Integer)
2009
- PG::Constants::PQPING_NO_RESPONSE = T.let(T.unsafe(nil), Integer)
2010
- PG::Constants::PQPING_OK = T.let(T.unsafe(nil), Integer)
2011
- PG::Constants::PQPING_REJECT = T.let(T.unsafe(nil), Integer)
2012
- PG::Constants::PQSHOW_CONTEXT_ALWAYS = T.let(T.unsafe(nil), Integer)
2013
- PG::Constants::PQSHOW_CONTEXT_ERRORS = T.let(T.unsafe(nil), Integer)
2014
- PG::Constants::PQSHOW_CONTEXT_NEVER = T.let(T.unsafe(nil), Integer)
2015
- PG::Constants::PQTRANS_ACTIVE = T.let(T.unsafe(nil), Integer)
2016
- PG::Constants::PQTRANS_IDLE = T.let(T.unsafe(nil), Integer)
2017
- PG::Constants::PQTRANS_INERROR = T.let(T.unsafe(nil), Integer)
2018
- PG::Constants::PQTRANS_INTRANS = T.let(T.unsafe(nil), Integer)
2019
- PG::Constants::PQTRANS_UNKNOWN = T.let(T.unsafe(nil), Integer)
2020
- PG::Constants::PQ_PIPELINE_ABORTED = T.let(T.unsafe(nil), Integer)
2021
- PG::Constants::PQ_PIPELINE_OFF = T.let(T.unsafe(nil), Integer)
2022
- PG::Constants::PQ_PIPELINE_ON = T.let(T.unsafe(nil), Integer)
2023
- PG::Constants::SEEK_CUR = T.let(T.unsafe(nil), Integer)
2024
- PG::Constants::SEEK_END = T.let(T.unsafe(nil), Integer)
2025
- PG::Constants::SEEK_SET = T.let(T.unsafe(nil), Integer)
2026
-
2027
- # source://pg//lib/pg/coder.rb#89
2028
- class PG::CopyCoder < ::PG::Coder
2029
- def delimiter; end
2030
- def delimiter=(_arg0); end
2031
- def null_string; end
2032
- def null_string=(_arg0); end
2033
-
2034
- # source://pg//lib/pg/coder.rb#90
2035
- def to_h; end
2036
-
2037
- def type_map; end
2038
- def type_map=(_arg0); end
2039
- end
2040
-
2041
- class PG::CopyDecoder < ::PG::CopyCoder; end
2042
- class PG::CopyEncoder < ::PG::CopyCoder; end
2043
- class PG::CrashShutdown < ::PG::OperatorIntervention; end
2044
- class PG::DataCorrupted < ::PG::InternalError; end
2045
- class PG::DataException < ::PG::ServerError; end
2046
- class PG::DatabaseDropped < ::PG::OperatorIntervention; end
2047
- class PG::DatatypeMismatch < ::PG::SyntaxErrorOrAccessRuleViolation; end
2048
- class PG::DatetimeFieldOverflow < ::PG::DataException; end
2049
- class PG::DependentObjectsStillExist < ::PG::DependentPrivilegeDescriptorsStillExist; end
2050
- class PG::DependentPrivilegeDescriptorsStillExist < ::PG::ServerError; end
2051
- class PG::DiagnosticsException < ::PG::ServerError; end
2052
- class PG::DiskFull < ::PG::InsufficientResources; end
2053
- class PG::DivisionByZero < ::PG::DataException; end
2054
- class PG::DuplicateAlias < ::PG::SyntaxErrorOrAccessRuleViolation; end
2055
- class PG::DuplicateColumn < ::PG::SyntaxErrorOrAccessRuleViolation; end
2056
- class PG::DuplicateCursor < ::PG::SyntaxErrorOrAccessRuleViolation; end
2057
- class PG::DuplicateDatabase < ::PG::SyntaxErrorOrAccessRuleViolation; end
2058
- class PG::DuplicateFile < ::PG::SystemError; end
2059
- class PG::DuplicateFunction < ::PG::SyntaxErrorOrAccessRuleViolation; end
2060
- class PG::DuplicateJsonObjectKeyValue < ::PG::DataException; end
2061
- class PG::DuplicateObject < ::PG::SyntaxErrorOrAccessRuleViolation; end
2062
- class PG::DuplicatePstatement < ::PG::SyntaxErrorOrAccessRuleViolation; end
2063
- class PG::DuplicateSchema < ::PG::SyntaxErrorOrAccessRuleViolation; end
2064
- class PG::DuplicateTable < ::PG::SyntaxErrorOrAccessRuleViolation; end
2065
- class PG::EREContainingSqlNotPermitted < ::PG::ExternalRoutineException; end
2066
- class PG::EREModifyingSqlDataNotPermitted < ::PG::ExternalRoutineException; end
2067
- class PG::EREProhibitedSqlStatementAttempted < ::PG::ExternalRoutineException; end
2068
- class PG::EREReadingSqlDataNotPermitted < ::PG::ExternalRoutineException; end
2069
- class PG::ERIEEventTriggerProtocolViolated < ::PG::ExternalRoutineInvocationException; end
2070
- class PG::ERIEInvalidSqlstateReturned < ::PG::ExternalRoutineInvocationException; end
2071
- class PG::ERIENullValueNotAllowed < ::PG::ExternalRoutineInvocationException; end
2072
- class PG::ERIESrfProtocolViolated < ::PG::ExternalRoutineInvocationException; end
2073
- class PG::ERIETriggerProtocolViolated < ::PG::ExternalRoutineInvocationException; end
2074
- PG::ERROR_CLASSES = T.let(T.unsafe(nil), Hash)
2075
-
2076
- # source://pg//lib/pg/exceptions.rb#9
2077
- class PG::Error < ::StandardError
2078
- # @return [Error] a new instance of Error
2079
- #
2080
- # source://pg//lib/pg/exceptions.rb#10
2081
- def initialize(msg = T.unsafe(nil), connection: T.unsafe(nil), result: T.unsafe(nil)); end
2082
-
2083
- def connection; end
2084
- def error; end
2085
- def result; end
2086
- end
2087
-
2088
- class PG::ErrorInAssignment < ::PG::DataException; end
2089
- class PG::EscapeCharacterConflict < ::PG::DataException; end
2090
- class PG::ExclusionViolation < ::PG::IntegrityConstraintViolation; end
2091
- class PG::ExternalRoutineException < ::PG::ServerError; end
2092
- class PG::ExternalRoutineInvocationException < ::PG::ServerError; end
2093
- class PG::FdwColumnNameNotFound < ::PG::FdwError; end
2094
- class PG::FdwDynamicParameterValueNeeded < ::PG::FdwError; end
2095
- class PG::FdwError < ::PG::ServerError; end
2096
- class PG::FdwFunctionSequenceError < ::PG::FdwError; end
2097
- class PG::FdwInconsistentDescriptorInformation < ::PG::FdwError; end
2098
- class PG::FdwInvalidAttributeValue < ::PG::FdwError; end
2099
- class PG::FdwInvalidColumnName < ::PG::FdwError; end
2100
- class PG::FdwInvalidColumnNumber < ::PG::FdwError; end
2101
- class PG::FdwInvalidDataType < ::PG::FdwError; end
2102
- class PG::FdwInvalidDataTypeDescriptors < ::PG::FdwError; end
2103
- class PG::FdwInvalidDescriptorFieldIdentifier < ::PG::FdwError; end
2104
- class PG::FdwInvalidHandle < ::PG::FdwError; end
2105
- class PG::FdwInvalidOptionIndex < ::PG::FdwError; end
2106
- class PG::FdwInvalidOptionName < ::PG::FdwError; end
2107
- class PG::FdwInvalidStringFormat < ::PG::FdwError; end
2108
- class PG::FdwInvalidStringLengthOrBufferLength < ::PG::FdwError; end
2109
- class PG::FdwInvalidUseOfNullPointer < ::PG::FdwError; end
2110
- class PG::FdwNoSchemas < ::PG::FdwError; end
2111
- class PG::FdwOptionNameNotFound < ::PG::FdwError; end
2112
- class PG::FdwOutOfMemory < ::PG::FdwError; end
2113
- class PG::FdwReplyHandle < ::PG::FdwError; end
2114
- class PG::FdwSchemaNotFound < ::PG::FdwError; end
2115
- class PG::FdwTableNotFound < ::PG::FdwError; end
2116
- class PG::FdwTooManyHandles < ::PG::FdwError; end
2117
- class PG::FdwUnableToCreateExecution < ::PG::FdwError; end
2118
- class PG::FdwUnableToCreateReply < ::PG::FdwError; end
2119
- class PG::FdwUnableToEstablishConnection < ::PG::FdwError; end
2120
- class PG::FeatureNotSupported < ::PG::ServerError; end
2121
- class PG::FloatingPointException < ::PG::DataException; end
2122
- class PG::ForeignKeyViolation < ::PG::IntegrityConstraintViolation; end
2123
- class PG::GeneratedAlways < ::PG::SyntaxErrorOrAccessRuleViolation; end
2124
- class PG::GroupingError < ::PG::SyntaxErrorOrAccessRuleViolation; end
2125
- class PG::HeldCursorRequiresSameIsolationLevel < ::PG::InvalidTransactionState; end
2126
- class PG::IdleInTransactionSessionTimeout < ::PG::InvalidTransactionState; end
2127
- class PG::IdleSessionTimeout < ::PG::OperatorIntervention; end
2128
- class PG::InFailedSqlTransaction < ::PG::InvalidTransactionState; end
2129
- class PG::InappropriateAccessModeForBranchTransaction < ::PG::InvalidTransactionState; end
2130
- class PG::InappropriateIsolationLevelForBranchTransaction < ::PG::InvalidTransactionState; end
2131
- class PG::IndeterminateCollation < ::PG::SyntaxErrorOrAccessRuleViolation; end
2132
- class PG::IndeterminateDatatype < ::PG::SyntaxErrorOrAccessRuleViolation; end
2133
- class PG::IndexCorrupted < ::PG::InternalError; end
2134
- class PG::IndicatorOverflow < ::PG::DataException; end
2135
- class PG::InsufficientPrivilege < ::PG::SyntaxErrorOrAccessRuleViolation; end
2136
- class PG::InsufficientResources < ::PG::ServerError; end
2137
- class PG::IntegrityConstraintViolation < ::PG::ServerError; end
2138
- class PG::InternalError < ::PG::ServerError; end
2139
- class PG::IntervalFieldOverflow < ::PG::DataException; end
2140
- class PG::InvalidArgumentForLog < ::PG::DataException; end
2141
- class PG::InvalidArgumentForNthValue < ::PG::DataException; end
2142
- class PG::InvalidArgumentForNtile < ::PG::DataException; end
2143
- class PG::InvalidArgumentForPowerFunction < ::PG::DataException; end
2144
- class PG::InvalidArgumentForSqlJsonDatetimeFunction < ::PG::DataException; end
2145
- class PG::InvalidArgumentForWidthBucketFunction < ::PG::DataException; end
2146
- class PG::InvalidAuthorizationSpecification < ::PG::ServerError; end
2147
- class PG::InvalidBinaryRepresentation < ::PG::DataException; end
2148
- class PG::InvalidCatalogName < ::PG::ServerError; end
2149
- class PG::InvalidChangeOfResultFields < ::PG::Error; end
2150
- class PG::InvalidCharacterValueForCast < ::PG::DataException; end
2151
- class PG::InvalidColumnDefinition < ::PG::SyntaxErrorOrAccessRuleViolation; end
2152
- class PG::InvalidColumnReference < ::PG::SyntaxErrorOrAccessRuleViolation; end
2153
- class PG::InvalidCursorDefinition < ::PG::SyntaxErrorOrAccessRuleViolation; end
2154
- class PG::InvalidCursorName < ::PG::ServerError; end
2155
- class PG::InvalidCursorState < ::PG::ServerError; end
2156
- class PG::InvalidDatabaseDefinition < ::PG::SyntaxErrorOrAccessRuleViolation; end
2157
- class PG::InvalidDatetimeFormat < ::PG::DataException; end
2158
- class PG::InvalidEscapeCharacter < ::PG::DataException; end
2159
- class PG::InvalidEscapeOctet < ::PG::DataException; end
2160
- class PG::InvalidEscapeSequence < ::PG::DataException; end
2161
- class PG::InvalidForeignKey < ::PG::SyntaxErrorOrAccessRuleViolation; end
2162
- class PG::InvalidFunctionDefinition < ::PG::SyntaxErrorOrAccessRuleViolation; end
2163
- class PG::InvalidGrantOperation < ::PG::InvalidGrantor; end
2164
- class PG::InvalidGrantor < ::PG::ServerError; end
2165
- class PG::InvalidIndicatorParameterValue < ::PG::DataException; end
2166
- class PG::InvalidJsonText < ::PG::DataException; end
2167
- class PG::InvalidName < ::PG::SyntaxErrorOrAccessRuleViolation; end
2168
- class PG::InvalidObjectDefinition < ::PG::SyntaxErrorOrAccessRuleViolation; end
2169
- class PG::InvalidParameterValue < ::PG::DataException; end
2170
- class PG::InvalidPassword < ::PG::InvalidAuthorizationSpecification; end
2171
- class PG::InvalidPrecedingOrFollowingSize < ::PG::DataException; end
2172
- class PG::InvalidPstatementDefinition < ::PG::SyntaxErrorOrAccessRuleViolation; end
2173
- class PG::InvalidRecursion < ::PG::SyntaxErrorOrAccessRuleViolation; end
2174
- class PG::InvalidRegularExpression < ::PG::DataException; end
2175
- class PG::InvalidResultStatus < ::PG::Error; end
2176
- class PG::InvalidRoleSpecification < ::PG::ServerError; end
2177
- class PG::InvalidRowCountInLimitClause < ::PG::DataException; end
2178
- class PG::InvalidRowCountInResultOffsetClause < ::PG::DataException; end
2179
- class PG::InvalidSchemaDefinition < ::PG::SyntaxErrorOrAccessRuleViolation; end
2180
- class PG::InvalidSchemaName < ::PG::ServerError; end
2181
- class PG::InvalidSqlJsonSubscript < ::PG::DataException; end
2182
- class PG::InvalidSqlStatementName < ::PG::ServerError; end
2183
- class PG::InvalidTableDefinition < ::PG::SyntaxErrorOrAccessRuleViolation; end
2184
- class PG::InvalidTablesampleArgument < ::PG::DataException; end
2185
- class PG::InvalidTablesampleRepeat < ::PG::DataException; end
2186
- class PG::InvalidTextRepresentation < ::PG::DataException; end
2187
- class PG::InvalidTimeZoneDisplacementValue < ::PG::DataException; end
2188
- class PG::InvalidTransactionInitiation < ::PG::ServerError; end
2189
- class PG::InvalidTransactionState < ::PG::ServerError; end
2190
- class PG::InvalidTransactionTermination < ::PG::ServerError; end
2191
- class PG::InvalidUseOfEscapeCharacter < ::PG::DataException; end
2192
- class PG::InvalidXmlComment < ::PG::DataException; end
2193
- class PG::InvalidXmlContent < ::PG::DataException; end
2194
- class PG::InvalidXmlDocument < ::PG::DataException; end
2195
- class PG::InvalidXmlProcessingInstruction < ::PG::DataException; end
2196
- class PG::IoError < ::PG::SystemError; end
2197
- class PG::LEInvalidSpecification < ::PG::LocatorException; end
2198
- class PG::LocatorException < ::PG::ServerError; end
2199
- class PG::LockFileExists < ::PG::ConfigFileError; end
2200
- class PG::LockNotAvailable < ::PG::ObjectNotInPrerequisiteState; end
2201
-
2202
- # source://pg//lib/pg/exceptions.rb#19
2203
- class PG::LostCopyState < ::PG::Error; end
2204
-
2205
- class PG::MoreThanOneSqlJsonItem < ::PG::DataException; end
2206
- class PG::MostSpecificTypeMismatch < ::PG::DataException; end
2207
- class PG::NameTooLong < ::PG::SyntaxErrorOrAccessRuleViolation; end
2208
- class PG::NoActiveSqlTransaction < ::PG::InvalidTransactionState; end
2209
- class PG::NoActiveSqlTransactionForBranchTransaction < ::PG::InvalidTransactionState; end
2210
- class PG::NoDataFound < ::PG::PlpgsqlError; end
2211
- class PG::NoResultError < ::PG::Error; end
2212
- class PG::NoSqlJsonItem < ::PG::DataException; end
2213
- class PG::NonNumericSqlJsonItem < ::PG::DataException; end
2214
- class PG::NonUniqueKeysInAJsonObject < ::PG::DataException; end
2215
- class PG::NonstandardUseOfEscapeCharacter < ::PG::DataException; end
2216
-
2217
- # source://pg//lib/pg/exceptions.rb#17
2218
- class PG::NotAllCopyDataRetrieved < ::PG::Error; end
2219
-
2220
- class PG::NotAnXmlDocument < ::PG::DataException; end
2221
-
2222
- # source://pg//lib/pg/exceptions.rb#21
2223
- class PG::NotInBlockingMode < ::PG::Error; end
2224
-
2225
- class PG::NotNullViolation < ::PG::IntegrityConstraintViolation; end
2226
- class PG::NullValueNoIndicatorParameter < ::PG::DataException; end
2227
- class PG::NullValueNotAllowed < ::PG::DataException; end
2228
- class PG::NumericValueOutOfRange < ::PG::DataException; end
2229
- class PG::ObjectInUse < ::PG::ObjectNotInPrerequisiteState; end
2230
- class PG::ObjectNotInPrerequisiteState < ::PG::ServerError; end
2231
- class PG::OperatorIntervention < ::PG::ServerError; end
2232
- class PG::OutOfMemory < ::PG::InsufficientResources; end
2233
-
2234
- # source://pg//lib/pg/postgresql_lib_path.rb#2
2235
- PG::POSTGRESQL_LIB_PATH = T.let(T.unsafe(nil), String)
2236
-
2237
- class PG::PlpgsqlError < ::PG::ServerError; end
2238
- class PG::ProgramLimitExceeded < ::PG::ServerError; end
2239
- class PG::ProtocolViolation < ::PG::ConnectionException; end
2240
- class PG::QueryCanceled < ::PG::OperatorIntervention; end
2241
- class PG::RaiseException < ::PG::PlpgsqlError; end
2242
- class PG::ReadOnlySqlTransaction < ::PG::InvalidTransactionState; end
2243
-
2244
- # source://pg//lib/pg/coder.rb#99
2245
- class PG::RecordCoder < ::PG::Coder
2246
- # source://pg//lib/pg/coder.rb#100
2247
- def to_h; end
2248
-
2249
- def type_map; end
2250
- def type_map=(_arg0); end
2251
- end
2252
-
2253
- class PG::RecordDecoder < ::PG::RecordCoder; end
2254
- class PG::RecordEncoder < ::PG::RecordCoder; end
2255
- class PG::ReservedName < ::PG::SyntaxErrorOrAccessRuleViolation; end
2256
- class PG::RestrictViolation < ::PG::IntegrityConstraintViolation; end
2257
-
2258
- # source://pg//lib/pg/result.rb#7
2259
- class PG::Result
2260
- include ::Enumerable
2261
- include ::PG::Constants
2262
-
2263
- def [](_arg0); end
2264
- def autoclear?; end
2265
- def binary_tuples; end
2266
- def check; end
2267
- def check_result; end
2268
- def clear; end
2269
- def cleared?; end
2270
- def cmd_status; end
2271
- def cmd_tuples; end
2272
- def cmdtuples; end
2273
- def column_values(_arg0); end
2274
- def each; end
2275
- def each_row; end
2276
- def error_field(_arg0); end
2277
- def error_message; end
2278
- def fformat(_arg0); end
2279
- def field_name_type; end
2280
- def field_name_type=(_arg0); end
2281
-
2282
- # Set the data type for all field name returning methods.
2283
- #
2284
- # +type+: a Symbol defining the field name type.
2285
- #
2286
- # This method is equal to #field_name_type= , but returns self, so that calls can be chained.
2287
- #
2288
- # source://pg//lib/pg/result.rb#26
2289
- def field_names_as(type); end
2290
-
2291
- def field_values(_arg0); end
2292
- def fields; end
2293
- def fmod(_arg0); end
2294
- def fname(_arg0); end
2295
- def fnumber(_arg0); end
2296
- def freeze; end
2297
- def fsize(_arg0); end
2298
- def ftable(_arg0); end
2299
- def ftablecol(_arg0); end
2300
- def ftype(_arg0); end
2301
- def getisnull(_arg0, _arg1); end
2302
- def getlength(_arg0, _arg1); end
2303
- def getvalue(_arg0, _arg1); end
2304
-
2305
- # Return a String representation of the object suitable for debugging.
2306
- #
2307
- # source://pg//lib/pg/result.rb#32
2308
- def inspect; end
2309
-
2310
- # Apply a type map for all value retrieving methods.
2311
- #
2312
- # +type_map+: a PG::TypeMap instance.
2313
- #
2314
- # This method is equal to #type_map= , but returns self, so that calls can be chained.
2315
- #
2316
- # See also PG::BasicTypeMapForResults
2317
- #
2318
- # source://pg//lib/pg/result.rb#16
2319
- def map_types!(type_map); end
2320
-
2321
- def nfields; end
2322
- def nparams; end
2323
- def ntuples; end
2324
- def num_fields; end
2325
- def num_tuples; end
2326
- def oid_value; end
2327
- def paramtype(_arg0); end
2328
- def res_status(*_arg0); end
2329
- def result_error_field(_arg0); end
2330
- def result_error_message; end
2331
- def result_status; end
2332
- def result_verbose_error_message(_arg0, _arg1); end
2333
- def stream_each; end
2334
- def stream_each_row; end
2335
- def stream_each_tuple; end
2336
- def tuple(_arg0); end
2337
- def tuple_values(_arg0); end
2338
- def type_map; end
2339
- def type_map=(_arg0); end
2340
- def values; end
2341
- def verbose_error_message(_arg0, _arg1); end
2342
-
2343
- class << self
2344
- def res_status(_arg0); end
2345
- end
2346
- end
2347
-
2348
- # PG::Connection#transaction uses this exception to distinguish a deliberate rollback from other exceptional situations.
2349
- # Normally, raising an exception will cause the .transaction method to rollback the database transaction and pass on the exception.
2350
- # But if you raise an PG::RollbackTransaction exception, then the database transaction will be rolled back, without passing on the exception.
2351
- #
2352
- # source://pg//lib/pg/exceptions.rb#27
2353
- class PG::RollbackTransaction < ::StandardError; end
2354
-
2355
- class PG::SEInvalidSpecification < ::PG::SavepointException; end
2356
- class PG::SREFunctionExecutedNoReturnStatement < ::PG::SqlRoutineException; end
2357
- class PG::SREModifyingSqlDataNotPermitted < ::PG::SqlRoutineException; end
2358
- class PG::SREProhibitedSqlStatementAttempted < ::PG::SqlRoutineException; end
2359
- class PG::SREReadingSqlDataNotPermitted < ::PG::SqlRoutineException; end
2360
- class PG::SavepointException < ::PG::ServerError; end
2361
- class PG::SchemaAndDataStatementMixingNotSupported < ::PG::InvalidTransactionState; end
2362
- class PG::SequenceGeneratorLimitExceeded < ::PG::DataException; end
2363
- class PG::ServerError < ::PG::Error; end
2364
- class PG::SimpleCoder < ::PG::Coder; end
2365
- class PG::SimpleDecoder < ::PG::SimpleCoder; end
2366
- class PG::SimpleEncoder < ::PG::SimpleCoder; end
2367
- class PG::SingletonSqlJsonItemRequired < ::PG::DataException; end
2368
- class PG::SqlJsonArrayNotFound < ::PG::DataException; end
2369
- class PG::SqlJsonItemCannotBeCastToTargetType < ::PG::DataException; end
2370
- class PG::SqlJsonMemberNotFound < ::PG::DataException; end
2371
- class PG::SqlJsonNumberNotFound < ::PG::DataException; end
2372
- class PG::SqlJsonObjectNotFound < ::PG::DataException; end
2373
- class PG::SqlJsonScalarRequired < ::PG::DataException; end
2374
- class PG::SqlRoutineException < ::PG::ServerError; end
2375
- class PG::SqlStatementNotYetComplete < ::PG::ServerError; end
2376
- class PG::SqlclientUnableToEstablishSqlconnection < ::PG::ConnectionException; end
2377
- class PG::SqlserverRejectedEstablishmentOfSqlconnection < ::PG::ConnectionException; end
2378
- class PG::StackedDiagnosticsAccessedWithoutActiveHandler < ::PG::DiagnosticsException; end
2379
- class PG::StatementTooComplex < ::PG::ProgramLimitExceeded; end
2380
- class PG::StringDataLengthMismatch < ::PG::DataException; end
2381
- class PG::StringDataRightTruncation < ::PG::DataException; end
2382
- class PG::SubstringError < ::PG::DataException; end
2383
- class PG::SyntaxError < ::PG::SyntaxErrorOrAccessRuleViolation; end
2384
- class PG::SyntaxErrorOrAccessRuleViolation < ::PG::ServerError; end
2385
- class PG::SystemError < ::PG::ServerError; end
2386
- class PG::TRDeadlockDetected < ::PG::TransactionRollback; end
2387
- class PG::TRIntegrityConstraintViolation < ::PG::TransactionRollback; end
2388
- class PG::TRSerializationFailure < ::PG::TransactionRollback; end
2389
- class PG::TRStatementCompletionUnknown < ::PG::TransactionRollback; end
2390
-
2391
- # source://pg//lib/pg.rb#87
2392
- module PG::TextDecoder
2393
- class << self
2394
- private
2395
-
2396
- def init_inet; end
2397
- def init_numeric; end
2398
- end
2399
- end
2400
-
2401
- class PG::TextDecoder::Array < ::PG::CompositeDecoder
2402
- def decode(*_arg0); end
2403
- end
2404
-
2405
- PG::TextDecoder::Array::CFUNC = T.let(T.unsafe(nil), Object)
2406
-
2407
- class PG::TextDecoder::Boolean < ::PG::SimpleDecoder
2408
- def decode(*_arg0); end
2409
- end
2410
-
2411
- PG::TextDecoder::Boolean::CFUNC = T.let(T.unsafe(nil), Object)
2412
-
2413
- class PG::TextDecoder::Bytea < ::PG::SimpleDecoder
2414
- def decode(*_arg0); end
2415
- end
2416
-
2417
- PG::TextDecoder::Bytea::CFUNC = T.let(T.unsafe(nil), Object)
2418
-
2419
- class PG::TextDecoder::CopyRow < ::PG::CopyDecoder
2420
- include ::PG::Coder::BinaryFormatting
2421
-
2422
- def decode(*_arg0); end
2423
- end
2424
-
2425
- PG::TextDecoder::CopyRow::CFUNC = T.let(T.unsafe(nil), Object)
2426
-
2427
- # This is a decoder class for conversion of PostgreSQL date type to Ruby Date values.
2428
- #
2429
- # As soon as this class is used, it requires the ruby standard library 'date'.
2430
- #
2431
- # source://pg//lib/pg/text_decoder/date.rb#11
2432
- class PG::TextDecoder::Date < ::PG::SimpleDecoder
2433
- # source://pg//lib/pg/text_decoder/date.rb#12
2434
- def decode(string, tuple = T.unsafe(nil), field = T.unsafe(nil)); end
2435
- end
2436
-
2437
- class PG::TextDecoder::Float < ::PG::SimpleDecoder
2438
- def decode(*_arg0); end
2439
- end
2440
-
2441
- PG::TextDecoder::Float::CFUNC = T.let(T.unsafe(nil), Object)
2442
-
2443
- class PG::TextDecoder::FromBase64 < ::PG::CompositeDecoder
2444
- def decode(*_arg0); end
2445
- end
2446
-
2447
- PG::TextDecoder::FromBase64::CFUNC = T.let(T.unsafe(nil), Object)
2448
-
2449
- class PG::TextDecoder::Identifier < ::PG::SimpleDecoder
2450
- def decode(*_arg0); end
2451
- end
2452
-
2453
- PG::TextDecoder::Identifier::CFUNC = T.let(T.unsafe(nil), Object)
2454
-
2455
- class PG::TextDecoder::Inet < ::PG::SimpleDecoder
2456
- def decode(*_arg0); end
2457
- end
2458
-
2459
- # source://pg//lib/pg/text_decoder/inet.rb#7
2460
- PG::TextDecoder::Inet::CFUNC = T.let(T.unsafe(nil), Object)
2461
-
2462
- class PG::TextDecoder::Integer < ::PG::SimpleDecoder
2463
- def decode(*_arg0); end
2464
- end
2465
-
2466
- PG::TextDecoder::Integer::CFUNC = T.let(T.unsafe(nil), Object)
2467
-
2468
- # This is a decoder class for conversion of PostgreSQL JSON/JSONB type to Ruby Hash, Array, String, Numeric, nil values.
2469
- #
2470
- # As soon as this class is used, it requires the ruby standard library 'json'.
2471
- #
2472
- # source://pg//lib/pg/text_decoder/json.rb#11
2473
- class PG::TextDecoder::JSON < ::PG::SimpleDecoder
2474
- # source://pg//lib/pg/text_decoder/json.rb#12
2475
- def decode(string, tuple = T.unsafe(nil), field = T.unsafe(nil)); end
2476
- end
2477
-
2478
- class PG::TextDecoder::Numeric < ::PG::SimpleDecoder
2479
- def decode(*_arg0); end
2480
- end
2481
-
2482
- # source://pg//lib/pg/text_decoder/numeric.rb#7
2483
- PG::TextDecoder::Numeric::CFUNC = T.let(T.unsafe(nil), Object)
2484
-
2485
- class PG::TextDecoder::Record < ::PG::RecordDecoder
2486
- def decode(*_arg0); end
2487
- end
2488
-
2489
- PG::TextDecoder::Record::CFUNC = T.let(T.unsafe(nil), Object)
2490
-
2491
- class PG::TextDecoder::String < ::PG::SimpleDecoder
2492
- def decode(*_arg0); end
2493
- end
2494
-
2495
- PG::TextDecoder::String::CFUNC = T.let(T.unsafe(nil), Object)
2496
-
2497
- class PG::TextDecoder::Timestamp < ::PG::SimpleDecoder
2498
- def decode(*_arg0); end
2499
- end
2500
-
2501
- PG::TextDecoder::Timestamp::CFUNC = T.let(T.unsafe(nil), Object)
2502
-
2503
- # source://pg//lib/pg/text_decoder/timestamp.rb#19
2504
- class PG::TextDecoder::TimestampLocal < ::PG::TextDecoder::Timestamp
2505
- # @return [TimestampLocal] a new instance of TimestampLocal
2506
- #
2507
- # source://pg//lib/pg/text_decoder/timestamp.rb#20
2508
- def initialize(hash = T.unsafe(nil), **kwargs); end
2509
- end
2510
-
2511
- # Convenience classes for timezone options
2512
- #
2513
- # source://pg//lib/pg/text_decoder/timestamp.rb#7
2514
- class PG::TextDecoder::TimestampUtc < ::PG::TextDecoder::Timestamp
2515
- # @return [TimestampUtc] a new instance of TimestampUtc
2516
- #
2517
- # source://pg//lib/pg/text_decoder/timestamp.rb#8
2518
- def initialize(hash = T.unsafe(nil), **kwargs); end
2519
- end
2520
-
2521
- # source://pg//lib/pg/text_decoder/timestamp.rb#13
2522
- class PG::TextDecoder::TimestampUtcToLocal < ::PG::TextDecoder::Timestamp
2523
- # @return [TimestampUtcToLocal] a new instance of TimestampUtcToLocal
2524
- #
2525
- # source://pg//lib/pg/text_decoder/timestamp.rb#14
2526
- def initialize(hash = T.unsafe(nil), **kwargs); end
2527
- end
2528
-
2529
- # source://pg//lib/pg/text_decoder/timestamp.rb#28
2530
- PG::TextDecoder::TimestampWithTimeZone = PG::TextDecoder::Timestamp
2531
-
2532
- # For backward compatibility:
2533
- #
2534
- # source://pg//lib/pg/text_decoder/timestamp.rb#27
2535
- PG::TextDecoder::TimestampWithoutTimeZone = PG::TextDecoder::TimestampLocal
2536
-
2537
- # source://pg//lib/pg.rb#96
2538
- module PG::TextEncoder
2539
- class << self
2540
- private
2541
-
2542
- def init_numeric; end
2543
- end
2544
- end
2545
-
2546
- class PG::TextEncoder::Array < ::PG::CompositeEncoder
2547
- def encode(*_arg0); end
2548
- end
2549
-
2550
- PG::TextEncoder::Array::CFUNC = T.let(T.unsafe(nil), Object)
2551
-
2552
- class PG::TextEncoder::Boolean < ::PG::SimpleEncoder
2553
- def encode(*_arg0); end
2554
- end
2555
-
2556
- PG::TextEncoder::Boolean::CFUNC = T.let(T.unsafe(nil), Object)
2557
-
2558
- class PG::TextEncoder::Bytea < ::PG::SimpleEncoder
2559
- def encode(*_arg0); end
2560
- end
2561
-
2562
- PG::TextEncoder::Bytea::CFUNC = T.let(T.unsafe(nil), Object)
2563
-
2564
- class PG::TextEncoder::CopyRow < ::PG::CopyEncoder
2565
- include ::PG::Coder::BinaryFormatting
2566
-
2567
- def encode(*_arg0); end
2568
- end
2569
-
2570
- PG::TextEncoder::CopyRow::CFUNC = T.let(T.unsafe(nil), Object)
2571
-
2572
- # This is a encoder class for conversion of Ruby Date values to PostgreSQL date type.
2573
- #
2574
- # source://pg//lib/pg/text_encoder/date.rb#7
2575
- class PG::TextEncoder::Date < ::PG::SimpleEncoder
2576
- # source://pg//lib/pg/text_encoder/date.rb#8
2577
- def encode(value); end
2578
- end
2579
-
2580
- class PG::TextEncoder::Float < ::PG::SimpleEncoder
2581
- def encode(*_arg0); end
2582
- end
2583
-
2584
- PG::TextEncoder::Float::CFUNC = T.let(T.unsafe(nil), Object)
2585
-
2586
- class PG::TextEncoder::Identifier < ::PG::SimpleEncoder
2587
- def encode(*_arg0); end
2588
- end
2589
-
2590
- PG::TextEncoder::Identifier::CFUNC = T.let(T.unsafe(nil), Object)
2591
-
2592
- # This is a encoder class for conversion of Ruby IPAddr values to PostgreSQL inet type.
2593
- #
2594
- # As soon as this class is used, it requires the ruby standard library 'ipaddr'.
2595
- #
2596
- # source://pg//lib/pg/text_encoder/inet.rb#11
2597
- class PG::TextEncoder::Inet < ::PG::SimpleEncoder
2598
- # source://pg//lib/pg/text_encoder/inet.rb#12
2599
- def encode(value); end
2600
- end
2601
-
2602
- class PG::TextEncoder::Integer < ::PG::SimpleEncoder
2603
- def encode(*_arg0); end
2604
- end
2605
-
2606
- PG::TextEncoder::Integer::CFUNC = T.let(T.unsafe(nil), Object)
2607
-
2608
- # This is a encoder class for conversion of Ruby Hash, Array, String, Numeric, nil values to PostgreSQL JSON/JSONB type.
2609
- #
2610
- # As soon as this class is used, it requires the ruby standard library 'json'.
2611
- #
2612
- # source://pg//lib/pg/text_encoder/json.rb#11
2613
- class PG::TextEncoder::JSON < ::PG::SimpleEncoder
2614
- # source://pg//lib/pg/text_encoder/json.rb#12
2615
- def encode(value); end
2616
- end
2617
-
2618
- class PG::TextEncoder::Numeric < ::PG::SimpleEncoder
2619
- def encode(*_arg0); end
2620
- end
2621
-
2622
- # source://pg//lib/pg/text_encoder/numeric.rb#7
2623
- PG::TextEncoder::Numeric::CFUNC = T.let(T.unsafe(nil), Object)
2624
-
2625
- class PG::TextEncoder::QuotedLiteral < ::PG::CompositeEncoder
2626
- def encode(*_arg0); end
2627
- end
2628
-
2629
- PG::TextEncoder::QuotedLiteral::CFUNC = T.let(T.unsafe(nil), Object)
2630
-
2631
- class PG::TextEncoder::Record < ::PG::RecordEncoder
2632
- def encode(*_arg0); end
2633
- end
2634
-
2635
- PG::TextEncoder::Record::CFUNC = T.let(T.unsafe(nil), Object)
2636
-
2637
- class PG::TextEncoder::String < ::PG::SimpleEncoder
2638
- def encode(*_arg0); end
2639
- end
2640
-
2641
- PG::TextEncoder::String::CFUNC = T.let(T.unsafe(nil), Object)
2642
-
2643
- # source://pg//lib/pg/text_encoder/timestamp.rb#12
2644
- class PG::TextEncoder::TimestampUtc < ::PG::SimpleEncoder
2645
- # source://pg//lib/pg/text_encoder/timestamp.rb#13
2646
- def encode(value); end
2647
- end
2648
-
2649
- # source://pg//lib/pg/text_encoder/timestamp.rb#18
2650
- class PG::TextEncoder::TimestampWithTimeZone < ::PG::SimpleEncoder
2651
- # source://pg//lib/pg/text_encoder/timestamp.rb#19
2652
- def encode(value); end
2653
- end
2654
-
2655
- # source://pg//lib/pg/text_encoder/timestamp.rb#6
2656
- class PG::TextEncoder::TimestampWithoutTimeZone < ::PG::SimpleEncoder
2657
- # source://pg//lib/pg/text_encoder/timestamp.rb#7
2658
- def encode(value); end
2659
- end
2660
-
2661
- class PG::TextEncoder::ToBase64 < ::PG::CompositeEncoder
2662
- def encode(*_arg0); end
2663
- end
2664
-
2665
- PG::TextEncoder::ToBase64::CFUNC = T.let(T.unsafe(nil), Object)
2666
- class PG::TooManyArguments < ::PG::ProgramLimitExceeded; end
2667
- class PG::TooManyColumns < ::PG::ProgramLimitExceeded; end
2668
- class PG::TooManyConnections < ::PG::InsufficientResources; end
2669
- class PG::TooManyJsonArrayElements < ::PG::DataException; end
2670
- class PG::TooManyJsonObjectMembers < ::PG::DataException; end
2671
- class PG::TooManyRows < ::PG::PlpgsqlError; end
2672
- class PG::TransactionResolutionUnknown < ::PG::ConnectionException; end
2673
- class PG::TransactionRollback < ::PG::ServerError; end
2674
- class PG::TransactionTimeout < ::PG::InvalidTransactionState; end
2675
- class PG::TriggeredActionException < ::PG::ServerError; end
2676
- class PG::TriggeredDataChangeViolation < ::PG::ServerError; end
2677
- class PG::TrimError < ::PG::DataException; end
2678
-
2679
- # source://pg//lib/pg/tuple.rb#7
2680
- class PG::Tuple
2681
- include ::Enumerable
2682
-
2683
- def [](_arg0); end
2684
- def each; end
2685
-
2686
- # source://pg//lib/pg/tuple.rb#23
2687
- def each_key(&block); end
2688
-
2689
- def each_value; end
2690
- def fetch(*_arg0); end
2691
-
2692
- # @return [Boolean]
2693
- #
2694
- # source://pg//lib/pg/tuple.rb#14
2695
- def has_key?(key); end
2696
-
2697
- def index(_arg0); end
2698
-
2699
- # Return a String representation of the object suitable for debugging.
2700
- #
2701
- # source://pg//lib/pg/tuple.rb#10
2702
- def inspect; end
2703
-
2704
- # @return [Boolean]
2705
- #
2706
- # source://pg//lib/pg/tuple.rb#14
2707
- def key?(key); end
2708
-
2709
- # source://pg//lib/pg/tuple.rb#19
2710
- def keys; end
2711
-
2712
- def length; end
2713
- def size; end
2714
- def values; end
2715
-
2716
- private
2717
-
2718
- def field_map; end
2719
- def field_names; end
2720
- def marshal_dump; end
2721
- def marshal_load(_arg0); end
2722
- end
2723
-
2724
- class PG::TypeMap; end
2725
-
2726
- module PG::TypeMap::DefaultTypeMappable
2727
- def default_type_map; end
2728
- def default_type_map=(_arg0); end
2729
- def with_default_type_map(_arg0); end
2730
- end
2731
-
2732
- class PG::TypeMapAllStrings < ::PG::TypeMap; end
2733
-
2734
- class PG::TypeMapByClass < ::PG::TypeMap
2735
- include ::PG::TypeMap::DefaultTypeMappable
2736
-
2737
- def [](_arg0); end
2738
- def []=(_arg0, _arg1); end
2739
- def coders; end
2740
- end
2741
-
2742
- # source://pg//lib/pg/type_map_by_column.rb#6
2743
- class PG::TypeMapByColumn < ::PG::TypeMap
2744
- include ::PG::TypeMap::DefaultTypeMappable
2745
-
2746
- def initialize(_arg0); end
2747
-
2748
- def coders; end
2749
-
2750
- # source://pg//lib/pg/type_map_by_column.rb#12
2751
- def inspect; end
2752
-
2753
- # Returns the type oids of the assigned coders.
2754
- #
2755
- # source://pg//lib/pg/type_map_by_column.rb#8
2756
- def oids; end
2757
- end
2758
-
2759
- class PG::TypeMapByMriType < ::PG::TypeMap
2760
- include ::PG::TypeMap::DefaultTypeMappable
2761
-
2762
- def [](_arg0); end
2763
- def []=(_arg0, _arg1); end
2764
- def coders; end
2765
- end
2766
-
2767
- class PG::TypeMapByOid < ::PG::TypeMap
2768
- include ::PG::TypeMap::DefaultTypeMappable
2769
-
2770
- def add_coder(_arg0); end
2771
- def build_column_map(_arg0); end
2772
- def coders; end
2773
- def max_rows_for_online_lookup; end
2774
- def max_rows_for_online_lookup=(_arg0); end
2775
- def rm_coder(_arg0, _arg1); end
2776
- end
2777
-
2778
- class PG::TypeMapInRuby < ::PG::TypeMap
2779
- include ::PG::TypeMap::DefaultTypeMappable
2780
-
2781
- def typecast_copy_get(_arg0, _arg1, _arg2, _arg3); end
2782
- def typecast_query_param(_arg0, _arg1); end
2783
- def typecast_result_value(_arg0, _arg1, _arg2); end
2784
- end
2785
-
2786
- class PG::UnableToSend < ::PG::Error; end
2787
- class PG::UndefinedColumn < ::PG::SyntaxErrorOrAccessRuleViolation; end
2788
- class PG::UndefinedFile < ::PG::SystemError; end
2789
- class PG::UndefinedFunction < ::PG::SyntaxErrorOrAccessRuleViolation; end
2790
- class PG::UndefinedObject < ::PG::SyntaxErrorOrAccessRuleViolation; end
2791
- class PG::UndefinedParameter < ::PG::SyntaxErrorOrAccessRuleViolation; end
2792
- class PG::UndefinedTable < ::PG::SyntaxErrorOrAccessRuleViolation; end
2793
- class PG::UniqueViolation < ::PG::IntegrityConstraintViolation; end
2794
- class PG::UnsafeNewEnumValueUsage < ::PG::ObjectNotInPrerequisiteState; end
2795
- class PG::UnterminatedCString < ::PG::DataException; end
2796
- class PG::UntranslatableCharacter < ::PG::DataException; end
2797
-
2798
- # Library version
2799
- #
2800
- # source://pg//lib/pg/version.rb#3
2801
- PG::VERSION = T.let(T.unsafe(nil), String)
2802
-
2803
- class PG::WindowingError < ::PG::SyntaxErrorOrAccessRuleViolation; end
2804
- class PG::WithCheckOptionViolation < ::PG::ServerError; end
2805
- class PG::WrongObjectType < ::PG::SyntaxErrorOrAccessRuleViolation; end
2806
- class PG::ZeroLengthCharacterString < ::PG::DataException; end