CouchDBClientCouchDBClientClassCouchDBClientA CouchDB client actor with methods using Swift Concurrency.actor CouchDBClientOverviewA powerful and flexible CouchDB client for Swift, designed to simplify database interactions using Swift Concurrency.OverviewCouchDBClient provides a robust set of tools for interacting with CouchDB databases. It supports common database operations such as creating, deleting, and querying databases and documents. Built with Swift Concurrency, it ensures efficient and modern asynchronous programming.This client is fully compatible with SwiftNIO, making it ideal for both server-side and client-side Swift applications.TopicsInitializationinit(config: CouchDBClient.Config, httpClient: HTTPClient?, eventLoopGroup: (any EventLoopGroup)?)Initializes a new instance of the CouchDB client using the provided configuration.func shutdown() async throwsShuts down the HTTP client used by the CouchDB client.Database Managementfunc getAllDBs(eventLoopGroup: (any EventLoopGroup)?) async throws -> [String]Retrieves a list of all database names from the CouchDB server.func createDB(String, eventLoopGroup: (any EventLoopGroup)?) async throws -> UpdateDBResponseCreates a new database on the CouchDB server.func deleteDB(String, eventLoopGroup: (any EventLoopGroup)?) async throws -> UpdateDBResponseDeletes a database from the CouchDB server.func dbExists(String, eventLoopGroup: (any EventLoopGroup)?) async throws -> BoolChecks if a database exists on the CouchDB server.Document Operationsfunc get(fromDB: String, uri: String, queryItems: [URLQueryItem]?, eventLoopGroup: (any EventLoopGroup)?) async throws -> HTTPClientResponseFetches raw data from a specified database and URI on the CouchDB server.func get<T>(fromDB: String, uri: String, queryItems: [URLQueryItem]?, dateDecodingStrategy: JSONDecoder.DateDecodingStrategy, eventLoopGroup: (any EventLoopGroup)?) async throws -> TRetrieves and decodes a document of a specified type from a database on the CouchDB server.func insert(dbName: String, body: HTTPClientRequest.Body, eventLoopGroup: (any EventLoopGroup)?) async throws -> CouchUpdateResponseInserts a raw document body into a specified database on the CouchDB server.func insert<T>(dbName: String, doc: T, dateEncodingStrategy: JSONEncoder.DateEncodingStrategy, eventLoopGroup: (any EventLoopGroup)?) async throws -> TInserts a new document conforming to CouchDBRepresentable into a specified database on the CouchDB server.func update<T>(dbName: String, doc: T, dateEncodingStrategy: JSONEncoder.DateEncodingStrategy, eventLoopGroup: (any EventLoopGroup)?) async throws -> TUpdates a document conforming to CouchDBRepresentable in a specified database on the CouchDB server.func update(dbName: String, uri: String, body: HTTPClientRequest.Body, eventLoopGroup: (any EventLoopGroup)?) async throws -> CouchUpdateResponseUpdates a document in a specified database on the CouchDB server.func delete(fromDb: String, doc: any CouchDBRepresentable, eventLoopGroup: (any EventLoopGroup)?) async throws -> CouchUpdateResponseDeletes a document conforming to CouchDBRepresentable from a specified database on the CouchDB server.func delete(fromDb: String, uri: String, rev: String, eventLoopGroup: (any EventLoopGroup)?) async throws -> CouchUpdateResponseDeletes a document from a specified database on the CouchDB server.Querying and Indexesfunc find(inDB: String, body: HTTPClientRequest.Body, eventLoopGroup: (any EventLoopGroup)?) async throws -> HTTPClientResponseExecutes a raw _find request against a specified database.func find<T>(inDB: String, query: MangoQuery, dateDecodingStrategy: JSONDecoder.DateDecodingStrategy, eventLoopGroup: (any EventLoopGroup)?) async throws -> [T]Performs a Mango query and decodes the matching documents.func listIndexes(inDB: String, eventLoopGroup: (any EventLoopGroup)?) async throws -> MangoIndexesResponseLists all Mango indexes in a specified database.func createIndex(inDB: String, index: MangoIndex, eventLoopGroup: (any EventLoopGroup)?) async throws -> MangoCreateIndexResponseCreates a new Mango index in a specified database.func explain(inDB: String, query: MangoQuery, eventLoopGroup: (any EventLoopGroup)?) async throws -> MangoExplainResponseExplains a Mango query in a specified database.Attachmentsfunc uploadAttachment(dbName: String, docId: String, attachmentName: String, data: Data, contentType: String, rev: String, eventLoopGroup: (any EventLoopGroup)?) async throws -> CouchUpdateResponseUploads an attachment to a CouchDB document.func downloadAttachment(dbName: String, docId: String, attachmentName: String, eventLoopGroup: (any EventLoopGroup)?) async throws -> DataDownloads an attachment from a CouchDB document.func deleteAttachment(dbName: String, docId: String, attachmentName: String, rev: String, eventLoopGroup: (any EventLoopGroup)?) async throws -> CouchUpdateResponseDeletes an attachment from a CouchDB document.Structuresstruct ConfigA configuration model for CouchDB client setup. This structure is used to define the necessary parameters for connecting to a CouchDB database. It conforms to the Sendable protocol for thread safety during concurrent operations.Instance Propertiesvar isAuthorized: BoolFlag if authorized in CouchDB.Instance Methodsfunc find<T>(inDB: String, selector: any Codable, dateDecodingStrategy: JSONDecoder.DateDecodingStrategy, eventLoopGroup: (any EventLoopGroup)?) async throws -> [T]Performs a query using a selector payload and decodes the matching documents.Enumerationsenum CouchDBProtocolAn enumeration representing the available communication protocols for CouchDB. This enum conforms to String for raw value representation and Sendable for thread safety.