{"id":33258133,"url":"https://github.com/LooMaclin/tarantool_rs","last_synced_at":"2025-11-21T20:03:09.433Z","repository":{"id":202003578,"uuid":"77320479","full_name":"LooMaclin/tarantool_rs","owner":"LooMaclin","description":"Sync/Async tarantool database connector. WORK IN PROGRESS. DON'T SHARE THIS REPO","archived":false,"fork":false,"pushed_at":"2017-09-19T21:45:00.000Z","size":203,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-19T21:12:34.632Z","etag":null,"topics":["async","connector","driver","library","rust","sync","tarantool"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LooMaclin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-12-25T10:10:54.000Z","updated_at":"2023-11-14T13:46:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"5183d3e8-a4ca-496f-8cb4-df96ebf015fb","html_url":"https://github.com/LooMaclin/tarantool_rs","commit_stats":null,"previous_names":["loomaclin/tarantool_rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LooMaclin/tarantool_rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooMaclin%2Ftarantool_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooMaclin%2Ftarantool_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooMaclin%2Ftarantool_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooMaclin%2Ftarantool_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LooMaclin","download_url":"https://codeload.github.com/LooMaclin/tarantool_rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LooMaclin%2Ftarantool_rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285681625,"owners_count":27213755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","connector","driver","library","rust","sync","tarantool"],"created_at":"2025-11-17T03:00:30.887Z","updated_at":"2025-11-21T20:03:09.426Z","avatar_url":"https://github.com/LooMaclin.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# tarantool_rs\nSync/Async tarantool database connector.\n\n[![Build Status](https://travis-ci.org/LooMaclin/tarantool_rs.svg?branch=master)](https://travis-ci.org/LooMaclin/tarantool_rs)\n\n[![Coverage Status](https://coveralls.io/repos/github/LooMaclin/tarantool_rs/badge.svg?branch=master)](https://coveralls.io/github/LooMaclin/tarantool_rs?branch=master)\n\n# Overview\n- [Install](#install)\n- [Usage](#usage)\n    - [Include extern crate](#include-extern-crate)\n    - [Use modules](#use-modules)\n    - [Create tarantool connection instance](#create-tarantool-connection-instance)\n    - [Retrieve space id](#retrieve-space-id)\n    - [Retrieve index id](#retrieve-index-id)\n    - [Select](#select)\n    - [Insert](#insert)\n    - [Delete](#delete)\n    - [Upsert](#upsert)\n    - [Replace](#replace)\n    - [Call](#call)\n    - [Eval](#eval)\n    - [Update common](#update-common)\n    - [Update string](#update-string)\n    - [Update integer](#update-integer)\n\n# Install\n\n```toml\n[dependencies]\ntarantool = { git = \"https://github.com/LooMaclin/tarantool_rs.git\" }\n```\n\n# Usage\n\n## Include extern crate \n\n```rust\n\nextern crate tarantool;\n\n```\n\n## Use modules\n\n```rust\n\nuse tarantool::{Value, Tarantool, IteratorType, Select, Insert, Replace, Delete, UpdateCommon,\n                CommonOperation, Call, Eval, UpdateString, UpdateInteger, IntegerOperation, Upsert,\n                UpsertOperation};\n\n```\n\n## Create tarantool connection instance\n\n```rust\n\n    let mut tarantool_instance = Tarantool::auth(\"127.0.0.1:3301\", \"test\", \"test\").unwrap_or_else(|err| {\n        panic!(\"err: {}\", err);\n    });\n\n    let error_handler = |err| panic!(SyncClient, err);\n\n```\n\n## Retrieve space id\n\n```rust\n\n    let space_id = tarantool_instance.fetch_space_id(\"tester\");\n    debug!(\"Tester space id: {}\", space_id);\n\n```\n\n## Retrieve index id\n\n```rust\n\n    let index_id = tarantool_instance.fetch_index_id(space_id, \"primary\");\n    debug!(\"Tester primary index id: {}\", index_id);\n\n```\n\n## Select\n\n```rust\n\n    let select = Select {\n        space: 512,\n        index: 0,\n        limit: 100,\n        offset: 0,\n        iterator: IteratorType::All,\n        keys: \u0026vec![]\n    };\n\n    let tuples = tarantool_instance.request(\u0026select).unwrap_or_else(\u0026error_handler);\n\n    debug!(\"Select result: \");\n    for (index, tuple) in tuples.as_array().unwrap().iter().enumerate() {\n        let tuple = tuple.as_array().unwrap();\n        debug!(\"{}: {:?}\", index, tuple);\n    }\n    \n```\n\n## Insert\n\n```rust\n\n    let insert = Insert {\n        space: 512,\n        keys: \u0026vec![Value::from(9)]\n    };\n\n    debug!(\"Insert result: {:?}\", tarantool_instance.request(\u0026insert).unwrap_or_else(\u0026error_handler));\n\n```\n\n## Replace\n\n```rust\n\n    let replace = Replace {\n        space: 512,\n        keys: \u0026vec![Value::from(1), Value::String(String::from(\"TEST REPLACE\"))]\n    };\n\n    debug!(\"Replace result: {:?}\", tarantool_instance.request(\u0026replace).unwrap_or_else(\u0026error_handler));\n\n```\n\n## Update integer\n\n```rust\n\n    let update_integer = UpdateInteger {\n        space: 512,\n        index: 0,\n        operation_type: IntegerOperation::Addition,\n        field_number: 2,\n        argument: 1,\n        keys: \u0026vec![Value::from(4)]\n    };\n\n    debug!(\"Integer-Update result: {:?}\", tarantool_instance.request(\u0026update_integer).unwrap_or_else(\u0026error_handler));\n\n```\n\n## Update string\n\n```rust\n\n    let update_string = UpdateString {\n        space: 512,\n        index: 0,\n        field_number: 1,\n        position: 3,\n        offset: 3,\n        argument: \"TEST UPDATE STRING\".into(),\n        keys: \u0026vec![Value::from(2)]\n    };\n\n    debug!(\"String-Update result: {:?}\", tarantool_instance.request(\u0026update_string).unwrap_or_else(\u0026error_handler));\n\n```\n\n## Update common\n\n```rust\n\n    let update_common = UpdateCommon {\n        space: 512,\n        index: 0,\n        operation_type: CommonOperation::Assign,\n        field_number: 3,\n        argument: Value::String(String::from(\"Test Update Common Assign\")),\n        keys: \u0026vec![Value::from(6)]\n    };\n\n    debug!(\"Common-Update result: {:?}\", tarantool_instance.request(\u0026update_common).unwrap_or_else(\u0026error_handler));\n\n```\n\n## Delete\n\n```rust\n\n    let delete = Delete {\n        space: 512,\n        index: 0,\n        keys: \u0026vec![Value::from(3)]\n    };\n\n    debug!(\"Delete result: {:?}\", tarantool_instance.request(\u0026delete).unwrap_or_else(\u0026error_handler));\n\n```\n\n## Call\n\n```rust\n\n    let call = Call {\n        function_name: \"test\",\n        keys: \u0026vec![]\n    };\n\n    debug!(\"Call result: {:?}\", tarantool_instance.request(\u0026call).unwrap_or_else(\u0026error_handler));\n\n```\n\n## Eval\n\n```rust\n\n    let eval = Eval {\n        expression: r#\"return 5+5\"#,\n        keys: \u0026vec![]\n    };\n\n    debug!(\"Eval result: {:?}\", tarantool_instance.request(\u0026eval).unwrap_or_else(\u0026error_handler));\n\n```\n\n## Upsert\n\n```rust\n\n    let upsert = Upsert {\n        space: 512,\n        keys: \u0026vec![Value::from(5)],\n        operation_type: UpsertOperation::Add,\n        field_number: 2,\n        argument: 2,\n    };\n\n    debug!(\"Upsert result: {:?}\", tarantool_instance.request(\u0026upsert).unwrap_or_else(\u0026error_handler));\n\n```\n\n\n#Roadmap\n\n- [ ] Without heap-allocation\n- [ ] Sync connector\n- [ ] Ergonomic API with builders\n- [ ] Async connector\n- [ ] Full test coverage\n- [ ] Full-application examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLooMaclin%2Ftarantool_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLooMaclin%2Ftarantool_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLooMaclin%2Ftarantool_rs/lists"}