r2d2-couchdb: CouchDB support for the r2d2 connection pool

Related tags

Database couchdb r2d2
Overview

r2d2-couchdb Build Status MIT License Apache 2.0

CouchDB support library for the r2d2 connection pool. Read the documentation.

Example

extern crate r2d2;
extern crate r2d2_couchdb;
extern crate serde_json;

use r2d2_couchdb::{CouchdbConnectionManager};

use std::thread;

fn main() {
    let config = r2d2::Config::default();
    let manager = CouchdbConnectionManager::new("http://localhost:5984/").unwrap();
    let pool = r2d2::Pool::new(config, manager).unwrap();

    let mut handles = vec![];

    for i in 0..20 {
        let pool = pool.clone();
        handles.push(thread::spawn(move || {
            let content = serde_json::builder::ObjectBuilder::new()
                .insert("foo", i)
                .unwrap();
            println!("Sending {}", &content);
            let conn = pool.get().unwrap();
            conn.create_document("/test", &content).run().unwrap();
        }));
    }

    for handle in handles {
        handle.join().unwrap()
    }
}
You might also like...
Sofa - CouchDB for Rust
Sofa - CouchDB for Rust

Sofa - CouchDB for Rust Documentation Here: http://docs.rs/sofa Installation [dependencies] sofa = "0.6" Description This crate is an interface to Cou

A programmable document database inspired by CouchDB written in Rust

PliantDB PliantDB aims to be a Rust-written, ACID-compliant, document-database inspired by CouchDB. While it is inspired by CouchDB, this project will

CouchDB client library for the Rust programming language

CouchDB This project is reborn! As of its v0.6.0 release, the couchdb crate has new life as a toolkit instead of providing a full-blown client. In a n

A programmable document database inspired by CouchDB written in Rust

BonsaiDb Formerly known as PliantDb. Not yet released on crates.io as BonsaiDb. BonsaiDb aims to be a Rust-written, ACID-compliant, document-database

Streaming Network Overlay Connection Arbitration Tunnel

SNOCAT Streaming Network Overlay Connection Arbitration Tunnel snocat is a framework for forwarding streams across authenticated, encrypted QUIC tunne

Diesel async connection implementation

A async interface for diesel Diesel gets rid of the boilerplate for database interaction and eliminates runtime errors without sacrificing performance

Lightweight async Redis client with connection pooling written in pure Rust and 100% memory safe
Lightweight async Redis client with connection pooling written in pure Rust and 100% memory safe

redi-rs (or redirs) redi-rs is a Lightweight Redis client with connection pooling written in Rust and 100% memory safe redi-rs is a Redis client writt

An async executor based on the Win32 thread pool API

wae An async executor based on the Win32 thread pool API use futures::channel::oneshot; #[wae::main] async fn main() { let (tx, rx) = oneshot::ch

This represents staked SOL, and can be sold for wSOL in the wSOL/stSOL Liquidity Pool

This represents staked SOL, and can be sold for wSOL in the wSOL/stSOL Liquidity Pool (paying a fee to skip the unstaking cool-down period). The value of your stSOL holdings is automatically incremented each epoch when staking rewards are paid.

Owner
Pablo Aguiar
FOSS Advocate ❤️           SDE @Kite-Consult ⚡️         Mentor @HackIllinois 🙌        ex @globocom 💙           Coffee Geek ☕️
Pablo Aguiar
LDAP support for the r2d2 connection pool

r2d2-ldap LDAP support for the r2d2 connection pool Install Add this to your Cargo.toml: [dependencies] r2d2-ldap = "0.1.1" Basic Usage use std::threa

Aitor Ruano 2 Nov 7, 2020
Oracle support for the r2d2 connection pool

r2d2-oracle The documentation can be found on docs.rs. Oracle support for the r2d2 connection pool. This fits in between the r2d2 connection manager a

Ralph Ursprung 7 Dec 14, 2022
rust-mysql-simple support library for the r2d2 connection pool

r2d2-mysql rust-mysql-simple support library for the r2d2 connection pool.

outersky 44 Nov 1, 2022
Memcached support for the r2d2 connection pool (Rust)

Memcached support for the r2d2 connection pool (Rust)

川田 恵氏 (Kawada Keishi a.k.a megumish) 4 Jul 12, 2022
rust-postgres support library for the r2d2 connection pool

r2d2-postgres Documentation rust-postgres support library for the r2d2 connection pool. Example use std::thread; use r2d2_postgres::{postgres::NoTls,

Steven Fackler 128 Dec 26, 2022
ODBC adapter for r2d2 connection pool

ODBC adapter for r2d2 connection pool

Konstantin V. Salikhov 9 Nov 3, 2021
Skytable rust client support library for the bb8 connection pool

bb8-skytable Skytable rust client support library for the bb8 connection pool. Heavily based on bb8-redis Basic usage example use bb8_skytable::{

null 3 Sep 18, 2021
A generic connection pool for Rust

r2d2 A generic connection pool for Rust. Documentation Opening a new database connection every time one is needed is both inefficient and can lead to

Steven Fackler 1.2k Jan 8, 2023
Quick Pool: High Performance Rust Async Resource Pool

Quick Pool High Performance Rust Async Resource Pool Usage DBCP Database Backend Adapter Version PostgreSQL tokio-postgres qp-postgres Example use asy

Seungjae Park 13 Aug 23, 2022
CouchDB client-side library for the Rust programming language

Chill Chill is a client-side CouchDB library for the Rust programming language, available on crates.io. It targets Rust Stable. Chill's three chief de

null 35 Jun 26, 2022