![]() |
![]() |
![]() |
Reference Manual for CouchDB GLib Bindings | ![]() |
---|---|---|---|---|
Top | Description |
CouchdbQuery; CouchdbQueryClass; CouchdbQuery * couchdb_query_new (void
); CouchdbQuery * couchdb_query_new_for_path (const char *path
); CouchdbQuery * couchdb_query_new_for_view (const char *design_doc
,const char *view_name
); const char * couchdb_query_get_path (CouchdbQuery *self
); void couchdb_query_set_path (CouchdbQuery *self
,const char *path
); const char * couchdb_query_get_method (CouchdbQuery *self
); void couchdb_query_set_method (CouchdbQuery *self
,const char *method
); const char * couchdb_query_get_option (CouchdbQuery *self
,const char *name
); void couchdb_query_set_option (CouchdbQuery *self
,const char *name
,const char *value
); const char * couchdb_query_get_query_options_string (CouchdbQuery *self
); JsonObject * couchdb_query_get_json_object (CouchdbQuery *self
); void couchdb_query_set_json_object (CouchdbQuery *self
,JsonObject *object
); CouchdbQueryPrivate;
CouchdbQuery * couchdb_query_new (void
);
Creates and returns a new CouchdbQuery object
Returns : |
A new CouchdbQuery object, to be unreferenced when no longer needed. |
CouchdbQuery * couchdb_query_new_for_path (const char *path
);
Creates and returns a new CouchdbQuery object for a give design document and view. It's a shortcut for this code: [[[ const gchar *design_doc, *view_name; CouchdbQuery *query;
design_doc = "document";
view_name = "view";
path = g_str_concat ("_design/", design_doc, "_view", view_name);
query = couchdb_query_new()
;
couchdb_query_set_path (query, path);
g_free (path);
]]]
Returns : |
A new CouchdbQuery object, to be unreferenced when no longer needed. |
CouchdbQuery * couchdb_query_new_for_view (const char *design_doc
,const char *view_name
);
const char * couchdb_query_get_path (CouchdbQuery *self
);
Returns path set for the query.
|
A CouchdbQuery object |
Returns : |
string containing path set for the query. |
void couchdb_query_set_path (CouchdbQuery *self
,const char *path
);
Sets path for the Query.
|
A CouchdbQuery object |
const char * couchdb_query_get_method (CouchdbQuery *self
);
Returns method set for the query.
|
A CouchdbQuery object |
Returns : |
string containing method set for the query. |
void couchdb_query_set_method (CouchdbQuery *self
,const char *method
);
Sets method for the Query.
|
A CouchdbQuery object |
|
A method for query. |
const char * couchdb_query_get_option (CouchdbQuery *self
,const char *name
);
Returns the value of the given key, or NULL
if it wasn't set
Returns : |
the value of the given key,
or NULL if it hasn't been set. [transfer none][allow-none]
|
void couchdb_query_set_option (CouchdbQuery *self
,const char *name
,const char *value
);
Set's the value of the given key, overwriting the current one if it's already set
const char * couchdb_query_get_query_options_string
(CouchdbQuery *self
);
Returns options as a query string that can be used to create a complete uri for querying server.
|
A CouchdbQuery object |
Returns : |
A string containing all query options. |
JsonObject * couchdb_query_get_json_object (CouchdbQuery *self
);
Sets the given Json object as a body of the query that is going to be send to the CouchDB server. It doesn't change the query's method so it has to be set to either PUT or POST by calling couchdb_query_set_method.
Returns : |
A JsonObject to be set as a Query's body. [transfer full] |
void couchdb_query_set_json_object (CouchdbQuery *self
,JsonObject *object
);