(index ("make-connection" 0) ("connection-uri" 483) ("connection-database" 483) ("update-connection" 684) ("get-server-info" 839) ("create-database" 1170) ("delete-database" 1513) ("get-database-info" 1858) ("make-document" 2107) ("document?" 2398) ("document-id" 2508) ("document-rev" 2508) ("document-body" 2508) ("update-document" 2508) ("document-attribute?" 2846) ("document-attribute" 3027) ("get-document" 3197) ("save-document" 3343) ("delete-document" 3584) ("get-all-documents" 3715) ("get-view" 3976) ("json-ref" 4466) ("last-error" 4710))
(def (sig (procedure "(make-connection database: DATABASE-STRING server: URI-REFERENCE)" (id make-connection))) (p "Creates a connection record for the desired " (i "DATABASE-STRING") " on the CouchDB located at the specified URI reference.") (p "Note: You will need uri-common's uri-reference.") (p "Example:") (highlight scheme "(define conn (make-connection server: (uri-reference \"http://localhost:5984/\")\n                              database: \"chicken-test-couchdb\"))"))
(def (sig (procedure "(connection-uri connection)" (id connection-uri)) (procedure "(connection-database connection)" (id connection-database))) (p "Accessors for the CouchDB egg connection record."))
(def (sig (procedure "(update-connection connection #!key database connection)" (id update-connection))) (p "Update function for the connection record."))
(def (sig (procedure "(get-server-info connection)" (id get-server-info))) (p "Returns the couchdb version information as the json egg parses the response.") (highlight scheme "CSI> (get-server-info (make-connection server: (uri-reference \"http://localhost:5984/\")))\n#((\"couchdb\" . \"Welcome\") (\"version\" . \"0.11.0\"))"))
(def (sig (procedure "(create-database connection)" (id create-database))) (p "Creates a database as specified in the connection record " (i "connection") ".  Use " (i "(make-connection database-string couchdb-uri-string)") " to create a connection object.") (p "Returns #t or #f. Verbose error message can be retrieved with ''last-error'."))
(def (sig (procedure "(delete-database connection)" (id delete-database))) (p "Deletes the database as specified in the connection record " (i "connection") ".  Use " (i "(make-connection database-string couchdb-uri-string)") " to create a connection object.") (p "Returns #t or #f. Verbose error message can be retrieved with ''last-error'."))
(def (sig (procedure "(get-database-info connection)" (id get-database-info))) (p "Returns the database information for a given connection record.  Use " (i "(make-connection database-string couchdb-uri-string)") " to create a connection record."))
(def (sig (procedure "(make-document id revision #!optional (body '#()))" (id make-document))) (p "The couchdb uses a record to represent the contents of a document. The mandatory elements have distinct slots whereas the rest of the fiels is accessible in a vector called " (i "body") "."))
(def (sig (procedure "(document? doc)" (id document?))) (p "Type checking predicate for a document record."))
(def (sig (procedure "(document-id doc)" (id document-id)) (procedure "(document-rev doc)" (id document-rev)) (procedure "(document-body doc)" (id document-body)) (procedure "(update-document doc #!key id rev body)" (id update-document))) (p "Accessors for the " (i "id") " " (i "rev") " and " (i "body") " slots of a document record."))
(def (sig (procedure "(document-attribute? document name)" (id document-attribute?))) (p "Predicate indicating wether " (i "document") " does contain a attribute " (i "name") "."))
(def (sig (procedure "(document-attribute document name)" (id document-attribute))) (p "Returns the value for " (i "name") " if it is contained in " (i "document") "."))
(def (sig (procedure "(get-document connection id)" (id get-document))) (p "Requests the document with id " (i "id") " and returns that or #f."))
(def (sig (procedure "(save-document connection document)" (id save-document))) (p "Stores the document in the database and returns it with updated id and revision attributes. If the document does not exist in the database it is created."))
(def (sig (procedure "(delete-document connection document)" (id delete-document))) (p "Deletes the document form the database."))
(def (sig (procedure "(get-all-documents connection #!optional (query '()))" (id get-all-documents))) (p "Returns all documents in the database. The output can be quite large! You can pass any valid query URI part for the optional " (i "query") " parameter."))
(def (sig (procedure "(get-view connection view-string #!optional (query '()))" (id get-view))) (p "Returns the results of the requested " (i "view") ". View can be either a string depicting an explicit path or a list of strings which in the latter case is treated as " (i "(list design-document view-name)") ".  The query parameter is an alist containing " (i "(parameter-name . value)") " pairs.") (p "<Procedure>(send-temp-view-request connection view method #!key query)</procedure>"))
(def (sig (procedure "(json-ref name object)" (id json-ref))) (p "Retrieves a field " (i "name") " from a JSON object " (i "object") ". This is a convenience function to ease the access of the vector / hash-table mix the json egg generates."))
(def (sig (parameter "(last-error #f)" (id last-error))) (p "Will be set on errors. Returns a descriptive error string."))
