questdb 0.1.0-aarch64-linux-gnu

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 (51) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +22 -0
  3. data/LICENSE.txt +201 -0
  4. data/README.md +170 -0
  5. data/SECURITY.md +19 -0
  6. data/THIRD_PARTY_NOTICES.md +242 -0
  7. data/docs/arrow.md +89 -0
  8. data/docs/configuration.md +61 -0
  9. data/docs/design.md +46 -0
  10. data/docs/ingestion.md +96 -0
  11. data/docs/performance.md +36 -0
  12. data/docs/python-parity.md +34 -0
  13. data/docs/querying.md +54 -0
  14. data/docs/release-infrastructure.md +70 -0
  15. data/docs/releasing.md +47 -0
  16. data/docs/troubleshooting.md +41 -0
  17. data/examples/basic.rb +32 -0
  18. data/examples/callbacks.rb +46 -0
  19. data/examples/columnar.rb +41 -0
  20. data/examples/independent_buffer.rb +39 -0
  21. data/examples/query.rb +28 -0
  22. data/examples/standalone.rb +33 -0
  23. data/examples/tls_auth.rb +33 -0
  24. data/lib/questdb/arrow.rb +250 -0
  25. data/lib/questdb/client.rb +308 -0
  26. data/lib/questdb/column_vector.rb +91 -0
  27. data/lib/questdb/config.rb +161 -0
  28. data/lib/questdb/connection_event.rb +60 -0
  29. data/lib/questdb/direct_ingestion.rb +440 -0
  30. data/lib/questdb/event_inbox.rb +60 -0
  31. data/lib/questdb/ingress/buffer.rb +104 -0
  32. data/lib/questdb/ingress/error.rb +43 -0
  33. data/lib/questdb/ingress/float64_array.rb +60 -0
  34. data/lib/questdb/ingress/native.rb +40 -0
  35. data/lib/questdb/ingress/timestamp.rb +53 -0
  36. data/lib/questdb/ingress.rb +77 -0
  37. data/lib/questdb/native/3.1/questdb_ingress.so +0 -0
  38. data/lib/questdb/native/3.2/questdb_ingress.so +0 -0
  39. data/lib/questdb/native/3.3/questdb_ingress.so +0 -0
  40. data/lib/questdb/native/3.4/questdb_ingress.so +0 -0
  41. data/lib/questdb/pooled_sender.rb +215 -0
  42. data/lib/questdb/query.rb +429 -0
  43. data/lib/questdb/sender.rb +436 -0
  44. data/lib/questdb/sender_error.rb +49 -0
  45. data/lib/questdb/types.rb +198 -0
  46. data/lib/questdb/version.rb +27 -0
  47. data/lib/questdb.rb +22 -0
  48. data/questdb.gemspec +69 -0
  49. data/sig/questdb-arrow.rbs +46 -0
  50. data/sig/questdb.rbs +337 -0
  51. metadata +188 -0
@@ -0,0 +1,27 @@
1
+ # ___ _ ____ ____
2
+ # / _ \ _ _ ___ ___| |_| _ \| __ )
3
+ # | | | | | | |/ _ \/ __| __| | | | _ \
4
+ # | |_| | |_| | __/\__ \ |_| |_| | |_) |
5
+ # \__\_\\__,_|\___||___/\__|____/|____/
6
+ #
7
+ # Copyright (c) 2014-2019 Appsicle
8
+ # Copyright (c) 2019-2026 QuestDB
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ #
22
+ module QuestDB
23
+ module Ingress
24
+ VERSION = "0.1.0"
25
+ C_CLIENT_VERSION = "7.1.0"
26
+ end
27
+ end
data/lib/questdb.rb ADDED
@@ -0,0 +1,22 @@
1
+ # ___ _ ____ ____
2
+ # / _ \ _ _ ___ ___| |_| _ \| __ )
3
+ # | | | | | | |/ _ \/ __| __| | | | _ \
4
+ # | |_| | |_| | __/\__ \ |_| |_| | |_) |
5
+ # \__\_\\__,_|\___||___/\__|____/|____/
6
+ #
7
+ # Copyright (c) 2014-2019 Appsicle
8
+ # Copyright (c) 2019-2026 QuestDB
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ #
22
+ require_relative "questdb/ingress"
data/questdb.gemspec ADDED
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # ___ _ ____ ____
4
+ # / _ \ _ _ ___ ___| |_| _ \| __ )
5
+ # | | | | | | |/ _ \/ __| __| | | | _ \
6
+ # | |_| | |_| | __/\__ \ |_| |_| | |_) |
7
+ # \__\_\\__,_|\___||___/\__|____/|____/
8
+ #
9
+ # Copyright (c) 2014-2019 Appsicle
10
+ # Copyright (c) 2019-2026 QuestDB
11
+ #
12
+ # Licensed under the Apache License, Version 2.0 (the "License");
13
+ # you may not use this file except in compliance with the License.
14
+ # You may obtain a copy of the License at
15
+ #
16
+ # http://www.apache.org/licenses/LICENSE-2.0
17
+ #
18
+ # Unless required by applicable law or agreed to in writing, software
19
+ # distributed under the License is distributed on an "AS IS" BASIS,
20
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ # See the License for the specific language governing permissions and
22
+ # limitations under the License.
23
+ #
24
+ require_relative "lib/questdb/version"
25
+ Gem::Specification.new do |s|
26
+ s.name = "questdb"
27
+ s.version = QuestDB::Ingress::VERSION
28
+ s.summary = "Native QuestDB QWP client for Ruby"
29
+ s.description = "MRI Ruby bindings for pooled and standalone QuestDB Wire Protocol ingestion, queries, direct columnar and optional Arrow C Stream writes, and safe pool-wide callbacks, backed by the official C client."
30
+ s.authors = ["QuestDB"]
31
+ s.email = ["hello@questdb.io"]
32
+ s.homepage = "https://questdb.io/"
33
+ s.license = "Apache-2.0"
34
+ s.metadata = {
35
+ "allowed_push_host" => "https://rubygems.org",
36
+ "bug_tracker_uri" => "https://github.com/questdb/ruby-questdb-client/issues",
37
+ "changelog_uri" => "https://github.com/questdb/ruby-questdb-client/blob/main/CHANGELOG.md",
38
+ "documentation_uri" => "https://github.com/questdb/ruby-questdb-client#readme",
39
+ "homepage_uri" => "https://questdb.io/",
40
+ "rubygems_mfa_required" => "true",
41
+ "source_code_uri" => "https://github.com/questdb/ruby-questdb-client"
42
+ }
43
+ s.required_ruby_version = Gem::Requirement.new(">= 3.1", "< 3.5")
44
+ native_gem = ENV["QDB_NATIVE_GEM"] == "1"
45
+ if native_gem
46
+ platform = ENV.fetch("QDB_GEM_PLATFORM")
47
+ s.platform = Gem::Platform.new(platform)
48
+ s.required_rubygems_version = Gem::Requirement.new(">= 3.3.22") if platform.include?("-linux-")
49
+ package_globs = %w[lib/**/* docs/**/* examples/**/* sig/**/*]
50
+ generated = %r{(?:\A|/)\.git(?:/|$)}
51
+ s.extensions = []
52
+ else
53
+ package_globs = %w[lib/**/* ext/**/* vendor/**/* docs/**/* examples/**/* benchmark/**/* sig/**/* script/**/* test/**/* .cargo/**/*]
54
+ generated = %r{vendor/c-questdb-client/(?:questdb/|questdb-rs-ffi/target/)|(?:\A|/)\.git(?:/|$)|(?:\A|/)ext/.*\.o\z|\.(?:so|bundle)\z|(?:\A|/)ext/[^/]*/Makefile\z|(?:\A|/)ext/[^/]*/mkmf\.log\z|(?:\A|/)lib/questdb/native/}
55
+ s.extensions = ["ext/questdb_ingress/extconf.rb"]
56
+ end
57
+ s.files = Dir.glob(package_globs, File::FNM_DOTMATCH).select { |f| File.file?(f) && f !~ generated }
58
+ s.files = (s.files + %w[questdb.gemspec LICENSE.txt THIRD_PARTY_NOTICES.md README.md CHANGELOG.md SECURITY.md]).uniq.sort
59
+ s.files.concat(%w[Gemfile Rakefile CONTRIBUTING.md vendor/c-questdb-client.version]) unless native_gem
60
+ s.files.uniq!
61
+ s.files.sort!
62
+ s.require_paths = ["lib"]
63
+ s.add_dependency "bigdecimal", "~> 3.0"
64
+ s.add_development_dependency "minitest", "~> 5.20"
65
+ s.add_development_dependency "mutex_m", "~> 0.3"
66
+ s.add_development_dependency "rake", "~> 13.0"
67
+ s.add_development_dependency "rake-compiler", "~> 1.2"
68
+ s.add_development_dependency "rbs", "~> 3.0"
69
+ end
@@ -0,0 +1,46 @@
1
+ # ___ _ ____ ____
2
+ # / _ \ _ _ ___ ___| |_| _ \| __ )
3
+ # | | | | | | |/ _ \/ __| __| | | | _ \
4
+ # | |_| | |_| | __/\__ \ |_| |_| | |_) |
5
+ # \__\_\\__,_|\___||___/\__|____/|____/
6
+ #
7
+ # Copyright (c) 2014-2019 Appsicle
8
+ # Copyright (c) 2019-2026 QuestDB
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ #
22
+ module QuestDB
23
+ module Arrow
24
+ def self.normalize_at: (untyped value) -> [Integer, untyped]
25
+ def self.normalize_overrides: (Symbol | Array[String | Symbol] | nil symbols, Hash[String | Symbol, untyped] overrides) -> Array[[String | Symbol, Integer, Integer]]
26
+ end
27
+
28
+ class Client
29
+ def ingest_arrow: (String | Symbol table, untyped source, at: untyped, ?symbols: Symbol | Array[String | Symbol], ?schema_overrides: Hash[String | Symbol, untyped], ?ack: Symbol, ?checkpoint_batches: Integer) -> Client
30
+ end
31
+
32
+ class PooledSender
33
+ def ingest_arrow: (String | Symbol table, untyped source, at: untyped, ?symbols: Symbol | Array[String | Symbol], ?schema_overrides: Hash[String | Symbol, untyped], ?ack: Symbol, ?checkpoint_batches: Integer) -> PooledSender
34
+ end
35
+
36
+ class Sender
37
+ def ingest_arrow: (String | Symbol table, untyped source, at: untyped, ?symbols: Symbol | Array[String | Symbol], ?schema_overrides: Hash[String | Symbol, untyped], ?ack: Symbol, ?checkpoint_batches: Integer) -> Sender
38
+ end
39
+
40
+ class QueryResult
41
+ def arrow_c_stream: () -> untyped
42
+ def to_nanoarrow: () -> untyped
43
+ def to_polars: () -> untyped
44
+ def to_red_arrow_table: () -> untyped
45
+ end
46
+ end
data/sig/questdb.rbs ADDED
@@ -0,0 +1,337 @@
1
+ # ___ _ ____ ____
2
+ # / _ \ _ _ ___ ___| |_| _ \| __ )
3
+ # | | | | | | |/ _ \/ __| __| | | | _ \
4
+ # | |_| | |_| | __/\__ \ |_| |_| | |_) |
5
+ # \__\_\\__,_|\___||___/\__|____/|____/
6
+ #
7
+ # Copyright (c) 2014-2019 Appsicle
8
+ # Copyright (c) 2019-2026 QuestDB
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ #
22
+ module QuestDB
23
+ VERSION: String
24
+ C_CLIENT_VERSION: String
25
+ SERVER_TIMESTAMP: untyped
26
+
27
+ class Error < StandardError
28
+ attr_reader code: Symbol
29
+ attr_reader sender_error: SenderError?
30
+ def initialize: (String message, ?code: Symbol, ?in_doubt: bool, ?sender_error: SenderError | Array[untyped]?) -> void
31
+ def in_doubt?: () -> bool
32
+ end
33
+ class ServerRejectionError < Error
34
+ end
35
+ QuestDBError: singleton(Error)
36
+ QuestDBServerRejectionError: singleton(ServerRejectionError)
37
+
38
+ class Timestamp
39
+ attr_reader value: Integer
40
+ def initialize: (Integer value) -> void
41
+ def ==: (untyped other) -> bool
42
+ end
43
+ class TimestampNanos < Timestamp
44
+ def self.now: () -> TimestampNanos
45
+ def self.from_time: (Time time) -> TimestampNanos
46
+ end
47
+ class TimestampMicros < Timestamp
48
+ def self.now: () -> TimestampMicros
49
+ def self.from_time: (Time time) -> TimestampMicros
50
+ end
51
+
52
+ class Float64Array
53
+ attr_reader values: Array[Float]
54
+ attr_reader shape: Array[Integer]
55
+ def initialize: (Array[Numeric] values, shape: Array[Integer]) -> void
56
+ def self.from_nested: (Array[untyped] value) -> Float64Array
57
+ def self.from_native: (Array[Numeric] values, Array[Integer] shape) -> Float64Array
58
+ end
59
+
60
+ class DateMillis
61
+ attr_reader value: Integer
62
+ def initialize: (Integer value) -> void
63
+ def to_time: () -> Time
64
+ end
65
+ class Char
66
+ attr_reader value: Integer
67
+ def initialize: (Integer | String value) -> void
68
+ def to_s: () -> String
69
+ end
70
+ class UUID
71
+ attr_reader bytes: String
72
+ def initialize: (String | UUID value) -> void
73
+ def self.from_bytes: (String bytes) -> UUID
74
+ def to_s: () -> String
75
+ end
76
+ class Binary
77
+ attr_reader bytes: String
78
+ def initialize: (String bytes) -> void
79
+ end
80
+ class IPv4
81
+ attr_reader value: Integer
82
+ def initialize: (untyped value) -> void
83
+ def to_s: () -> String
84
+ end
85
+ class Geohash
86
+ attr_reader value: Integer
87
+ attr_reader precision_bits: Integer
88
+ def initialize: (Integer value, precision_bits: Integer) -> void
89
+ end
90
+ class Long256
91
+ attr_reader value: Integer
92
+ def initialize: (Integer value) -> void
93
+ def bytes: () -> String
94
+ end
95
+ class DecimalValue
96
+ attr_reader mantissa: Integer
97
+ attr_reader scale: Integer
98
+ def initialize: (Integer mantissa, scale: Integer) -> void
99
+ def to_d: () -> BigDecimal
100
+ def to_s: () -> String
101
+ end
102
+ class TypedNull
103
+ attr_reader kind: Symbol
104
+ attr_reader scale: Integer?
105
+ attr_reader precision_bits: Integer?
106
+ def initialize: (Symbol kind, ?scale: Integer?, ?precision_bits: Integer?) -> void
107
+ end
108
+ class OpaqueValue
109
+ attr_reader kind: untyped
110
+ attr_reader bytes: String?
111
+ end
112
+
113
+ class ColumnVector
114
+ attr_reader kind: Symbol
115
+ attr_reader values: Array[untyped]
116
+ attr_reader scale: Integer?
117
+ attr_reader precision_bits: Integer?
118
+ attr_reader shape: Array[Integer]?
119
+ def initialize: (Symbol kind, Array[untyped] values, ?scale: Integer?, ?precision_bits: Integer?, ?shape: Array[Integer]?) -> void
120
+ def self.byte: (Array[untyped] values, **untyped metadata) -> ColumnVector
121
+ def self.short: (Array[untyped] values, **untyped metadata) -> ColumnVector
122
+ def self.int: (Array[untyped] values, **untyped metadata) -> ColumnVector
123
+ def self.long: (Array[untyped] values, **untyped metadata) -> ColumnVector
124
+ def self.float: (Array[untyped] values, **untyped metadata) -> ColumnVector
125
+ def self.double: (Array[untyped] values, **untyped metadata) -> ColumnVector
126
+ def self.boolean: (Array[untyped] values, **untyped metadata) -> ColumnVector
127
+ def self.varchar: (Array[untyped] values, **untyped metadata) -> ColumnVector
128
+ def self.binary: (Array[untyped] values, **untyped metadata) -> ColumnVector
129
+ def self.uuid: (Array[untyped] values, **untyped metadata) -> ColumnVector
130
+ def self.long256: (Array[untyped] values, **untyped metadata) -> ColumnVector
131
+ def self.ipv4: (Array[untyped] values, **untyped metadata) -> ColumnVector
132
+ def self.timestamp: (Array[untyped] values, **untyped metadata) -> ColumnVector
133
+ def self.timestamp_nanos: (Array[untyped] values, **untyped metadata) -> ColumnVector
134
+ def self.date: (Array[untyped] values, **untyped metadata) -> ColumnVector
135
+ def self.char: (Array[untyped] values, **untyped metadata) -> ColumnVector
136
+ def self.geohash: (Array[untyped] values, precision_bits: Integer) -> ColumnVector
137
+ def self.decimal64: (Array[untyped] values, scale: Integer) -> ColumnVector
138
+ def self.decimal128: (Array[untyped] values, scale: Integer) -> ColumnVector
139
+ def self.decimal256: (Array[untyped] values, scale: Integer) -> ColumnVector
140
+ def self.double_array: (Array[untyped] values, shape: Array[Integer]) -> ColumnVector
141
+ end
142
+
143
+ class ConnectionEvent
144
+ attr_reader kind: Symbol
145
+ attr_reader host: String?
146
+ attr_reader port: String?
147
+ attr_reader previous_host: String?
148
+ attr_reader previous_port: String?
149
+ attr_reader attempt_number: Integer?
150
+ attr_reader cause_code: Symbol?
151
+ attr_reader cause_message: String?
152
+ attr_reader timestamp_millis: Integer
153
+ end
154
+
155
+ class SenderError
156
+ attr_reader category: Symbol
157
+ attr_reader applied_policy: Symbol
158
+ attr_reader status: Integer?
159
+ attr_reader message: String
160
+ attr_reader message_sequence: Integer?
161
+ attr_reader from_fsn: Integer
162
+ attr_reader to_fsn: Integer
163
+ def terminal?: () -> bool
164
+ def retriable?: () -> bool
165
+ end
166
+
167
+ class Client
168
+ def self.from_conf: (String conf, ?connection_listener: (^(ConnectionEvent) -> void)?, ?error_handler: (^(SenderError) -> void)?, ?connection_event_inbox_capacity: Integer, ?error_event_inbox_capacity: Integer, **untyped settings) -> Client
169
+ def self.from_env: (?connection_listener: (^(ConnectionEvent) -> void)?, ?error_handler: (^(SenderError) -> void)?, ?connection_event_inbox_capacity: Integer, ?error_event_inbox_capacity: Integer, **untyped settings) -> Client
170
+ def sender: () -> PooledSender
171
+ | [A] () { (PooledSender) -> A } -> A
172
+ def reader: () -> PooledReader
173
+ | [A] () { (PooledReader) -> A } -> A
174
+ def query: (String sql, ?binds: Array[untyped]?, ?reset_symbol_dict: bool) -> QueryResult
175
+ | [A] (String sql, ?binds: Array[untyped]?, ?reset_symbol_dict: bool) { (QueryResult) -> A } -> A
176
+ def ingest_columns: (String | Symbol table, columns: Hash[String | Symbol, Array[untyped] | ColumnVector], ?symbols: Hash[String | Symbol, Array[String?] | ColumnVector], at: untyped, ?max_rows_per_batch: Integer, ?ack: Symbol) -> Client
177
+ alias write_columns ingest_columns
178
+ def execute: (String sql, ?binds: Array[untyped]?) -> nil
179
+ def server_info: () -> ServerInfo
180
+ def reap_idle: () -> Integer
181
+ def connection_events_delivered: () -> Integer
182
+ def connection_events_dropped: () -> Integer
183
+ def error_events_delivered: () -> Integer
184
+ def error_events_dropped: () -> Integer
185
+ def poll_connection_event: () -> ConnectionEvent?
186
+ def poll_error: () -> SenderError?
187
+ def active_leases: () -> Integer
188
+ def active_senders: () -> Integer
189
+ def closed?: () -> bool
190
+ def close: () -> Client
191
+ def open: [A] () { (Client) -> A } -> A
192
+ end
193
+
194
+ class Column
195
+ attr_reader name: String
196
+ attr_reader kind: Symbol
197
+ attr_reader metadata: Hash[Symbol, untyped]
198
+ end
199
+ class Row
200
+ attr_reader names: Array[String]
201
+ attr_reader values: Array[untyped]
202
+ def []: (Integer | String | Symbol key) -> untyped
203
+ def fetch: (Integer | String | Symbol key, *untyped defaults) -> untyped
204
+ def to_a: () -> Array[untyped]
205
+ def to_h: () -> Hash[String, untyped]
206
+ end
207
+ class ResultBatch
208
+ attr_reader columns: Array[Column]
209
+ attr_reader rows: Array[Row]
210
+ def row_count: () -> Integer
211
+ def column_count: () -> Integer
212
+ def empty?: () -> bool
213
+ end
214
+ class ServerInfo
215
+ attr_reader role: Symbol
216
+ attr_reader raw_role: Integer
217
+ attr_reader epoch: Integer
218
+ attr_reader capabilities: Integer
219
+ attr_reader server_wall_ns: Integer
220
+ attr_reader cluster_id: String
221
+ attr_reader node_id: String
222
+ attr_reader zone_id: String?
223
+ end
224
+ class QueryResult
225
+ include Enumerable[Row]
226
+ attr_reader columns: Array[Column]?
227
+ def each: () { (Row) -> void } -> QueryResult
228
+ def each_batch: () { (ResultBatch) -> void } -> QueryResult
229
+ def each_values: () { (Array[untyped]) -> void } -> QueryResult
230
+ def to_a: () -> Array[Row]
231
+ def cancel: () -> QueryResult
232
+ def close: () -> QueryResult
233
+ def closed?: () -> bool
234
+ def consumed?: () -> bool
235
+ def open: [A] () { (QueryResult) -> A } -> A
236
+ end
237
+ class PooledReader
238
+ def query: (String sql, ?binds: Array[untyped]?, ?reset_symbol_dict: bool) -> QueryResult
239
+ | [A] (String sql, ?binds: Array[untyped]?, ?reset_symbol_dict: bool) { (QueryResult) -> A } -> A
240
+ def execute: (String sql, ?binds: Array[untyped]?) -> nil
241
+ def server_info: () -> ServerInfo
242
+ def close: () -> PooledReader
243
+ def closed?: () -> bool
244
+ def open: [A] () { (PooledReader) -> A } -> A
245
+ end
246
+
247
+ class Sender
248
+ attr_reader protocol: Symbol
249
+ attr_reader init_buf_size: Integer
250
+ attr_reader auto_flush_rows: Integer?
251
+ attr_reader auto_flush_bytes: Integer?
252
+ attr_reader auto_flush_interval: Integer?
253
+ def initialize: (protocol: Symbol, host: String, ?port: Integer, ?connection_listener: (^(ConnectionEvent) -> void)?, ?error_handler: (^(SenderError) -> void)?, ?connection_event_inbox_capacity: Integer, ?error_event_inbox_capacity: Integer, **untyped settings) -> void
254
+ def self.from_conf: (String conf, ?connection_listener: (^(ConnectionEvent) -> void)?, ?error_handler: (^(SenderError) -> void)?, ?connection_event_inbox_capacity: Integer, ?error_event_inbox_capacity: Integer, **untyped settings) -> Sender
255
+ def self.from_env: (?connection_listener: (^(ConnectionEvent) -> void)?, ?error_handler: (^(SenderError) -> void)?, ?connection_event_inbox_capacity: Integer, ?error_event_inbox_capacity: Integer, **untyped settings) -> Sender
256
+ def establish: () -> Sender
257
+ def established?: () -> bool
258
+ def auto_flush?: () -> bool
259
+ def auto_flush: () -> bool
260
+ def new_buffer: () -> Ingress::Buffer
261
+ def row: (String | Symbol table, ?symbols: Hash[String | Symbol, String?], ?columns: Hash[String | Symbol, untyped], at: untyped) -> Sender
262
+ def ingest_columns: (String | Symbol table, columns: Hash[String | Symbol, Array[untyped] | ColumnVector], ?symbols: Hash[String | Symbol, Array[String?] | ColumnVector], at: untyped, ?max_rows_per_batch: Integer, ?ack: Symbol) -> Sender
263
+ alias write_columns ingest_columns
264
+ def row_count: () -> Integer
265
+ def length: () -> Integer
266
+ def empty?: () -> bool
267
+ def closed?: () -> bool
268
+ def flush: (?buffer: Ingress::Buffer?, ?clear: bool, ?wait: bool, ?ack: Symbol) -> Sender
269
+ def wait: (?timeout_millis: Integer, ?ack: Symbol) -> Sender
270
+ def flush_and_get_fsn: () -> Integer?
271
+ def flush_and_keep_and_get_fsn: (?Ingress::Buffer? buffer) -> Integer?
272
+ def published_fsn: () -> Integer?
273
+ def acked_fsn: () -> Integer?
274
+ def await_acked_fsn: (Integer fsn, ?timeout_millis: Integer) -> bool
275
+ def drive_once: () -> bool
276
+ def close_drain: () -> Sender
277
+ def poll_error: () -> SenderError?
278
+ def poll_connection_event: () -> ConnectionEvent?
279
+ def poll_callback_error: () -> SenderError?
280
+ def error_events_delivered: () -> Integer
281
+ def error_events_dropped: () -> Integer
282
+ def connection_events_delivered: () -> Integer
283
+ def connection_events_dropped: () -> Integer
284
+ def close: (?flush: bool, ?wait: bool, ?drain: bool?) -> Sender
285
+ def open: [A] () { (Sender) -> A } -> A
286
+ end
287
+
288
+ class PooledSender
289
+ attr_reader auto_flush_rows: Integer?
290
+ attr_reader auto_flush_bytes: Integer?
291
+ attr_reader auto_flush_interval: Integer?
292
+ def row: (String | Symbol table, ?symbols: Hash[String | Symbol, String?], ?columns: Hash[String | Symbol, untyped], at: untyped) -> PooledSender
293
+ def row_count: () -> Integer
294
+ def length: () -> Integer
295
+ def empty?: () -> bool
296
+ def closed?: () -> bool
297
+ def flush: (?wait: bool, ?ack: Symbol) -> PooledSender
298
+ def wait: (?timeout_millis: Integer, ?ack: Symbol) -> PooledSender
299
+ def flush_and_get_fsn: () -> Integer?
300
+ def flush_and_keep_and_get_fsn: () -> Integer?
301
+ def published_fsn: () -> Integer?
302
+ def acked_fsn: () -> Integer?
303
+ def await_acked_fsn: (Integer fsn, ?timeout_millis: Integer) -> bool
304
+ def ingest_columns: (String | Symbol table, columns: Hash[String | Symbol, Array[untyped] | ColumnVector], ?symbols: Hash[String | Symbol, Array[String?] | ColumnVector], at: untyped, ?max_rows_per_batch: Integer, ?ack: Symbol) -> PooledSender
305
+ alias write_columns ingest_columns
306
+ def poll_error: () -> SenderError?
307
+ def error_events_dropped: () -> Integer
308
+ def close: (?flush: bool, ?wait: bool) -> PooledSender
309
+ def open: [A] () { (PooledSender) -> A } -> A
310
+ end
311
+
312
+ def self.connect: (?String conf, ?host: String, ?port: Integer, ?tls: bool, ?connection_listener: (^(ConnectionEvent) -> void)?, ?error_handler: (^(SenderError) -> void)?, ?connection_event_inbox_capacity: Integer, ?error_event_inbox_capacity: Integer, **untyped settings) -> Client
313
+ | [A] (?String conf, ?host: String, ?port: Integer, ?tls: bool, ?connection_listener: (^(ConnectionEvent) -> void)?, ?error_handler: (^(SenderError) -> void)?, ?connection_event_inbox_capacity: Integer, ?error_event_inbox_capacity: Integer, **untyped settings) { (Client) -> A } -> A
314
+
315
+ module Ingress
316
+ VERSION: String
317
+ C_CLIENT_VERSION: String
318
+ SERVER_TIMESTAMP: untyped
319
+ IngressError: singleton(QuestDB::Error)
320
+ ServerRejectionError: singleton(QuestDB::ServerRejectionError)
321
+ Timestamp: singleton(QuestDB::Timestamp)
322
+ TimestampNanos: singleton(QuestDB::TimestampNanos)
323
+ TimestampMicros: singleton(QuestDB::TimestampMicros)
324
+ Float64Array: singleton(QuestDB::Float64Array)
325
+
326
+ class Buffer
327
+ def row: (String | Symbol table, ?symbols: Hash[String | Symbol, String?], ?columns: Hash[String | Symbol, untyped], at: untyped) -> Buffer
328
+ def row_count: () -> Integer
329
+ def length: () -> Integer
330
+ def empty?: () -> bool
331
+ def bytesize: () -> Integer
332
+ def capacity: () -> Integer
333
+ def reserve: (Integer additional) -> Buffer
334
+ def clear: () -> Buffer
335
+ end
336
+ end
337
+ end