jqCouch
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/jqcouch
软件介绍
jQuery plugin for CouchDB, handling different type of couchdb connections.
jqcouch requires the new JSON-based CouchDB, which currently has to be installed from svn.
More details on this in the CouchDB projects website.
Database
var dbc = $.jqCouch.connection('db');
dbc.exists('database_name');---
if ($.jqCouch.connection('db').create('database_name').ok) {
alert("database created");
}Doc
var dc = $.jqCouch.connection('doc');
var rev = dc.get('database/document1')._rev;---
var doc = {_id:"0",a:1,b:1};
if ($.jqCouch.connection('doc').save('database_name', doc)._id !== false) {
alert("Created document with rev: "+doc._rev+", a="+doc.a);
}---
//Get all documents from database. (With cache)
var dc = $.jqCouch.connection('doc');
dc.update_config('cache', true);
if (var total_documents = dc.all('database_name').total_rows) {
var all_documents = dc.all('database_name').rows;
}
//Get all documents from database. (Without cache)
var dc = $.jqCouch.connection('doc');
var all = dc.all('database_name');
if (all.total_rows > 0) {
var all_documents = all.rows;
}View
var vc = $.jqCouch.connection('view');
if (vc.exists('database_name', 'event') !== false) {
alert("View "event" exists");
}---
if ($.jqCouch.connection('view').exists('database_name', 'event/all') !== false) {
alert("View "event/all" exists");
}编程珠玑(第二版)
[美] Jon Bentley / 谢君英、石朝江 / 中国电力出版社 / 2004-4 / 28.00元
《编程珠玑(第2版)》是计算机科学方面的经典名著。书的内容围绕程序设计人员面对的一系列实际问题展开。作者Jon Bentley 以其独有的洞察力和创造力,引导读者理解这些问题并学会解决方法,而这些正是程序员实际编程生涯中至关重要的。一起来看看 《编程珠玑(第二版)》 这本书的介绍吧!
