PouchDB.defaults() so we can get /path/to/my/db and MemDOWN for pouchdb-server- Native secondary indexes
- Unversioned local docs in websql/idb, for better performance in persisted map/reduce
- Fix the browser adapter plugins so they work with browserify
- Sugar Pouch
allDbs plugin- complex ids plugin for easier "doc ID abuse"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var expressPouchDB = require('express-pouchdb'); | |
expressPouchDB.setBackend(require('memdown')); | |
app.use(expressPouchDB); | |
var pouch = expressPouchDB.getPouchDB('dbname'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var expressPouchDB = require('express-pouchdb')(require('pouchdb')); | |
expressPouchDB.setBackend(require('memdown')); | |
app.use(expressPouchDB); | |
var pouch = expressPouchDB.getPouchDB('dbname'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12:52 PM <daleharvey> nolanlawson: we cant have express-pouchdb depend on pouchdb, thats broken | |
12:52 PM <daleharvey> pouchdb-server should depend on pouchdb | |
12:55 PM ⇐ ncthom91 quit ([email protected]) Ping timeout: 264 seconds | |
12:56 PM <nolanlawson> daleharvey: hm, yeah, that wouldn't be so bad | |
12:56 PM <nolanlawson> Less duplicated config in express and server | |
12:57 PM <nolanlawson> However gets weird with all the places Pouch is instantiated, e.g. all-dbs | |
12:57 PM <nolanlawson> Would require your default constructor configuration | |
12:58 PM <nolanlawson> I see where you're coming from | |
12:58 PM <daleharvey> nolanlawson: yup, but its not just like a nice to have, it currently makes pouchdb-express pretty much useless outside of pouchdb-server | |
12:59 PM <nolanlawson> Why |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<script src="//cdn.jsdelivr.net/pouchdb/2.2.3/pouchdb.js"></script> | |
<script src="index.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<script src="pouch.js"></script> | |
<script src="index.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @license AngularJS v1.3.0-beta.7 | |
* (c) 2010-2014 Google, Inc. http://angularjs.org | |
* License: MIT | |
*/ | |
(function(window, document, undefined) {'use strict'; | |
/** | |
* @description | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sql statements sorted from most to least frequent: | |
7256 SELECT seq FROM 'by-sequence' WHERE doc_id_rev=? | |
7256 SELECT json FROM 'document-store' WHERE id = ? | |
7256 INSERT INTO 'by-sequence' (doc_id_rev, json, deleted) VALUES (?, ?, ?); | |
4896 SELECT json AS metadata FROM 'document-store' WHERE id = ? | |
2562 SELECT 'by-sequence'.seq AS seq, 'by-sequence'.deleted AS deleted, 'by-sequence'.json AS data, 'document-store'.json AS metadata FROM 'document-store' JOIN 'by-sequence' ON 'by-sequence'.seq = 'document-store'.winningseq WHERE 'document-store'.id=? | |
258 SELECT update_seq FROM 'metadata-store' | |
100 SELECT 'by-sequence'.seq AS seq, 'by-sequence'.deleted AS deleted, 'by-sequence'.json AS data, 'document-store'.json AS metadata FROM 'document-store' JOIN 'by-sequence' ON 'by-sequence'.seq = 'document-store'.winningseq WHERE 'document-store'.local = 0 AND 'document-store'.id >= ? AND 'by-sequence'.deleted = 0 ORDER BY 'document-store'.id ASC LIMIT 5 OFFSET 0 | |
52 SELECT COUNT('document-store'.id) AS 'num' FROM 'document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
var db = null; | |
var dbname = 'idb://pouch_intro'; | |
window.addEventListener( 'load', loadPouch, false ); | |
function loadPouch() { | |
new PouchDB(dbname, function(err, pouchdb){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>PouchDB #2342</title> | |
<script src="pouch.js"></script> | |
<script src="main.js"></script> | |
</head> | |
<body> | |
</body> |