couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Update of "GettingStartedWithSmalltalk" by James Robertson
Date Fri, 22 Aug 2008 21:40:22 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by James Robertson:

The comment on the change is:
Update to the Smalltalk API documented

  Once it's loaded, you can try things like this:
+ "A simple interface to Couch DB.  To create, delete, and query databases, try:"
+ CouchDB.Interface default databases.
+ CouchDB.Interface default create: 'mydb'.
+ CouchDB.Interface default delete: 'mydb'.
+ CouchDB.Interface default database: 'mydb'
- "database API"
- Interface new createDB: 'mydb'.     
- Interface new getDatabases.
- Interface new getDatabaseInformation: 'mydb'.
- Interface new compact: 'mydb'.
- Interface new deleteDB: 'myDB'.  
- "Document APIs"
- settings := Settings new.
- Interface new saveNamedObject: settings id: 'mydbSettings' to: 'mydb'.
- Interface new getObject: 'mydbSettings' from: 'mydb'
- Interface new allObjectsFrom: 'mydb'.
+ "Further, you can then manipulate documents in a database, try:"
+ myDatabase := CouchDB.Interface default database: 'mydb'.
+ documentRecord := myDatabase save: myDatabase address.
+ myDatabase document: (documentRecord at: 'id').
+ myDatabase delete: (documentRecord at: 'id') revision: (documentRecord at: 'rev').
- Interface new 
- 	deleteDocument: 'docIdHere' 
- 	revision: 'RevisionIdHere' 
- 	from: 'mydb'
- The POST API for storing documents is also supported, as is the delete API.
+ The APIs for database are fully implemented, and, other than attachments, the APIs for documents
are fully implemented as well

View raw message