Module: CouchDB-StORM
extension CouchDBStORM
func delete() throws
Deletes one row, with an id
Presumes first property in class is the id.
The _rev (revision) property must be set as a safety mechanism.
func get(_ id: String) throws
Retrieves a document with a specified ID.
func get() throws
Retrieves a document with the ID as set in the object.
func find(_ data: [String: Any], cursor: StORMCursor = StORMCursor()) throws
Performs a find using the selector syntax
An optional cursor:StORMCursor object can be supplied to determin pagination through a larger result set.
For example, `try find(["username":"joe"])` will find all documents that have a username equal to "joe"
Full selector syntax can be found at http://docs.couchdb.org/en/2.0.0/api/database/find.html#find-selectors
Remember that the selector object is [String:Any], not the raw JSON.
struct CouchDBConnection
CouchDBConnection sets the connection parameters for the CouchDB Server access
Usage:
CouchDBConnection.host = "XXXXXX"
CouchDBConnection.username = "XXXXXX"
CouchDBConnection.password = "XXXXXX"
CouchDBConnection.port = 5984
CouchDBConnection.ssl = true