tobrien / couchdb4j Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mbreese/couchdb4j
CouchDB library for Java using JSON
License: Apache License 2.0
This project forked from mbreese/couchdb4j
CouchDB library for Java using JSON
License: Apache License 2.0
couchdb4j assumes that all responses from couch are JSONObjects, in the case of a bulkupdate, the response is a JSONArray. Change the way that couchdb4j is parsing the response to take the bulkupdate response into account
all-or-nothing bulk updates are closer to how the old bulk-update facility worked. Add support for all-or-nothing bulk updates.
The current way that the code is trying to get a list of revisions seems incompatible with CouchDB 0.9. Take a look at this:
/**
* A list of the revision numbers that this document has. If this hasn't been
* populated with a "full=true" query, then the database will be re-queried
* @return
*/
public String[] getRevisions() throws IOException {
String[] revs = null;
if (!object.has("_revs")) {
populateRevisions();
}
//System.out.println(object);
JSONArray ar = object.getJSONArray("_revs");
if (ar!=null) {
revs = new String[ar.size()];
for (int i=0 ; i< ar.size(); i++) {
revs[i]=ar.getString(i);
}
}
return revs;
}
And Fix it for 0.9
Right now, we just assume that the entire bulkupdate worked. If an individual document did not update, there is no way to hold this information and commnuicate it in the API. Find a way to handle the case where a few updates worked but some failed. Figure out a way to get this info back to the caller
adhoc() in Database, is sending an request to _temp_view as:
{"map":function(doc){ emit(null, doc); }}
It should be sending:
{"map":"function(doc){ emit(null, doc); }"}
Figure out how to get this JSON library to surround the function with quotes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.