fdb 5.1.5 → 5.2.6

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
  SHA1:
3
- metadata.gz: ce18c924f0fa5dac7b6e44a98860a7e41a001e6a
4
- data.tar.gz: 3d72f399a0ae2cb63f1676a51a1f1b231c952268
3
+ metadata.gz: d19471f94d2976258e1454d1cefb3a4c57a8e6f2
4
+ data.tar.gz: 6140bebcdbeb2741fd9bdb75cb42b34d6213c7ff
5
5
  SHA512:
6
- metadata.gz: acc9dcacfe050de9bc637cf4e8071a34f1f2798c664c3f334636824ee8cfc7a5419fe15166dda5975b46a033d4fcdf4d96755b34f6d07f550a6fa4ee0568dcae
7
- data.tar.gz: e1bc5edd31b700b2ffc7b8c849d8bf442c9609853ed0fdd27ac0c8b78f07f6ceba0b3627c545152f599602b59567e9d10f9078850a914f8bc8e32821c6537589
6
+ metadata.gz: 109d762db1f5cdd6826e6e6af5a5eb331ad19ec4486cdd7a1db46083c8493816a104054a2b7b9664dd11a777b37769da40a8580cc443326d5298bb67e2195c40
7
+ data.tar.gz: c2eb5f01dd39c5ead2131f3f212d1a8819e208c9e2873185f42cf5f9d511a8925a5a726c25b6fc1dc33943d7fd52c21c865940a5949246938f8411e110a62870
data/lib/fdb.rb CHANGED
@@ -21,14 +21,24 @@
21
21
  # FoundationDB Ruby API
22
22
 
23
23
  # Documentation for this API can be found at
24
- # https://www.foundationdb.org/documentation/api-ruby.html
24
+ # https://apple.github.io/foundationdb/api-ruby.html
25
25
 
26
26
  module FDB
27
27
  @@chosen_version = -1
28
+ def self.is_api_version_selected?()
29
+ @@chosen_version >= 0
30
+ end
31
+ def self.get_api_version()
32
+ if self.is_api_version_selected?()
33
+ return @@chosen_version
34
+ else
35
+ raise "FDB API version not selected"
36
+ end
37
+ end
28
38
  def self.api_version(version)
29
- header_version = 510
30
- if @@chosen_version >= 0
31
- if@@chosen_version != version
39
+ header_version = 520
40
+ if self.is_api_version_selected?()
41
+ if @@chosen_version != version
32
42
  raise "FDB API already loaded at version #{@@chosen_version}."
33
43
  end
34
44
  return
@@ -23,7 +23,7 @@
23
23
  # FoundationDB Ruby API
24
24
 
25
25
  # Documentation for this API can be found at
26
- # https://www.foundationdb.org/documentation/api-ruby.html
26
+ # https://apple.github.io/foundationdb/api-ruby.html
27
27
 
28
28
  require 'thread'
29
29
 
@@ -23,7 +23,7 @@
23
23
  # FoundationDB Ruby API
24
24
 
25
25
  # Documentation for this API can be found at
26
- # https://www.foundationdb.org/documentation/api-ruby.html
26
+ # https://apple.github.io/foundationdb/api-ruby.html
27
27
 
28
28
  require 'ffi'
29
29
 
@@ -23,7 +23,7 @@
23
23
  # FoundationDB Ruby API
24
24
 
25
25
  # Documentation for this API can be found at
26
- # https://www.foundationdb.org/documentation/api-ruby.html
26
+ # https://apple.github.io/foundationdb/api-ruby.html
27
27
 
28
28
  module FDB
29
29
  module Locality
@@ -20,7 +20,7 @@
20
20
  # THE SOFTWARE.
21
21
 
22
22
  # Documentation for this API can be found at
23
- # https://www.foundationdb.org/documentation/api-ruby.html
23
+ # https://apple.github.io/foundationdb/api-ruby.html
24
24
 
25
25
  module FDB
26
26
  @@NetworkOption = {
@@ -41,8 +41,11 @@ module FDB
41
41
  "BUGGIFY_DISABLE" => [49, "", nil, nil],
42
42
  "BUGGIFY_SECTION_ACTIVATED_PROBABILITY" => [50, "Set the probability of a BUGGIFY section being active for the current execution. Only applies to code paths first traversed AFTER this option is changed.", 0, "probability expressed as a percentage between 0 and 100"],
43
43
  "BUGGIFY_SECTION_FIRED_PROBABILITY" => [51, "Set the probability of an active BUGGIFY section being fired", 0, "probability expressed as a percentage between 0 and 100"],
44
+ "TLS_CA_BYTES" => [52, "Set the ca bundle", '', "ca bundle"],
45
+ "TLS_CA_PATH" => [53, "Set the file from which to load the certificate authority bundle", '', "file path"],
46
+ "TLS_PASSWORD" => [54, "Set the passphrase for encrypted private key. Password should be set before setting the key for the password to be used.", '', "key passphrase"],
44
47
  "DISABLE_MULTI_VERSION_CLIENT_API" => [60, "Disables the multi-version client API and instead uses the local client directly. Must be set before setting up the network.", nil, nil],
45
- "CALLBACKS_ON_EXTERNAL_THREADS" => [61, "If set, callbacks from external client libraries can be called from threads created by the FoundationDB client library. Otherwise, callbacks will be called from either the thread used to add the callback or the network thread. Setting this option can improve performance when connected using an external client, but may not be safe to use in all environments. Must be set before setting up the network. WARNING: This feature is considered experimental at this time. ", nil, nil],
48
+ "CALLBACKS_ON_EXTERNAL_THREADS" => [61, "If set, callbacks from external client libraries can be called from threads created by the FoundationDB client library. Otherwise, callbacks will be called from either the thread used to add the callback or the network thread. Setting this option can improve performance when connected using an external client, but may not be safe to use in all environments. Must be set before setting up the network. WARNING: This feature is considered experimental at this time.", nil, nil],
46
49
  "EXTERNAL_CLIENT_LIBRARY" => [62, "Adds an external client library for use by the multi-version client API. Must be set before setting up the network.", '', "path to client library"],
47
50
  "EXTERNAL_CLIENT_DIRECTORY" => [63, "Searches the specified path for dynamic libraries and adds them to the list of client libraries for use by the multi-version client API. Must be set before setting up the network.", '', "path to directory containing client libraries"],
48
51
  "DISABLE_LOCAL_CLIENT" => [64, "Prevents connections through the local client, allowing only connections through externally loaded client libraries. Intended primarily for testing.", nil, nil],
@@ -66,19 +69,16 @@ module FDB
66
69
  "CAUSAL_READ_RISKY" => [20, "The read version will be committed, and usually will be the latest committed, but might not be the latest committed in the event of a fault or partition", nil, nil],
67
70
  "CAUSAL_READ_DISABLE" => [21, "", nil, nil],
68
71
  "NEXT_WRITE_NO_WRITE_CONFLICT_RANGE" => [30, "The next write performed on this transaction will not generate a write conflict range. As a result, other transactions which read the key(s) being modified by the next write will not conflict with this transaction. Care needs to be taken when using this option on a transaction that is shared between multiple threads. When setting this option, write conflict ranges will be disabled on the next write operation, regardless of what thread it is on.", nil, nil],
69
- "COMMIT_ON_FIRST_PROXY" => [40, "Committing this transaction will bypass the normal load balancing across proxies and go directly to the specifically nominated 'first proxy'.", nil, nil],
70
- "CHECK_WRITES_ENABLE" => [50, "", nil, nil],
71
72
  "READ_YOUR_WRITES_DISABLE" => [51, "Reads performed by a transaction will not see any prior mutations that occured in that transaction, instead seeing the value which was in the database at the transaction's read version. This option may provide a small performance benefit for the client, but also disables a number of client-side optimizations which are beneficial for transactions which tend to read and write the same keys within a single transaction.", nil, nil],
72
- "READ_AHEAD_DISABLE" => [52, "Disables read-ahead caching for range reads. Under normal operation, a transaction will read extra rows from the database into cache if range reads are used to page through a series of data one row at a time (i.e. if a range read with a one row limit is followed by another one row range read starting immediately after the result of the first).", nil, nil],
73
+ "READ_AHEAD_DISABLE" => [52, "Deprecated", nil, nil],
73
74
  "DURABILITY_DATACENTER" => [110, "", nil, nil],
74
75
  "DURABILITY_RISKY" => [120, "", nil, nil],
75
- "DURABILITY_DEV_NULL_IS_WEB_SCALE" => [130, "", nil, nil],
76
+ "DURABILITY_DEV_NULL_IS_WEB_SCALE" => [130, "Deprecated", nil, nil],
76
77
  "PRIORITY_SYSTEM_IMMEDIATE" => [200, "Specifies that this transaction should be treated as highest priority and that lower priority transactions should block behind this one. Use is discouraged outside of low-level tools", nil, nil],
77
78
  "PRIORITY_BATCH" => [201, "Specifies that this transaction should be treated as low priority and that default priority transactions should be processed first. Useful for doing batch work simultaneously with latency-sensitive work", nil, nil],
78
79
  "INITIALIZE_NEW_DATABASE" => [300, "This is a write-only transaction which sets the initial configuration. This option is designed for use by database system tools only.", nil, nil],
79
80
  "ACCESS_SYSTEM_KEYS" => [301, "Allows this transaction to read and modify system keys (those that start with the byte 0xFF)", nil, nil],
80
81
  "READ_SYSTEM_KEYS" => [302, "Allows this transaction to read system keys (those that start with the byte 0xFF)", nil, nil],
81
- "DEBUG_DUMP" => [400, "", nil, nil],
82
82
  "DEBUG_RETRY_LOGGING" => [401, "", '', "Optional transaction name"],
83
83
  "TRANSACTION_LOGGING_ENABLE" => [402, "Enables tracing for this transaction and logs results to the client trace logs. Client trace logging must be enabled to get log output.", '', "String identifier to be used in the logs when tracing this transaction. The identifier must not exceed 100 characters."],
84
84
  "TIMEOUT" => [500, "Set a timeout in milliseconds which, when elapsed, will cause the transaction automatically to be cancelled. Valid parameter values are ``[0, INT_MAX]``. If set to 0, will disable all timeouts. All pending and any future uses of the transaction will throw an exception. The transaction can be used again after it is reset. Like all transaction options, a timeout must be reset after a call to onError. This behavior allows the user to make the timeout dynamic.", 0, "value in milliseconds of timeout"],
@@ -109,10 +109,11 @@ module FDB
109
109
  "BIT_OR" => [7, "Performs a bitwise ``or`` operation. If the existing value in the database is not present or shorter than ``param``, it is first extended to the length of ``param`` with zero bytes. If ``param`` is shorter than the existing value in the database, the existing value is truncated to match the length of ``param``.", '', "value with which to perform bitwise or"],
110
110
  "XOR" => [8, "Deprecated", '', "value with which to perform bitwise xor"],
111
111
  "BIT_XOR" => [8, "Performs a bitwise ``xor`` operation. If the existing value in the database is not present or shorter than ``param``, it is first extended to the length of ``param`` with zero bytes. If ``param`` is shorter than the existing value in the database, the existing value is truncated to match the length of ``param``.", '', "value with which to perform bitwise xor"],
112
+ "APPEND_IF_FITS" => [9, "Appends ``param`` to the end of the existing value already in the database at the given key (or creates the key and sets the value to ``param`` if the key is empty). This will only append the value if the final concatenated value size is less than or equal to the maximum value size (i.e., if it fits). WARNING: No error is surfaced back to the user if the final value is too large because the mutation will not be applied until after the transaction has been committed. Therefore, it is only safe to use this mutation type if one can guarantee that one will keep the total value size under the maximum size.", '', "value to append to the database value"],
112
113
  "MAX" => [12, "Performs a little-endian comparison of byte strings. If the existing value in the database is not present or shorter than ``param``, it is first extended to the length of ``param`` with zero bytes. If ``param`` is shorter than the existing value in the database, the existing value is truncated to match the length of ``param``. The larger of the two values is then stored in the database.", '', "value to check against database value"],
113
114
  "MIN" => [13, "Performs a little-endian comparison of byte strings. If the existing value in the database is not present, then ``param`` is stored in the database. If the existing value in the database is shorter than ``param``, it is first extended to the length of ``param`` with zero bytes. If ``param`` is shorter than the existing value in the database, the existing value is truncated to match the length of ``param``. The smaller of the two values is then stored in the database.", '', "value to check against database value"],
114
- "SET_VERSIONSTAMPED_KEY" => [14, "Transforms ``key`` using a versionstamp for the transaction. Sets the transformed key in the database to ``param``. A versionstamp is a 10 byte, unique, monotonically (but not sequentially) increasing value for each committed transaction. The first 8 bytes are the committed version of the database. The last 2 bytes are monotonic in the serialization order for transactions. WARNING: At this time versionstamps are compatible with the Tuple layer only in the Java and Python bindings. Note that this implies versionstamped keys may not be used with the Subspace and Directory layers except in those languages.", '', "value to which to set the transformed key"],
115
- "SET_VERSIONSTAMPED_VALUE" => [15, "Transforms ``param`` using a versionstamp for the transaction. Sets ``key`` in the database to the transformed parameter. A versionstamp is a 10 byte, unique, monotonically (but not sequentially) increasing value for each committed transaction. The first 8 bytes are the committed version of the database. The last 2 bytes are monotonic in the serialization order for transactions. WARNING: At this time versionstamped values are not compatible with the Tuple layer.", '', "value to versionstamp and set"],
115
+ "SET_VERSIONSTAMPED_KEY" => [14, "Transforms ``key`` using a versionstamp for the transaction. Sets the transformed key in the database to ``param``. The key is transformed by removing the final four bytes from the key and reading those as a little-Endian 32-bit integer to get a position ``pos``. The 10 bytes of the key from ``pos`` to ``pos + 10`` are replaced with the versionstamp of the transaction used. The first byte of the key is position 0. A versionstamp is a 10 byte, unique, monotonically (but not sequentially) increasing value for each committed transaction. The first 8 bytes are the committed version of the database (serialized in big-Endian order). The last 2 bytes are monotonic in the serialization order for transactions. WARNING: At this time, versionstamps are compatible with the Tuple layer only in the Java and Python bindings. Also, note that prior to API version 520, the offset was computed from only the final two bytes rather than the final four bytes.", '', "value to which to set the transformed key"],
116
+ "SET_VERSIONSTAMPED_VALUE" => [15, "Transforms ``param`` using a versionstamp for the transaction. Sets the ``key`` given to the transformed ``param``. The parameter is transformed by removing the final four bytes from ``param`` and reading those as a little-Endian 32-bit integer to get a position ``pos``. The 10 bytes of the parameter from ``pos`` to ``pos + 10`` are replaced with the versionstamp of the transaction used. The first byte of the parameter is position 0. A versionstamp is a 10 byte, unique, monotonically (but not sequentially) increasing value for each committed transaction. The first 8 bytes are the committed version of the database (serialized in big-Endian order). The last 2 bytes are monotonic in the serialization order for transactions. WARNING: At this time, versionstamps are compatible with the Tuple layer only in the Java and Python bindings. Also, note that prior to API version 520, the versionstamp was always placed at the beginning of the parameter rather than computing an offset.", '', "value to versionstamp and set"],
116
117
  "BYTE_MIN" => [16, "Performs lexicographic comparison of byte strings. If the existing value in the database is not present, then ``param`` is stored. Otherwise the smaller of the two values is then stored in the database.", '', "value to check against database value"],
117
118
  "BYTE_MAX" => [17, "Performs lexicographic comparison of byte strings. If the existing value in the database is not present, then ``param`` is stored. Otherwise the larger of the two values is then stored in the database.", '', "value to check against database value"],
118
119
  }
@@ -23,7 +23,7 @@
23
23
  # FoundationDB Ruby API
24
24
 
25
25
  # Documentation for this API can be found at
26
- # https://www.foundationdb.org/documentation/api-ruby.html
26
+ # https://apple.github.io/foundationdb/api-ruby.html
27
27
 
28
28
  require_relative 'fdbtuple'
29
29
 
@@ -23,7 +23,7 @@
23
23
  # FoundationDB Ruby API
24
24
 
25
25
  # Documentation for this API can be found at
26
- # https://www.foundationdb.org/documentation/api-ruby.html
26
+ # https://apple.github.io/foundationdb/api-ruby.html
27
27
 
28
28
  module FDB
29
29
  module Tuple
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.5
4
+ version: 5.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - FoundationDB
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-11 00:00:00.000000000 Z
11
+ date: 2018-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -28,7 +28,7 @@ description: |
28
28
  Ruby bindings for the FoundationDB database.
29
29
 
30
30
  Complete documentation of the FoundationDB Ruby API can be found at:
31
- https://www.foundationdb.org/documentation/api-ruby.html.
31
+ https://apple.github.io/foundationdb/api-ruby.html.
32
32
  email: fdb-dist@apple.com
33
33
  executables: []
34
34
  extensions: []
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  requirements:
64
64
  - These bindings require the FoundationDB client. The client can be obtained from
65
- https://www.foundationdb.org/downloads/fdb-c/.
65
+ https://www.foundationdb.org/download/.
66
66
  rubyforge_project:
67
67
  rubygems_version: 2.2.2
68
68
  signing_key: