yugabyte_ysql 0.2 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 656c0e92d847209ca5f7e4405a824bfefeaa016a7593c5f38f7e4dcd2931ec1f
4
- data.tar.gz: 10908eb1f7fe97da084e900c9d945e8ce107adcb22c625b64945b8f6b5075af0
3
+ metadata.gz: efed9ab399e09009ea47c27a31e9a4d83521921bd1c40dec9d5964f2bc5eb913
4
+ data.tar.gz: b3b96169102271a054dcfe48092c996768250fdd73bd65ed3a6357347c811adc
5
5
  SHA512:
6
- metadata.gz: cd66b7e6009e760208607f685c2383de80270a56329f71b7ebec7e38a0b0ea64a4a9e012733e0c65fb87cf861cebd1ec5c069d191c2fb12e78247800239214d6
7
- data.tar.gz: 9bf946d8601bb2741bc26c512e9d74a9e614fa81fa07dd3b5e0a1854e87ec3dbd3c3f364adc9c34283b73e34fa314f35192af785b99101424e5c42254c1a92da
6
+ metadata.gz: 64fd469fa89722be35d1f7ba890a3d97654670284d282592c92cca65cce72f7e80b7459c970ed806bc9aa416db4865530a861b855b4b0c7380c684fc9e7fedde
7
+ data.tar.gz: 2b8b3bfa1717ff53fa30037cf82e0521ca2c0f43cfb7c34600a21ae6cfcb4fa97d4cacfcc8c6dc4fb5f8ffe575fe6974a38c2638d4dce36a2ce45cf803a71dec
data/README.md CHANGED
@@ -27,7 +27,7 @@ Please refer to the [Use the Driver](#Use the Driver) section for examples.
27
27
  ## Install the Driver
28
28
 
29
29
  ```shell
30
- gem install -- --with-pg-config=<yugabyte-install-dir>/postgres/bin/pg_config
30
+ gem install yugabyte_ysql -- --with-pg-config=<yugabyte-install-dir>/postgres/bin/pg_config
31
31
  ```
32
32
 
33
33
  ## Use the Driver
@@ -53,6 +53,14 @@ gem install -- --with-pg-config=<yugabyte-install-dir>/postgres/bin/pg_config
53
53
  ...
54
54
  ```
55
55
 
56
+ Alternatively, you could also specify the properties as key, value pairs as shown below.
57
+
58
+ ```
59
+ connection = YugabyteYSQL.connect(host: 'localhost', port: '5433', dbname: 'yugabyte',
60
+ user: 'yugabyte', password: 'yugabyte',
61
+ load_balance: 'true', yb_servers_refresh_interval: '10')
62
+ ```
63
+
56
64
  ### Specifying fallback zones
57
65
 
58
66
  For topology-aware load balancing, you can specify fallback placements too. This is not applicable for cluster-aware load balancing.
data/lib/pg/connection.rb CHANGED
@@ -333,7 +333,14 @@ class YugabyteYSQL::Connection
333
333
  ### Returns an array of Hashes with connection defaults. See ::conndefaults
334
334
  ### for details.
335
335
  def conndefaults
336
- return self.class.conndefaults
336
+ original = self.class.conndefaults
337
+ original << {:keyword=>"load_balance", :label=>"YB-Load-Balance", :dispchar=>"", :dispsize=>5}
338
+ original << {:keyword=>"topology_keys", :label=>"YB-Topology-Keys", :dispchar=>"", :dispsize=>64}
339
+ original << {:keyword=>"yb_servers_refresh_interval", :label=>"YB-Refresh-Interval", :dispchar=>"", :dispsize=>3}
340
+ original << {:keyword=>"fallback_to_topology_keys_only", :label=>"YB-Fallback-To-Topology-Keys-Only", :dispchar=>"", :dispsize=>5}
341
+ original << {:keyword=>"failed_host_reconnect_delay_secs", :label=>"YB-Failed-Host-Reconnect-Delay", :dispchar=>"", :dispsize=>3}
342
+
343
+ original
337
344
  end
338
345
 
339
346
  ### Return the Postgres connection defaults structure as a Hash keyed by option
@@ -166,7 +166,7 @@ class YugabyteYSQL::LoadBalanceService
166
166
  found_public_ip = true
167
167
  end
168
168
 
169
- # todo set useHostColumn field
169
+ # set useHostColumn field
170
170
  if @@useHostColumn.nil?
171
171
  if host.eql? conn.host
172
172
  @@useHostColumn = true
data/lib/pg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module YugabyteYSQL
2
2
  # Library version
3
3
  PG_VERSION = '1.5.6'
4
- VERSION = '0.2'
4
+ VERSION = '0.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yugabyte_ysql
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-06-03 00:00:00.000000000 Z
13
+ date: 2024-06-25 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Pg_YugabyteDB is the Ruby interface to the PostgreSQL-compatible YugabyteDB.
16
16
  It works with YugabyteDB 2.20 and later.
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.1.2
228
+ rubygems_version: 3.3.27
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: The Ruby interface to YugabyteDB, based on PG Ruby Driver v1.5.6