├── .github └── workflows │ └── rust.yml ├── .gitignore ├── .rustfmt.toml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── check.sh ├── couch_rs ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── examples │ ├── async_batch_read │ │ └── main.rs │ ├── basic_operations │ │ └── main.rs │ ├── typed_documents │ │ └── main.rs │ └── typed_views │ │ └── main.rs └── src │ ├── changes.rs │ ├── client.rs │ ├── database.rs │ ├── document.rs │ ├── error.rs │ ├── lib.rs │ ├── management.rs │ ├── model.rs │ ├── typed.rs │ └── types │ ├── changes.rs │ ├── design.rs │ ├── design_info.rs │ ├── document.rs │ ├── find.rs │ ├── index.rs │ ├── mod.rs │ ├── query.rs │ ├── system.rs │ └── view.rs ├── couch_rs_derive ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md └── src │ └── lib.rs ├── deny.toml ├── docker-compose.yml └── test.sh /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Build 20 | run: cargo build --verbose 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/rust 2 | 3 | ### Rust ### 4 | # Generated by Cargo 5 | # will have compiled files and executables 6 | /target/ 7 | 8 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 9 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 10 | Cargo.lock 11 | 12 | # These are backup files generated by rustfmt 13 | **/*.rs.bk 14 | 15 | # Exclude IntelliJ files 16 | .idea 17 | 18 | # Exclude VSCode files 19 | .vscode 20 | 21 | test_db.json 22 | *.tgz 23 | 24 | # End of https://www.gitignore.io/api/rust 25 | 26 | vendor/ 27 | .DS_Store 28 | -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | max_width = 120 2 | 3 | # Nightly only; disable on stable 4 | imports_granularity = "Crate" 5 | group_imports = "One" 6 | reorder_impl_items = true 7 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 6 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased](https://github.com/mibes/couch-rs/compare/0.12.0...develop) - ReleaseDate 9 | 10 | ## [0.12.0] - 2025-01-08 11 | 12 | ### Changed 13 | 14 | - BREAKING change: deleting a document now returns a `CouchResult<()>`; contributed by paulwrath1223 15 | 16 | ## [0.11.0] - 2024-10-17 17 | 18 | ### Added 19 | 20 | - Include support for typed databases; contributed by horacimacias 21 | 22 | ### Changed 23 | 24 | - Clippy suggestions fixed 25 | 26 | 27 | ## [0.10.1] - 2024-05-06 28 | 29 | ### Changed 30 | 31 | - Use http::StatusCode instead of reqwest::StatusCode in CouchError 32 | - Clippy suggestions fixed 33 | 34 | ## [0.10.0] - 2024-03-22 35 | 36 | ### Changed 37 | 38 | - Updated to Rust 2021 edition 39 | - Updated to reqwest 0.12; which is now using hyper v1 40 | 41 | ## [0.9.4] - 2023-11-15 42 | 43 | ### Added 44 | 45 | - Include a status() on DesignCreated to make it easier to switch from ensure_index() to insert_index() 46 | 47 | ## [0.9.3] - 2023-09-21 48 | 49 | - Fixes for structs implementing TypedCouchDocument where _id was not read using TypedCouchDocument::get_id() 50 | 51 | ## [0.9.2] - 2023-03-10 52 | 53 | ### Changed 54 | 55 | - Fixed RUSTSEC-2023-0018; updated base64 to 0.21; contributed by tkoeppen. 56 | 57 | ## [0.9.1] - 2023-01-03 58 | 59 | ### Added 60 | 61 | - Add `delete_index` operation; contributed by kingledion 62 | 63 | ### Changed 64 | 65 | - Update the arguments to `insert_index` to match the `types::index::Index struct`, to make it more compatible with 66 | the `get_indexes` method; contributed by kingledion 67 | - DEPRECATED: `ensure_index` 68 | 69 | ## [0.9.0] - 2022-08-23 70 | 71 | ### Changed 72 | 73 | - BREAKING change: `CouchError` is now an enum to easily differentiate using a match; contributed by jgrund 74 | - Add `membership` and `cluster_setup` read operations; contributed by hmacias 75 | 76 | ## [0.8.39] - 2022-07-13 77 | 78 | ### Changed 79 | 80 | - Dev dependencies updated for tokio; contributed by tkoeppen 81 | 82 | ## [0.8.38] - 2022-07-12 83 | 84 | ### Changed 85 | 86 | - Set minimal tokio version to 1.14 to ensure RUSTSEC-2021-0124 is patched. 87 | - Split unit-, doc- and integration-tests; contributed by tkoeppen 88 | - Percent encode the database name to accommodate special characters like '+'. 89 | 90 | ## [0.8.37] - 2022-03-25 91 | 92 | ### Changed 93 | 94 | - Allow non-string keys for views; contributed by marius851000 95 | - Updated tokio-util to 0.7 96 | 97 | ## [0.8.36] - 2022-02-09 98 | 99 | ### Added 100 | 101 | - Added into_option() to turn a Result into a Result