Skip to content

Instantly share code, notes, and snippets.

@judywawira
judywawira / bulk.js
Created March 1, 2012 16:01 — forked from sbisbee/bulk.js
Sag-JS Docu Examples 1
var docs = [
{ _id: 'doc1', foo: 'bar' },
{ _id: 'doc2', hi: 'there' }
];
couch.bulk({
docs: docs,
callback: function(resp, succ) {
//...do stuff
}
<!DOCTYPE html>
<html>
<head>
<title>Simple Address Book</title>
<link rel="stylesheet" href="style/main.css" type="text/css">
<script src="/_utils/script/json2.js"></script>
<script src="/_utils/script/jquery.js?1.3.1"></script>
<script src="/_utils/script/jquery.couch.js?0.9.0"></script>
<script type="text/javascript">
$db = $.couch.db("addressbook");