You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is the official client for the free and open-source NoSQL database [Skytable](https://github.com/skytable/skytable). First, go ahead and install Skytable by following the instructions [here](https://docs.skytable.io/getting-started). This library supports all Skytable versions that work with the [Skyhash 2 Protocol](https://docs.skytable.io/protocol/overview). This version of the library was tested with the latest Skytable release (release [0.8.0-beta](https://github.com/skytable/skytable/releases/v0.8.0-beta)).
11
6
12
-
## Features
13
-
14
-
- Sync API
15
-
- Async API
16
-
- TLS in both sync/async APIs
17
-
- Connection pooling for sync/async
18
-
- Use both sync/async APIs at the same time
19
-
- Always up-to-date
20
-
21
-
## Using this library
7
+
## Definitive example
22
8
23
9
This library only ships with the bare minimum that is required for interacting with Skytable. Once you have
24
10
Skytable installed and running, you're ready to follow this guide!
@@ -41,22 +27,45 @@ skytable = "0.8"
41
27
You're ready to go!
42
28
43
29
```rust
44
-
useskytable::{Config, query};
30
+
useskytable::{Query, Response, Config, query};
31
+
32
+
#[derive(Query, Response)]
33
+
#[derive(Clone, PartialEq, Debug)] // we just do these for the assert (they are not needed)
letquery=query!("select username, password from myspace.mytbl WHERE username = ?", your_fn_to_get_user());
48
-
let (username, password) =db.query_parse::<(String, String)>(&query).unwrap();
44
+
45
+
// insert data
46
+
letq=query!("insert into myspace.mymodel(?, ?, ?, ?)", our_user.clone());
47
+
db.query_parse::<()>(&q).unwrap();
48
+
49
+
// select data
50
+
letuser:User=db.query_parse(&query!("select * from myspace.mymodel where username = ?", &our_user.userid)).unwrap();
51
+
assert_eq!(user, our_user);
49
52
```
50
53
51
54
> **Read [docs here to learn BlueQL](https://docs.skytable.io/)**
52
55
56
+
## Features
57
+
58
+
- Sync API
59
+
- Async API
60
+
- TLS in both sync/async APIs
61
+
- Connection pooling for sync/async
62
+
- Use both sync/async APIs at the same time
63
+
- Always up-to-date
64
+
53
65
## Contributing
54
66
55
-
Open-source, and contributions ... — they're always welcome! For ideas and suggestions,
56
-
[create an issue on GitHub](https://github.com/skytable/client-rust/issues/new) and for patches,
57
-
fork and open those pull requests [here](https://github.com/skytable/client-rust)!
67
+
Open-source, and contributions ... — they're always welcome! For ideas and suggestions, [create an issue on GitHub](https://github.com/skytable/client-rust/issues/new) and for patches, fork and open those pull requests [here](https://github.com/skytable/client-rust)!
58
68
59
69
## License
60
70
61
-
This client library is distributed under the permissive
62
-
[Apache-2.0 License](https://github.com/skytable/client-rust/blob/next/LICENSE). Now go build great apps!
71
+
This client library is distributed under the permissive [Apache-2.0 License](https://github.com/skytable/client-rust/blob/next/LICENSE). Now go build great apps!
0 commit comments