Skip to content

Commit c51a1c9

Browse files
ligurioAnaNek
authored andcommitted
Doc: use custom sharding key to calculate bucket id
Describe functionality and current limitations (#212, #213 and #219) with custom sharding key in CHANGELOG and README. Closes #166
1 parent 2c624d7 commit c51a1c9

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2828
* `crud.len()` function to calculate the number of tuples
2929
in the space for memtx engine and calculate the maximum
3030
approximate number of tuples in the space for vinyl engine.
31+
<<<<<<< HEAD
3132
* Testing: added integration with service coveralls.io (PR #195).
3233
* Testing: added integration with luacov that allows to generate report with
3334
code coverage statistics (PR #195).
@@ -44,6 +45,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
4445
* Ignoring of an error in `crud.pairs()` (#144).
4546
* Damaging of opts table by CRUD methods (#192).
4647
* Ignoring of `bucket_id` option in `crud.select()`/`crud.pairs()` (#220).
48+
=======
49+
* CRUD operations calculates bucket id automatically using sharding
50+
key specified with DDL schema or in `_ddl_sharding_key` space.
51+
NOTE: CRUD methods delete(), get() and update() requires that sharding key
52+
must be a part of primary key.
53+
>>>>>>> 777933f... Doc: use custom sharding key to calculate bucket id
4754
4855
## [0.8.0] - 02-07-21
4956

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ local object, err = crud.get(space_name, key, opts)
162162
where:
163163

164164
* `space_name` (`string`) - name of the space
165-
* `key` (`any`) - primary key value
165+
* `key` (`any`) - primary key value in version < 0.8.0 and sharding key when
166+
DDL sharding key is used in version >= 0.8.0. See section 'Sharding key' above.
166167
* `opts`:
167168
* `fields` (`?table`) - field names for getting only a subset of fields
168169
* `bucket_id` (`?number|cdata`) - bucket ID
@@ -199,7 +200,8 @@ local object, err = crud.update(space_name, key, operations, opts)
199200
where:
200201

201202
* `space_name` (`string`) - name of the space
202-
* `key` (`any`) - primary key value
203+
* `key` (`any`) - primary key value in version < 0.8.0 and sharding key when
204+
DDL sharding key is used in version >= 0.8.0. See section 'Sharding key' above.
203205
* `operations` (`table`) - update [operations](https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/#box-space-update)
204206
* `opts`:
205207
* `timeout` (`?number`) - `vshard.call` timeout (in seconds)
@@ -232,7 +234,8 @@ local object, err = crud.delete(space_name, key, opts)
232234
where:
233235

234236
* `space_name` (`string`) - name of the space
235-
* `key` (`any`) - primary key value
237+
* `key` (`any`) - primary key value in version < 0.8.0 and sharding key when
238+
DDL sharding key is used in version >= 0.8.0. See section 'Sharding key' above.
236239
* `opts`:
237240
* `timeout` (`?number`) - `vshard.call` timeout (in seconds)
238241
* `bucket_id` (`?number|cdata`) - bucket ID

0 commit comments

Comments
 (0)