Skip to content

CouchDB Database Connector for Perfect.

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.zh_CN
Notifications You must be signed in to change notification settings

PerfectlySoft/Perfect-CouchDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perfect-CouchDB 简体中文

Perfect logo

Perfect logo Perfect logo Perfect logo Perfect logo

Swift 4.0 Platforms OS X | Linux License Apache Twitter Join the chat at https://gitter.im/PerfectlySoft/Perfect Slack Status GitHub version

Apache CouchDB connector for Perfect

NOTE: This project is in beta

This project provides connectivity to Apache CouchDB.

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

This package builds with Swift Package Manager and is part of the 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:

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.