{"id":19464535,"url":"https://github.com/wolf4ood/orientdb-rs","last_synced_at":"2025-10-10T20:36:34.341Z","repository":{"id":57650361,"uuid":"200118356","full_name":"wolf4ood/orientdb-rs","owner":"wolf4ood","description":"A Rust client for OrientDB","archived":false,"fork":false,"pushed_at":"2024-10-25T07:27:56.000Z","size":194,"stargazers_count":17,"open_issues_count":8,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-27T19:36:06.636Z","etag":null,"topics":["graph","orientdb","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wolf4ood.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-01T20:58:50.000Z","updated_at":"2025-09-10T20:17:52.000Z","dependencies_parsed_at":"2025-04-25T09:39:22.328Z","dependency_job_id":"0152879f-069d-474a-afc2-28df4e19ff68","html_url":"https://github.com/wolf4ood/orientdb-rs","commit_stats":{"total_commits":142,"total_committers":3,"mean_commits":"47.333333333333336","dds":0.3943661971830986,"last_synced_commit":"0e9f352a674a18ea3f2a70d87ed69cc41a0e1624"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/wolf4ood/orientdb-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf4ood%2Forientdb-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf4ood%2Forientdb-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf4ood%2Forientdb-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf4ood%2Forientdb-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolf4ood","download_url":"https://codeload.github.com/wolf4ood/orientdb-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf4ood%2Forientdb-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005273,"owners_count":26083863,"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-10-10T02:00:06.843Z","response_time":62,"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":["graph","orientdb","rust"],"created_at":"2024-11-10T18:15:45.552Z","updated_at":"2025-10-10T20:36:34.324Z","avatar_url":"https://github.com/wolf4ood.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eorientdb-rs\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n \u003cstrong\u003e\n   A Rust Client for OrientDB\n \u003c/strong\u003e\n\u003c/div\u003e\n\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/wolf4ood/orientdb-rs/actions?query=workflow%3ATests\"\u003e\n    \u003cimg src=\"https://github.com/wolf4ood/orientdb-rs/workflows/Tests/badge.svg\"\n    alt=\"Tests status\" /\u003e\n  \u003c/a\u003e\n  \n  \u003ca href=\"https://coveralls.io/github/wolf4ood/orientdb-rs?branch=master\"\u003e\n    \u003cimg src=\"https://coveralls.io/repos/github/wolf4ood/orientdb-rs/badge.svg?branch=master\"\n    alt=\"Coverage status\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/orientdb-client\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/d/orientdb-client.svg?style=flat-square\"\n      alt=\"Download\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://docs.rs/orientdb-client\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\"\n      alt=\"docs.rs docs\" /\u003e\n  \u003c/a\u003e\n\n   \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"\n      alt=\"license\" /\u003e\n  \u003c/a\u003e\n\n   \u003ca href=\"https://deps.rs/repo/github/wolf4ood/orientdb-rs\"\u003e\n    \u003cimg src=\"https://deps.rs/repo/github/wolf4ood/orientdb-rs/status.svg\"\n      alt=\"license\" /\u003e\n  \u003c/a\u003e\n\n\n  \n\u003c/div\u003e\n\n\n\n## OrientDB Client\n\n\nA Rust Client for OrientDB. Supports sync and async (tokio and async-std)\n\n\n### Installation\n\n\nInstall from [crates.io](https://crates.io/)\n\n```toml\n[dependencies]\norientdb-client = \"*\"\n```\n\n### Cargo Features\n\n- `async-std-runtime`: use the async APIs with `async-std`.\n- `tokio-runtime`: use the async APIs with `tokio`.\n- `uuid`: Add support for UUID.\n- `sugar`: Add ergonimic APIs for querying and binding results to structs\n\n### Example\n\n\n#### Basic Usage Synchronous\n\n\n\n```rust\n\nuse orientdb_client::{OrientDB};\n\nfn main() -\u003e Result\u003c(), Box\u003cstd::error::Error\u003e\u003e {\n    let client = OrientDB::connect((\"localhost\",2424))?;\n\n    let session = client.session(\"demodb\",\"admin\",\"admin\")?;\n\n    let results : Vec\u003c_\u003e = session.query(\"select from V where id = :param\").named(\u0026[(\"param\", \u00261)]).run()?.collect();\n\n\n    println!(\"{:?}\", results);\n\n    Ok(())\n}\n```\n\n#### Basic Usage Asynchronous\n\n\nFor [async-std](https://async.rs/)\n\nactivate the feature `async-std-runtime`\n\n`orientdb-client = { version = \"*\", features = [\"async-std-runtime\"] }`\n\n```rust\nuse async_std::task::block_on;\nuse futures::StreamExt;\nuse orientdb_client::aio::OrientDB;\nuse orientdb_client::OrientResult;\n\nfn main() -\u003e OrientResult\u003c()\u003e {\n    block_on(async {\n        let client = OrientDB::connect((\"localhost\", 2424)).await?;\n\n        let session = client.session(\"demodb\", \"admin\", \"admin\").await?;\n\n        let mut stream = session.query(\"select from V limit 10\").run().await?;\n\n        while let Some(item) = stream.next().await {\n            println!(\"Record {:?}\", item?);\n        }\n\n        Ok(())\n    })\n}\n```\n\n\nFor [tokio](https://tokio.rs/)\n\nactivate the feature `tokio-runtime`\n\n`orientdb-client = { version = \"*\", features = [\"tokio-runtime\"] }`\n\n\n```rust\nuse futures::StreamExt;\nuse orientdb_client::aio::OrientDB;\nuse orientdb_client::OrientResult;\n\n#[tokio::main]\nasync fn main() -\u003e OrientResult\u003c()\u003e {\n    let client = OrientDB::connect((\"localhost\", 2424)).await?;\n\n    let session = client.session(\"demodb\", \"admin\", \"admin\").await?;\n\n    let mut stream = session.query(\"select from V limit 10\").run().await?;\n\n    while let Some(item) = stream.next().await {\n        println!(\"Record {:?}\", item?);\n    }\n\n    Ok(())\n}\n```\n\n\n### Additional Features\n\n\n#### `sugar` feature\n\n\nThe `sugar` feature add 3 methods to the query builder for spawning the query. \n\n- `fetch_one`\n- `fetch`\n- `stream` for async or `iter` for sync\n\n\nThey should be used instead of `run` APIs when you want to execute the query and map the `OResult` into a struct. \n\nThe `sugar` is supported in sync and async mode.\n\n\n**fetch_one**\n\nConsume the stream and fetch the first result if any.\n\n```rust\nuse orientdb_client::derive::FromResult;\n#[derive(FromResult, Debug)]\nstruct User {\n    name: String,\n}\n\n// fetch one\nlet user: Option\u003cUser\u003e = session\n    .query(\"select from OUser limit 1\")\n    .fetch_one()\n    .await?;\n\nprintln!(\"User {:?}\", user);`\n```\n\n\n**fetch**\n\nCollect the stream to a `Vec` and map to struct.\n\n```rust\nuse orientdb_client::derive::FromResult;\n#[derive(FromResult, Debug)]\nstruct User {\n    name: String,\n}\n\n// fetch \nlet user: Vec\u003cUser\u003e = session\n    .query(\"select from OUser limit 1\")\n    .fetch()\n    .await?;\n\nprintln!(\"Users {:?}\", user);`\n```\n\n\n**stream**\n\n Map each item of the stream to a struct.\n\n```rust\nuse orientdb_client::derive::FromResult;\n#[derive(FromResult, Debug)]\nstruct User {\n    name: String,\n}\n\n// fetch stream and collect\nlet stream = session\n            .query(\"select from OUser\")\n            .stream::\u003cUser\u003e()\n            .await?\n            .collect::\u003cVec\u003c_\u003e\u003e()\n            .await;\nprintln!(\"Users {:?}\", user);\n\n```\n\n\n\n\n### Development\n\n\n#### Compiling\n\n\n\n```\ngit clone https://github.com/wolf4ood/orientdb-rs.git\ncd orientdb-rs\ncargo build\n```\n\n\n#### Running Tests\n\n\n\nYou can use docker-compose to start an instance for testing. Use the env variable `ORIENTDB_SERVER`\nin order to specify the version of OrientDB\n\n```\ncd docker-compose\nexport ORIENTDB_SERVER=3.0.23\ndocker-compose up -d\ncd ..\ncargo test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolf4ood%2Forientdb-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolf4ood%2Forientdb-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolf4ood%2Forientdb-rs/lists"}