Skip to content

2.3.0

Choose a tag to compare

@makoni makoni released this 27 Jul 05:46
· 3 commits to master since this release
2b361b7

Major Features & Enhancements

  • Advanced Mango Queries Support

    • Introduced a robust and type-safe MangoQuery API for building complex selectors, projections, sorting, and pagination in CouchDB.
    • Added support for specifying indexes via useIndex in queries to optimize performance.
  • Attachments API

    • Added first-class support for uploading, downloading, and deleting document attachments (files/images).
    • Comprehensive Attachments API test suite ensures reliability for file operations.
  • Index Management

    • Added models and API for creating, listing, and managing Mango indexes (MangoIndex, IndexDefinition).
    • Tutorial and code samples for creating indexes are now included in documentation.
  • Query Explain

    • Added support for CouchDB Mango _explain endpoint via MangoExplainResponse to inspect how queries are executed and which indexes are used.

Documentation

  • Expanded README with:
    • Feature list
    • Usage examples for Attachments API and Mango queries
    • Supported platforms and Swift versions
    • Testing instructions
  • Added new in-code tutorials on:
    • Advanced Mango Queries (selectors, sorting, projections, index usage)
    • Creating Mango indexes

Testing

  • New test suites for:
    • Attachments API (upload, download, delete, and database setup/teardown)
    • MangoQuery encoding/decoding, MangoIndex encoding, MangoValue decoding
    • End-to-end index creation, listing, and query explain
  • Improved error handling tests for document CRUD operations and database creation

Breaking Changes

  • Mango Queries API

    • The find method now expects a MangoQuery instead of a generic selector dictionary.
    • Sort and projection parameters are now passed via MangoQuery.
  • Tests

    • Existing tests for Mango queries have been refactored to use the new type-safe API.

Miscellaneous

  • Various internal refactorings and improved error handling for database and document operations.
  • Updated documentation links and structure for clarity.
  • License explicitly stated in README.

Upgrade Notes:
If you use Mango queries or attachments, please update your code to use the new MangoQuery, MangoIndex, and attachment API signatures as shown in the updated documentation and code samples. For Swift 6+, enjoy strict concurrency and actor-based client; for Swift 5.x, use version 1.7.0.