Karmencita is a high level object query language for .NET . Its purpose is to
allow easy querying from in memory structured data.
- easy, SQL like language.
- common, slim API used for querying data.
- supports any IEnumerable data source, DataTables and XmlDataDocuments.
- extensible implementation
- common API but still get results depending on the data source. (for instance when querying XmlDataDocuments we get back XmlElement. But if we query a DataTable we get back a DataRow).
- supports IComparable for custom type implementation.
Here are a few quick samples:
- query a array of System.Diagnostics.Process objects
- query a DataTable (the Northwind database products table)
- query a XmlDataDocument
Frequently asked questions :
So is this a implementation of OQL ?
It is a subset of OQL.I am not really interested in implementing the whole OQL. I
personally think OQL is extra verbose and tedious to write. With Karmencita I just wanted a minimalist SQL like language to quickly write queries based on contextual object methods.
The DataTable supports Select and for XML documents there is XQuery or XPath. Why should i use Karmencita ?
Because Karmencita is a generic query engine. Just throw a data source and a query to it and have the result. No need to muck around with multiple query sintaxes. One generic query language to rule them all. :)
Is this something like Microsoft's LINQ ?
Kind of. Both LINQ and Karmencita are derivate implementations of OQL which serve the same purpose. But the implementation is drastically different.
How hard is it to start using Karmencita ?
It's very very simple . Just reference Karmencita.dll . You have a class (ObjectQuery) and 5 methods.
I want to extend the source code and add support for a custom type.
You should simply implement IEvaluator.
So custom types are limited to IComparable. Why not use operator overloading ?
Operator overloading would rock for this particular scenario. Unfortunately there are severe limitations in .NET 2.0 generics constraints so operator overloading is out of the question.
Under what license is this library distributed?
This is a open source project released under the Lesser General Public License.
Karmencita....that's a very cool name. What does it mean ?
It's my girlfriend's nickname.