Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/PerfectlySoft/Perfect-CouchDB

CouchDB Database Connector for Perfect.
https://github.com/PerfectlySoft/Perfect-CouchDB

couchdb database perfect server-side-swift swift

Last synced: 3 months ago
JSON representation

CouchDB Database Connector for Perfect.

Awesome Lists containing this project

README

        

# Perfect-CouchDB [简体中文](README.zh_CN.md)

[![Perfect logo](http://www.perfect.org/github/Perfect_GH_header_854.jpg)](http://perfect.org/get-involved.html)

[![Perfect logo](http://www.perfect.org/github/Perfect_GH_button_1_Star.jpg)](https://github.com/PerfectlySoft/Perfect)
[![Perfect logo](http://www.perfect.org/github/Perfect_GH_button_2_Git.jpg)](https://gitter.im/PerfectlySoft/Perfect)
[![Perfect logo](http://www.perfect.org/github/Perfect_GH_button_3_twit.jpg)](https://twitter.com/perfectlysoft)
[![Perfect logo](http://www.perfect.org/github/Perfect_GH_button_4_slack.jpg)](http://perfect.ly)

[![Swift 4.0](https://img.shields.io/badge/Swift-4.0-orange.svg?style=flat)](https://developer.apple.com/swift/)
[![Platforms OS X | Linux](https://img.shields.io/badge/Platforms-OS%20X%20%7C%20Linux%20-lightgray.svg?style=flat)](https://developer.apple.com/swift/)
[![License Apache](https://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat)](http://perfect.org/licensing.html)
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/PerfectlySoft)
[![Join the chat at https://gitter.im/PerfectlySoft/Perfect](https://img.shields.io/badge/Gitter-Join%20Chat-brightgreen.svg)](https://gitter.im/PerfectlySoft/Perfect?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Slack Status](http://perfect.ly/badge.svg)](http://perfect.ly) [![GitHub version](https://badge.fury.io/gh/PerfectlySoft%2FPerfect-CURL.svg)](https://badge.fury.io/gh/PerfectlySoft%2FPerfect-CURL)

## Apache CouchDB connector for Perfect

**NOTE: This project is in beta**

This project provides connectivity to [Apache CouchDB](http://couchdb.apache.org).

Full documentation can be found at [http://www.perfect.org/docs/CouchDB.html](http://www.perfect.org/docs/CouchDB.html)

This package builds with Swift Package Manager and is part of the [Perfect](https://github.com/PerfectlySoft/Perfect) project. It was written to be stand-alone and so does not require PerfectLib or any other components.

Ensure you have installed and activated the latest Swift 4.0 tool chain.

## Example usage:

```swift
var test = CouchDB()
var auth = CouchDBAuthentication("perfect", "perfect", auth: .basic)

test.connector.port = 5984
test.authentication = auth
let code = test.databaseCreate("testdb")

let dataSubmit = ["one":"ONE","two":"TWO"]
do {
let (addCode, response) = try test.addDoc("testdb",doc: dataSubmit)
print(addCode)
print(response)
} catch {
print(error)
}

```

## Building

Add this project as a dependency in your Package.swift file.

```
.Package(url: "https://github.com/PerfectlySoft/Perfect-CouchDB.git", majorVersion: 3)
```

## Further Information
For more information on the Perfect project, please visit [perfect.org](http://perfect.org).