mirror of https://github.com/tikv/client-rust.git
docs: Cmake and gcc is not needed anymore (#403)
* docs: Cmake and gcc is not needed anymore Signed-off-by: Xuanwo <github@xuanwo.io> * Update links Signed-off-by: Xuanwo <github@xuanwo.io> --------- Signed-off-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
parent
797960edfb
commit
9ae3e4fa85
63
README.md
63
README.md
|
@ -1,7 +1,7 @@
|
|||
# TiKV Client (Rust)
|
||||
|
||||
[](https://docs.rs/tikv-client)
|
||||
[](https://travis-ci.org/tikv/client-rust)
|
||||
[](https://docs.rs/tikv-client)
|
||||
[](https://github.com/tikv/client-rust/actions/workflows/ci.yml)
|
||||
|
||||
This crate provides an easy-to-use client for [TiKV](https://github.com/tikv/tikv), a distributed, transactional key-value database written in Rust.
|
||||
|
||||
|
@ -21,8 +21,7 @@ tikv-client = "0.2.0"
|
|||
```
|
||||
|
||||
### Prerequisites
|
||||
- [`cmake`](https://cmake.org/) >= `3.12.0`, required for [`building gRPC in parallel`](https://cmake.org/cmake/help/latest/envvar/CMAKE_BUILD_PARALLEL_LEVEL.html)
|
||||
- [`gcc`](https://gcc.gnu.org/) >= `6.3.0`, required for [`building gRPC`](https://github.com/grpc/grpc/tree/master/src/cpp)
|
||||
|
||||
- [`rust`](https://www.rust-lang.org/) >= `1.56.1`, required for `hashbrown-v0.12.1`
|
||||
|
||||
The general flow of using the client crate is to create either a raw or transaction client object (which can be configured) then send commands using the client object, or use it to create transactions objects. In the latter case, the transaction is built up using various commands and then committed (or rolled back).
|
||||
|
@ -77,36 +76,36 @@ Important note: It is **not recommended or supported** to use both the raw and t
|
|||
|
||||
### Raw requests
|
||||
|
||||
| Request | Main parameter type | Result type | Noteworthy Behavior |
|
||||
| ------------------ | ------------------- | ---------------- | ---------------------------------------------- |
|
||||
| `put` | `KvPair` | | |
|
||||
| `get` | `Key` | `Option<Value>` | |
|
||||
| `delete` | `Key` | | |
|
||||
| `delete_range` | `BoundRange` | | |
|
||||
| `scan` | `BoundRange` | `Vec<KvPair>` | |
|
||||
| `batch_put` | `Iter<KvPair>` | | |
|
||||
| `batch_get` | `Iter<Key>` | `Vec<KvPair>` | Skips non-existent keys; does not retain order |
|
||||
| `batch_delete` | `Iter<Key>` | | |
|
||||
| `batch_scan` | `Iter<BoundRange>` | `Vec<KvPair>` | See docs for `each_limit` parameter behavior. The order of ranges is retained. |
|
||||
| `batch_scan_keys` | `Iter<BoundRange>` | `Vec<Key>` | See docs for `each_limit` parameter behavior. The order of ranges is retained. |
|
||||
| `compare_and_swap` | `Key` + 2x `Value` | `(Option<Value>, bool)` | |
|
||||
| Request | Main parameter type | Result type | Noteworthy Behavior |
|
||||
|--------------------|---------------------|-------------------------|--------------------------------------------------------------------------------|
|
||||
| `put` | `KvPair` | | |
|
||||
| `get` | `Key` | `Option<Value>` | |
|
||||
| `delete` | `Key` | | |
|
||||
| `delete_range` | `BoundRange` | | |
|
||||
| `scan` | `BoundRange` | `Vec<KvPair>` | |
|
||||
| `batch_put` | `Iter<KvPair>` | | |
|
||||
| `batch_get` | `Iter<Key>` | `Vec<KvPair>` | Skips non-existent keys; does not retain order |
|
||||
| `batch_delete` | `Iter<Key>` | | |
|
||||
| `batch_scan` | `Iter<BoundRange>` | `Vec<KvPair>` | See docs for `each_limit` parameter behavior. The order of ranges is retained. |
|
||||
| `batch_scan_keys` | `Iter<BoundRange>` | `Vec<Key>` | See docs for `each_limit` parameter behavior. The order of ranges is retained. |
|
||||
| `compare_and_swap` | `Key` + 2x `Value` | `(Option<Value>, bool)` | |
|
||||
|
||||
### Transactional requests
|
||||
|
||||
| Request | Main parameter type | Result type | Noteworthy Behavior |
|
||||
| ---------------------- | ------------------- | --------------- | ------------------------------------------------------------------ |
|
||||
| `put` | `KvPair` | | |
|
||||
| `get` | `Key` | `Option<value>` | |
|
||||
| `get_for_update` | `Key` | `Option<value>` | |
|
||||
| `key_exists` | `Key` | `bool` | |
|
||||
| `delete` | `Key` | | |
|
||||
| `scan` | `BoundRange` | `Iter<KvPair>` | |
|
||||
| `scan_keys` | `BoundRange` | `Iter<Key>` | |
|
||||
| `batch_get` | `Iter<Key>` | `Iter<KvPair>` | Skips non-existent keys; does not retain order |
|
||||
| `batch_get_for_update` | `Iter<Key>` | `Iter<KvPair>` | Skips non-existent keys; does not retain order |
|
||||
| `lock_keys` | `Iter<Key>` | | |
|
||||
| `send_heart_beat` | | `u64` (TTL) | |
|
||||
| `gc` | `Timestamp` | `bool` | Returns true if the latest safepoint in PD equals the parameter |
|
||||
| Request | Main parameter type | Result type | Noteworthy Behavior |
|
||||
|------------------------|---------------------|-----------------|-----------------------------------------------------------------|
|
||||
| `put` | `KvPair` | | |
|
||||
| `get` | `Key` | `Option<value>` | |
|
||||
| `get_for_update` | `Key` | `Option<value>` | |
|
||||
| `key_exists` | `Key` | `bool` | |
|
||||
| `delete` | `Key` | | |
|
||||
| `scan` | `BoundRange` | `Iter<KvPair>` | |
|
||||
| `scan_keys` | `BoundRange` | `Iter<Key>` | |
|
||||
| `batch_get` | `Iter<Key>` | `Iter<KvPair>` | Skips non-existent keys; does not retain order |
|
||||
| `batch_get_for_update` | `Iter<Key>` | `Iter<KvPair>` | Skips non-existent keys; does not retain order |
|
||||
| `lock_keys` | `Iter<Key>` | | |
|
||||
| `send_heart_beat` | | `u64` (TTL) | |
|
||||
| `gc` | `Timestamp` | `bool` | Returns true if the latest safepoint in PD equals the parameter |
|
||||
|
||||
# Development and contributing
|
||||
|
||||
|
@ -138,7 +137,7 @@ Please follow PingCAP's [Rust style guide](https://pingcap.github.io/style-guid
|
|||
|
||||
## Getting help
|
||||
|
||||
If you need help, either to find something to work on, or with any technical problem, the easiest way to get it is via internals.tidb.io, the forum for TiDB developers.
|
||||
If you need help, either to find something to work on, or with any technical problem, the easiest way to get it is via internals.tidb.io, the forum for TiDB developers.
|
||||
|
||||
You can also ask in Slack. We monitor the #client-rust channel on the [tikv-wg slack](https://tikv.org/chat).
|
||||
|
||||
|
|
Loading…
Reference in New Issue