Filewatcher File Search File Search
Content Search
» » » » » libdesktopcouch-glib-dev_0.6.3-0ubuntu1_amd64.deb » Content »
pkg://libdesktopcouch-glib-dev_0.6.3-0ubuntu1_amd64.deb:11222/usr/share/doc/libdesktopcouch-glib-dev/  info  control  downloads

libdesktopcouch-glib-dev - Development files for Glib-based API for Desktopcouch…  more info»


CouchDB-glib is a GLib-based implementation of the client side protocol for
CouchDB (, a replication and synchronization
database from the Apache project.

To build it, the following dependencies are needed:

	* json-glib >= 0.7.2
	* glib and gobject
	* libsoup >= 2.4

To actually build it, do the following:

	./configure (or ./ if there is no configure script)
	make install

The main entry point in the API is the CouchDB object, which is needed for all
operations involving access to the CouchDB databases. To create it:

	couchdb = couchdb_new (hostname);

The only argument is to specify the hostname of the CouchDB instance you want
to connect to. If NULL, it will connect to the default, which is

Once you have a valid CouchDB object, you can perform several operations on
	* List databases -> couchdb_list_databases()
	* Create a database -> couchdb_create_database()
	* Delete a database -> couchdb_delete_database()
	* List documents in a database -> couchdb_list_documents()

There is also a polling mechanism, which allows your application to listen
for changes on a specific database on the CouchDB instance you're connecting
to. To start listening for changes, you just need to:
	* Call couchdb_listen_for_changes
	* And g_signal_connect the CouchDB object to the following signals:
		- "database_created"
		- "database_deleted"
		- "document_created"
		- "document_updated"
		- "document_deleted"

Documents can easily be managed by using the CouchDBDocument object, which
provides an API for creating new documents in memory and save them on a
database on the CouchDB instance you're connected to:
	* Create an empty, in-memory document -> couchdb_document_new()
	* Get an existing document from the database -> couchdb_document_get()
	* Delete an existing document -> couchdb_document_delete()

Documents' API provides meaningful functions to manage its contents. First of
all, there are standard fields on each document, which you can set/get easily:
	* Unique ID -> couchdb_document_get_id() and couchdb_document_set_id()
	* Revision -> couchdb_document_get_revision() and
	* Record type -> couchdb_document_get_record_type() and
	* Application annotations (application-specific data) ->
	  couchdb_document_get_application_annotations() and

Apart from those standard fields, documents can have whatever fields you need
to, so the CouchDBDocument API provides functions for setting fields of
different types:
	* Booleans -> couchdb_document_get_boolean_field() and
	* Integers -> couchdb_document_get_int_field() and
	* Doubles -> couchdb_document_get_double_field() and
	* Strings -> couchdb_document_get_string_field() and

There are some structured field types which are also supported:
	* Structs -> couchdb_document_get_struct_field() and
	  couchdb_document_set_struct_field(). These use a special type,
	  CouchDBStructField, which in turn provides the same get/set functions
	  than the CouchDBDocument functions explained above.
	* Arrays (not yet supported)

There are also higher level documents management functions, that internally
deal with specific record types. They are just built on top of the
CouchDBDocument API but provide an easy way to deal with those specific
record types:
	* Contacts -> couchdb_document_contact_*
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017