diff --git a/CHANGELOG.md b/CHANGELOG.md index d94e3d6..3864012 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,4 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] + +## [0.0.1] - 2023-05-15 +### Added + - Initial implementation. diff --git a/Cargo.toml b/Cargo.toml index 3e6b805..08fcc10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tarantool-rs" description = "Asyncronous tokio-based client for Tarantool" -version = "0.0.0" +version = "0.0.1" edition = "2021" authors = ["Andrey Kononov flowneee3@gmail.com"] license = "MIT" diff --git a/README.md b/README.md index 8d18f21..26f4465 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ -# `tarantool-rs` - Asyncronous tokio-based client for Tarantool +# `tarantool-rs` - Asyncronous Tokio-based client for Tarantool (WIP) ![CI](https://github.com/Flowneee/tarantool-rs/actions/workflows/ci.yml/badge.svg) + +`tarantool-rs` - asyncronous Tokio-based client for [Tarantool](https://www.tarantool.io). + +For examples of how to use this crate check `examples/` folder. + +## Features + +* [x] authorization; +* [x] evaluating Lua expressions) +* [x] function calling) +* [x] select from spaces +* [x] "DML" requests (insert/update/upsert/replace/delete) +* [x] transaction control (begin/commit/rollback) +* [ ] SQL requests +* [ ] chunked responses +* [ ] reconnection in background +* [ ] connection pooling +* [ ] automatic schema fetching and reloading +* [ ] ... + + diff --git a/examples/schema.rs b/examples/schema.rs index d78feab..a97f163 100644 --- a/examples/schema.rs +++ b/examples/schema.rs @@ -7,7 +7,6 @@ async fn main() -> Result<(), anyhow::Error> { let conn = Connection::builder().build("127.0.0.1:3301").await?; - //let data = get_list_of_user_spaces(&conn).await?; let data = SpaceMetadata::load_by_name(conn, "clients").await?; info!("{:?}", data); diff --git a/examples/transactions.rs b/examples/transactions.rs index 29ecbf6..55aed10 100644 --- a/examples/transactions.rs +++ b/examples/transactions.rs @@ -29,49 +29,5 @@ async fn main() -> Result<(), anyhow::Error> { vec![1.into()], ) .await?; - - // let eval_fut = connection - // .eval::<_, (u32, String)>( - // "fiber = require('fiber'); fiber.sleep(0.5); return ...;", - // vec![42.into(), "pong".into()], - // ) - // .inspect(|res| info!("Eval response: {:?}", res)); - // let call_fut = connection - // .call::<_, (String,)>("tostring", vec![42.into()]) - // .inspect(|res| info!("Call response: {:?}", res)); - // let ping_fut = connection - // .ping() - // .inspect(|res| info!("Ping response: {:?}", res)); - // let _ = tokio::join!(eval_fut, call_fut, ping_fut); - - // let stream = connection.stream(); - // let eval_fut = stream - // .eval::<_, (u32, String)>( - // "fiber = require('fiber'); fiber.sleep(0.5); return ...;", - // vec![42.into(), "pong".into()], - // ) - // .inspect(|res| info!("Eval response: {:?}", res)); - // let call_fut = stream - // .call::<_, (String,)>("tostring", vec![42.into()]) - // .inspect(|res| info!("Call response: {:?}", res)); - // let ping_fut = stream - // .ping() - // .inspect(|res| info!("Ping response: {:?}", res)); - // let _ = tokio::join!(eval_fut, call_fut, ping_fut); - - // let transaction = connection.transaction().await.unwrap(); - // let eval_fut = transaction - // .eval::<_, (u32, String)>( - // "fiber = require('fiber'); fiber.sleep(0.5); return ...;", - // vec![42.into(), "pong".into()], - // ) - // .inspect(|res| info!("Eval response: {:?}", res)); - // let call_fut = transaction - // .call::<_, (String,)>("tostring", vec![42.into()]) - // .inspect(|res| info!("Call response: {:?}", res)); - // let ping_fut = transaction - // .ping() - // .inspect(|res| info!("Ping response: {:?}", res)); - // let _ = tokio::join!(eval_fut, call_fut, ping_fut); Ok(()) } diff --git a/src/lib.rs b/src/lib.rs index 876e092..6e5706c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,7 @@ // * [ ] streaming responses for select // * [ ] background schema fetching, reloading and invalidating // * [ ] triggers on connection events (connect/disconnect/schema reloading) +// * [ ] SQL // // Other //