[Mono-list] ANN: Divan does LINQ and Lucene...

Göran Krampe goran at krampe.se
Mon Sep 21 09:52:35 EDT 2009


Hey all Mono-people,

Now that CouchDB is getting stuffed into Karmic (Ubuntuone etc) etc and 
CouchDB is the hottest thing on Earth :) - I just wanted to 
(shamelessly, again) plug Divan (C# binding for CouchDB) a bit.

Latest pushed code on github adds:

- LINQ support from Alex Pedenko, although limited, see sample below.
- Lucene integration (via the Couchdb-Lucene addon), first shot!
- Plus detecting Mono and falling back on GET instead of HEAD... :)

Anyway, a green bar on Mono and here is a LINQ example:

...
// Define a temp view. Typically you already have views defined to use:
var tempView = db.NewTempView("test", "test", "if (doc.docType && 
doc.docType == 'car') emit(doc.Hps, doc);");

// Get a CouchLinqQuery to play with for class Car:
var linqCars = tempView.LinqQuery<Car>();

// Play... this will ultimately run a CouchDB HTTP query and give us
// a List of Cars:
var fastCars = from c in linqCars where c.HorsePowers >= 175 select c;

regards, Göran



More information about the Mono-list mailing list