trilogy 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9c5df97a7642030f5c79167a0ff54ab25f500e38555b0303b9755f4102b0b17
4
- data.tar.gz: a67ea6052ca5d2346a5b7cb72f976c6c6a445361365e7bc3f343a54cd43151dd
3
+ metadata.gz: 2f62d4a5617aaf6b532cfa2888b297eba7bfb18def74e98b6a12847d2845b81f
4
+ data.tar.gz: 7c74e6d32f1ec845bccbace0b989a269d833d1582ba38ffd78e8e5f35305883d
5
5
  SHA512:
6
- metadata.gz: 8d356765239b247f1902582abfb7a724eee0b2b18a3e8e0eabe71db196555bf5749192f259dba8c65f8a0945106df4413f328abeef8241cb3517495725dedabc
7
- data.tar.gz: c77e07b1a5e423d1ed7065a613feee4cd038be3606f519f7dc2fbbe87b389cf9d1fd4cc41993023060b504c40f12f85f8e75c688e1b4c418535c8891c192f26f
6
+ metadata.gz: 7ba24a84f4e946c1c7f797c10738fda98bcc9e1fbb0bd19f289fe9cc6cbb9bae252f9cf307c873c8a958c2d2519075d4a677cb681648e6429b18bf9c9a897bb7
7
+ data.tar.gz: 4ce6afb50256faf2ec873a71194295c9538a4d2188ecae65018b51f8869a97e4cb68eecef6829f9053ef31a5dca1defd107b46281478e02eb5b10606dae3da99
@@ -26,7 +26,7 @@ static ID id_socket, id_host, id_port, id_username, id_password, id_found_rows,
26
26
  id_write_timeout, id_keepalive_enabled, id_keepalive_idle, id_keepalive_interval, id_keepalive_count,
27
27
  id_ivar_affected_rows, id_ivar_fields, id_ivar_last_insert_id, id_ivar_rows, id_ivar_query_time, id_password,
28
28
  id_database, id_ssl_ca, id_ssl_capath, id_ssl_cert, id_ssl_cipher, id_ssl_crl, id_ssl_crlpath, id_ssl_key,
29
- id_ssl_mode, id_tls_ciphersuites, id_tls_min_version, id_tls_max_version, id_multi_statement, id_multi_result,
29
+ id_ssl_mode, id_tls_ciphersuites, id_tls_min_version, id_tls_max_version, id_multi_statement,
30
30
  id_from_code, id_from_errno, id_connection_options;
31
31
 
32
32
  struct trilogy_ctx {
@@ -455,12 +455,8 @@ static VALUE rb_trilogy_initialize(VALUE self, VALUE encoding, VALUE charset, VA
455
455
  connopt.flags |= TRILOGY_CAPABILITIES_FOUND_ROWS;
456
456
  }
457
457
 
458
- if (RTEST(rb_hash_aref(opts, ID2SYM(id_multi_result)))) {
459
- connopt.flags |= TRILOGY_CAPABILITIES_MULTI_RESULTS;
460
- }
461
-
462
458
  if (RTEST(rb_hash_aref(opts, ID2SYM(id_multi_statement)))) {
463
- connopt.flags |= TRILOGY_CAPABILITIES_MULTI_STATEMENTS | TRILOGY_CAPABILITIES_MULTI_RESULTS;
459
+ connopt.flags |= TRILOGY_CAPABILITIES_MULTI_STATEMENTS;
464
460
  }
465
461
 
466
462
  if ((val = rb_hash_aref(opts, ID2SYM(id_ssl_ca))) != Qnil) {
@@ -1131,7 +1127,6 @@ RUBY_FUNC_EXPORTED void Init_cext()
1131
1127
  id_tls_min_version = rb_intern("tls_min_version");
1132
1128
  id_tls_max_version = rb_intern("tls_max_version");
1133
1129
  id_multi_statement = rb_intern("multi_statement");
1134
- id_multi_result = rb_intern("multi_result");
1135
1130
  id_from_code = rb_intern("from_code");
1136
1131
  id_from_errno = rb_intern("from_errno");
1137
1132
  id_ivar_affected_rows = rb_intern("@affected_rows");
@@ -124,7 +124,9 @@
124
124
  * sets from a query. \
125
125
  */ \
126
126
  XX(TRILOGY_CAPABILITIES_MULTI_RESULTS, 0x00020000) \
127
- /* From server: the server is capable of sending multiple result sets from \
127
+ /* Not implemented. \
128
+ * \
129
+ * From server: the server is capable of sending multiple result sets from \
128
130
  * a prepared statement. \
129
131
  * \
130
132
  * From client: tells the server it's capable of handling multiple result \
@@ -1,3 +1,3 @@
1
1
  class Trilogy
2
- VERSION = "2.4.0"
2
+ VERSION = "2.4.1"
3
3
  end
data/lib/trilogy.rb CHANGED
@@ -64,6 +64,11 @@ class Trilogy
64
64
 
65
65
  class TimeoutError < Errno::ETIMEDOUT
66
66
  include ConnectionError
67
+
68
+ def initialize(error_message = nil, error_code = nil)
69
+ super
70
+ @error_code = error_code
71
+ end
67
72
  end
68
73
 
69
74
  class ConnectionRefusedError < Errno::ECONNREFUSED
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trilogy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-15 00:00:00.000000000 Z
11
+ date: 2023-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler