couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Driscoll <luke.drisc...@gmail.com>
Subject Re: Couchdb via java
Date Thu, 27 May 2010 13:34:55 GMT
The reason I started using couchdb4j because it fully supports json-lib, and
json-lib has some nice XML-JSON conversion tools, which I am using.

Luke

On Thu, May 27, 2010 at 09:05, Jarrod Roberson <jarrod@vertigrated.com>wrote:

> I would recommend spending you effort on jcouchdb instead
>
> Jarrod Roberson
> 678-551-2852
>
> On May 27, 2010, at 6:07 AM, "Leucht, Axel" <Axel.Leucht@prodv.de>
> wrote:
>
> > I'm currently evaluating couchdb as a database for one of our web
> > applications.
> >
> > This scenario requires couchdb to be used from java. Therefore I
> > downloaded couchdb-0.11.0 and couchdb4j-0.1.2.jar.
> >
> > I did install couchdb on my Windows-XP box and it runs fine:
> >    {"couchdb":"Welcome","version":"0.11.0"}
> > Then I inserted two simple documents and tried to "query" it with the
> > following java program:
> >
> > Session s = new Session("localhost", 5984);
> > Database db = s.getDatabase("mydb");
> > ViewResults result = db.getAllDocuments();
> > for (Document d : result.getResults()) {
> >    System.out.println("id:"+d.getId());     // Oops
> >    String id = (String) d.get("id");
> >    System.out.println("id:"+id);        // Here "id" is correct
> >
> >    Document full = db.getDocument(d.getId());
> >    System.out.println("Name:"+full.getString("name"));
> > }
> >
> > Problem is that the document Ids are not returned. But the program
> > reports the proper id when getting the field directly.
> >
> > What gives?
> >
> > /Axel
> >
> > /Axel
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message