{"id":15814423,"url":"https://github.com/flosse/r2d2-jfs","last_synced_at":"2025-03-14T20:32:05.453Z","repository":{"id":57658290,"uuid":"205258903","full_name":"flosse/r2d2-jfs","owner":"flosse","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-25T12:28:56.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-05T04:41:04.789Z","etag":null,"topics":["file","jfs","json","r2d2"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flosse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-29T22:15:03.000Z","updated_at":"2021-10-25T12:28:54.000Z","dependencies_parsed_at":"2022-09-16T04:40:21.188Z","dependency_job_id":null,"html_url":"https://github.com/flosse/r2d2-jfs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flosse%2Fr2d2-jfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flosse%2Fr2d2-jfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flosse%2Fr2d2-jfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flosse%2Fr2d2-jfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flosse","download_url":"https://codeload.github.com/flosse/r2d2-jfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243642347,"owners_count":20324009,"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","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":["file","jfs","json","r2d2"],"created_at":"2024-10-05T04:40:28.980Z","updated_at":"2025-03-14T20:32:05.138Z","avatar_url":"https://github.com/flosse.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# r2d2-jfs\n\n## r2d2-jfs\n\n[JSON file store (`jfs`)](https://crates.io/crates/jfs) support for the\n[`r2d2`](https://crates.io/crates/r2d2) connection pool.\n\n### Example\n\n```rust\nuse std::thread;\nuse serde::{Serialize, Deserialize};\nuse r2d2_jfs::JfsConnectionManager;\n\n#[derive(Serialize, Deserialize)]\nstruct Data { x: i32 }\n\nfn main() {\n    let manager = JfsConnectionManager::file(\"file.json\").unwrap();\n    let pool = r2d2::Pool::builder().max_size(5).build(manager).unwrap();\n    let mut threads = vec![];\n    for i in 0..10 {\n        let pool = pool.clone();\n        threads.push(thread::spawn(move || {\n            let d = Data { x: i };\n            let conn = pool.get().unwrap();\n            conn.save(\u0026d).unwrap();\n        }));\n    }\n    for c in threads {\n        c.join().unwrap();\n    }\n}\n```\n\nLicense: Apache-2.0 OR MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflosse%2Fr2d2-jfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflosse%2Fr2d2-jfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflosse%2Fr2d2-jfs/lists"}