CouchDB client library for the Rust programming language

Related tags

Database couchdb
Overview

CouchDB

Build Status


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 nutshell, the couchdb crate now provides passive, “building-block” types for working with CouchDB in Rust. Applications may use as few or as many of these types as makes the most sense. Actual HTTP communication with a CouchDB server is now accomplished by some other means, such as hyper or reqwest.

Project roadmap

The latest release is v0.6.0, which was released 2017-07-17.

The next release is expected to be v0.6.1 and has no schedule.

License

CouchDB-rs is licensed under either of:

Feedback

Do you find this crate useful? Not useful? Please send feedback!

Comments
  • Publishing a new minor version

    Publishing a new minor version

    Hi. https://github.com/rust-lang/rust/pull/42125 is going to turn some old compatibility "private-in-public" warnings in rustc into hard errors. crates.io testing discovered that published version of this crate is affected by one of those errors. The problem seems to be fixed on the current master, could you push it on crates.io as couchdb-0.5.2? (Even if the crate is deprecated, it would still be useful for the compiler's regression testing.)

    opened by petrochenkov 2
  • Tests not fully supported on Windows.

    Tests not fully supported on Windows.

    Our integration tests rely on starting and stopping a temporary CouchDB server. On Windows there are some problems doing this.

    Consequently, the integration test get_view fails.

    $ cargo test get_view
         Running target\debug\commands-8c77530f0accee12.exe
    
    running 1 test
    test get_view ... FAILED
    
    failures:
    
    ---- get_view stdout ----
            thread 'get_view' panicked at 'called `Result::unwrap()` on an `Err` value: InternalServerError { response: ErrorResponse { error: "EXIT", reason: "{{badmatch,{error,{bad_return_value,{os_process_error,{exit_status,4}}}}},\n [{couch_query_servers,new_process,3,\n                       [{file,\"c:/cygwin/relax/APACHE~2.1/src/couchdb/couch_query_servers.erl\"},\n                        {line,477}]},\n  {couch_query_servers,lang_proc,3,\n                       [{file,\"c:/cygwin/relax/APACHE~2.1/src/couchdb/couch_query_servers.erl\"},\n{line,462}]},\n  {couch_query_servers,handle_call,3,\n[{file,\"c:/cygwin/relax/APACHE~2.1/src/couchdb/couch_query_servers.erl\"},\n                        {line,334}]},\n  {gen_server,handle_msg,5,[{file,\"gen_server.erl\"},{line,585}]},\n  {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,239}]}]}" } }', ../src/libcore\result.rs:732
    
    failures:
        get_view
    
    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
    
    thread '<main>' panicked at 'Some tests failed', ../src/libtest/lib.rs:252
    

    Also, the integration tests assume CouchDB is installed in the default path. From src/server.rs:

    c.arg("c:/program files (x86)/apache software foundation/couchdb/etc/couchdb/default.ini");
    c.arg("c:/program files (x86)/apache software foundation/couchdb/etc/couchdb/local.ini");
    

    Lastly, the tests run slowly, and CPU use for the test executable seems excessive.

    bug 
    opened by cmbrandenburg 2
  • Define types for document id and database name

    Define types for document id and database name

    Define DocumentId and DatabaseName types. These types would replace the &str type currently used for identifying documents and databases, thereby making our crate's API more type-safe.

    breaking change 
    opened by cmbrandenburg 2
  • Resuscitate this crate

    Resuscitate this crate

    Resuscitate this crate as a low-level interface to the CouchDB API and for Chill to be implemented using this crate.

    The idea is for this crate to provide a one-to-one mapping between Rust and the CouchDB API (paths, query parameters, headers, etc.), while Chill would provide the same functionality but at a higher level, including such things as document/attachment management.

    opened by cmbrandenburg 1
  • Improve type-safety for request- and response-specific types

    Improve type-safety for request- and response-specific types

    CouchDB uses different types in requests and responses for representing the same entity. For example, an embedded attachment contains different fields as a request originating from the client (e.g., the follows field) than as a response originating from the server (e.g.., the digest field). Currently, our crate's API uses strong types for responses and a quasi builder pattern when constructing requests.

    It may be better to use strong types for both requests and responses.

    This issue tracks the design and implementation of strong types for request- and response-specific types.

    Here is a list of types for consideration:

    • Documents, retrieved via GET /db/doc and updated via PUT /db/doc.
    • Embedded attachments, retrieved via GET /db/doc and updated via PUT /db/doc.
    • Standalone attachments, retrieved via GET /db/doc/attachment and updated via PUT /db/doc/attachment.
    wontfix breaking change 
    opened by cmbrandenburg 1
  • Use special type for heartbeat parameter for GetChanges action

    Use special type for heartbeat parameter for GetChanges action

    Currently, the GetChanges action has two methods for setting the heartbeat query parameter: heartbeat and default_heartbeat. This is a workaround for using a std::time::Duration type to represent the heartbeat value because the duration type cannot express the valid parameter value of true. The true value explicitly signifies a default heartbeat value.

    Wrap the std::time::Duration type in a special type for representing all heartbeat values, and consolidate the two heartbeat methods into one method.

    design fix 
    opened by cmbrandenburg 1
  • New action to POST a view

    New action to POST a view

    Add an action to POST a view (e.g., /db/_design/design-doc/_view/view-name). The POST action is the same as the GET action but with a request body that specifies which keys the server should include in the response.

    wontfix couchdb api coverage 
    opened by cmbrandenburg 1
  • Revisions don't compare as numbers

    Revisions don't compare as numbers

    CouchDB revisions comprise a number followed by a hash value. A revision with a smaller number is less than a revision with a bigger number.

    However, the Revision type compares the number parts lexicographically. E.g., 7 should be less than 13, but the Revision type orders 13 before 7 because the character '1' is less than the character '7'.

    The following program demonstrates the problem by failing the assertion:

    let r1 = couchdb::Revision::from("7-12345678123456781234567812345678");
    let r2 = couchdb::Revision::from("13-12345678123456781234567812345678");
    assert!(r1 < r2);
    
    bug breaking change 
    opened by cmbrandenburg 1
  • Support for filter functions

    Support for filter functions

    Add support for CouchDB filter functions.

    The use of filter functions depends upon the implementation of change notifications (issue #12).

    This issue excludes adding support for built-in filters (i.e., _doc_ids, _design, and _view).

    wontfix couchdb api coverage 
    opened by cmbrandenburg 1
  • Support for asynchronous commands

    Support for asynchronous commands

    Add support for running commands asynchronously, meaning the method to run the command returns immediately and the command result is returned to the application via some other means, such as by callback.

    enhancement wontfix 
    opened by cmbrandenburg 1
  • Don't require applications to use serde

    Don't require applications to use serde

    The couchdb crate currently requires applications to use serde to serialize and deserialize JSON—e.g., document content, view keys, etc.

    At a minimum, the couchdb crate should also support rustc_serialize. Possibly the couchdb crate should support all serialization and deserialization techniques an application may use.

    wontfix breaking change 
    opened by cmbrandenburg 1
  • Need some examples

    Need some examples

    Hello, where I can find some example how to use this lib.

    I simply need to connect to db and register handler for changes.

    Documentation does not explain it directly.

    opened by piotr-placzek 2
  • Travis CI builds don't run documentation tests

    Travis CI builds don't run documentation tests

    Currently, the Travis CI builds don't run documentation tests. This is because Cargo runs documentation tests only if the command line specifies no test filter. However, we use the test filter --lib to avoid running any integration tests, which would fail because the Travis CI build agent doesn't have a CouchDB server installed.

    Therefore, resolving this issue will require better support for running documentation tests using Cargo.

    build system 
    opened by cmbrandenburg 2
Owner
null
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

null 20 Jul 17, 2021
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

66 Origin 40 Feb 11, 2022
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

Khonsu Labs 718 Dec 31, 2022
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

Khonsu Labs 721 Jan 2, 2023
Affine-client is a client for AFFINE based on Tauri

Affine Client affine-client is a client for AFFINE based on Tauri Supported Platforms Windows Linux MacOS Download https://github.com/m1911star/affine

Horus 216 Dec 25, 2022
Native PostgreSQL driver for the Rust programming language

Rust-Postgres PostgreSQL support for Rust. postgres Documentation A native, synchronous PostgreSQL client. tokio-postgres Documentation A native, asyn

Steven Fackler 2.8k Jan 8, 2023
Bind the Prisma ORM query engine to any programming language you like ❤️

Prisma Query Engine C API Bind the Prisma ORM query engine to any programming language you like ❤️ Features Rust bindings for the C API Static link li

Prisma ORM for community 10 Dec 15, 2022
Bind the Prisma ORM query engine to any programming language you like ❤️

Prisma Query Engine C API Bind the Prisma ORM query engine to any programming language you like ❤️ Features Rust bindings for the C API Static link li

Odroe 6 Sep 9, 2022
Cassandra DB native client written in Rust language. Find 1.x versions on https://github.com/AlexPikalov/cdrs/tree/v.1.x Looking for an async version? - Check WIP https://github.com/AlexPikalov/cdrs-async

CDRS CDRS is looking for maintainers CDRS is Apache Cassandra driver written in pure Rust. ?? Looking for an async version? async-std https://github.c

Alex Pikalov 338 Jan 1, 2023
rinflux is Rust based influx client implementation that have been inspired from influx other language implementation, developed with 💖

Unofficial InfluxDB Driver for Rust This library is a work in progress. This means a feature you might need is not implemented yet or could be handled

Workfoxes 1 Apr 7, 2022
An etcd client library for Rust.

etcd An etcd client library for Rust. etcd on crates.io Documentation for the latest crates.io release Running the tests Install Docker and Docker Com

Jimmy Cuadra 138 Dec 27, 2022
Mysql client library implemented in rust.

mysql This crate offers: MySql database driver in pure rust; connection pool. Features: macOS, Windows and Linux support; TLS support via nativetls cr

Anatoly I 548 Dec 31, 2022
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
OBKV Table Client is Rust Library that can be used to access table data from OceanBase storage layer.

OBKV Table Client is Rust Library that can be used to access table data from OceanBase storage layer. Its access method is different from JDBC, it skips the SQL parsing layer, so it has significant performance advantage.

OceanBase 4 Nov 14, 2022
rustodrive is a rust client library for communicating with ODrives using the CAN protocol.

rustodrive is a WIP client library for communicating with ODrives using the CAN protocol. It is more than a simple CAN sender/receiver and has many co

null 5 Oct 31, 2022
An async-ready Phoenix Channels v2 client library in Rust

Phoenix Channels This crate implements a Phoenix Channels (v2) client in Rust. Status NOTE: This client is still a work-in-progress, though it has eno

LiveView Native 22 Jan 7, 2023
LDAP client library

LDAP client library A pure-Rust LDAP client library using the Tokio stack. Compatibility with Tokio versions Tokio 1.0 is the long-term stable version

null 166 Jan 4, 2023
Async Lightweight HTTP client using system native library if possible. (Currently under heavy development)

Async Lightweight HTTP Client (aka ALHC) What if we need async but also lightweight http client without using such a large library like reqwest, isahc

SteveXMH 7 Dec 15, 2022
A simple, workable RCS client library.

rust-rcs-client A simple, workable RCS client library. RCS capabilities are mainly provided by your cellular network. This is a working client side im

EverfrosT 3 Jul 6, 2023