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: 5 months ago
JSON representation
CouchDB Database Connector for Perfect.
- Host: GitHub
- URL: https://github.com/PerfectlySoft/Perfect-CouchDB
- Owner: PerfectlySoft
- License: apache-2.0
- Created: 2016-12-01T16:23:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-09T17:50:46.000Z (about 7 years ago)
- Last Synced: 2024-11-13T10:29:27.511Z (5 months ago)
- Topics: couchdb, database, perfect, server-side-swift, swift
- Language: Swift
- Homepage: https://www.perfect.org
- Size: 47.9 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- TheList - Perfect CouchDB connector - A Swift connector for accessing CouchDB databases (Database Connectors / CouchDB)
README
# Perfect-CouchDB [简体中文](README.zh_CN.md)
[](http://perfect.org/get-involved.html)
[](https://github.com/PerfectlySoft/Perfect)
[](https://gitter.im/PerfectlySoft/Perfect)
[](https://twitter.com/perfectlysoft)
[](http://perfect.ly)[](https://developer.apple.com/swift/)
[](https://developer.apple.com/swift/)
[](http://perfect.org/licensing.html)
[](http://twitter.com/PerfectlySoft)
[](https://gitter.im/PerfectlySoft/Perfect?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](http://perfect.ly) [](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).