yugabyte_ysql 0.1 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da6e1808efb76c74fa458304dc0a22f560a01902226ce7728bf938031db99515
4
- data.tar.gz: 0112f60eb73bf0724cad117997eed37a04b8120986e21b54686c2204058bd1a0
3
+ metadata.gz: efed9ab399e09009ea47c27a31e9a4d83521921bd1c40dec9d5964f2bc5eb913
4
+ data.tar.gz: b3b96169102271a054dcfe48092c996768250fdd73bd65ed3a6357347c811adc
5
5
  SHA512:
6
- metadata.gz: 63cedf2a84f2165f8bcf8ea5b13466063854714d784680411b89f8bde022e76281af41f3f2ea9cf67328a5b551300c66a8bea3851e936ddb74183a7293a7e4ab
7
- data.tar.gz: cc6de4ddcc016376ee1065a1acc264f0ef698cba8c7dc69c5047d02f8b66f42bd46116732c25a3c1698b7fb092f411dd0e3bd8cab2225c9ba041b645f2206401
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.1'
4
+ VERSION = '0.3'
5
5
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yugabyte_ysql
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
8
8
  - Lars Kanis
9
9
  - YugabyteDB Dev Team
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-06-01 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.
@@ -206,7 +206,7 @@ metadata:
206
206
  source_code_uri: https://github.com/yugabyte/ruby-pg
207
207
  changelog_uri: https://github.com/yugabyte/ruby-pg/blob/master/History.md
208
208
  documentation_uri: http://deveiate.org/code/pg
209
- post_install_message:
209
+ post_install_message:
210
210
  rdoc_options:
211
211
  - "--main"
212
212
  - README.md
@@ -225,8 +225,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.5.1
229
- signing_key:
228
+ rubygems_version: 3.3.27
229
+ signing_key:
230
230
  specification_version: 4
231
231
  summary: The Ruby interface to YugabyteDB, based on PG Ruby Driver v1.5.6
232
232
  test_files: []