You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Pavel Tupitsyn <pt...@gridgain.com> on 2016/01/22 16:04:17 UTC
LINQ support in Ignite.NET via re-linq library
Igniters,
I'm working on LINQ support in Ignite.NET ([1]).
For the uninitiated, LINQ will allow cache SQL queries in a strongly-typed
way, which is awesome:
cache.ToQueryable().Where(person => person.Age > 20)
instead of
cache.Query(new SqlQuery(typeof(Person), "age > ?", 20))
To greatly simplify the task of transforming expression tree to Ignite SQL,
I'm going to use re-linq [2].
* It is an industry standard LINQ library, used in Entity Framework and
NHibernate for the same purpose
* License is Apache 2.0, same as ours
Any thoughts or objections?
[1] https://issues.apache.org/jira/browse/IGNITE-1630
[2] https://relinq.codeplex.com/
--
--
Pavel Tupitsyn
GridGain Systems, Inc.
www.gridgain.com
Re: LINQ support in Ignite.NET via re-linq library
Posted by Pavel Tupitsyn <pt...@gridgain.com>.
Val, ToQueryable comes from standard IQueryable/IEnumerable interfaces.
IEnumerable is a very basic interface that all the collections implement
(lists, arrays, etc).
IQueryable implements IEnumerable, but adds Provider which evaluates the
query.
Our ICache is already IEnumerable (it delegates to IgniteCache.iterator()
in Java).
So you can already say 'cache.Where(e => e.Key > 10)' and so on, but the
filtering will occur locally, as opposed to 'ToQueryable().Where(...)'.
I think this is a good design. Any cache can be iterated, but queries have
to be configured, and ToQueryable clearly states that user wants to use SQL
queries.
Thoughts?
On Sat, Jan 23, 2016 at 9:58 AM, Valentin Kulichenko <
valentin.kulichenko@gmail.com> wrote:
> Looks nice, but what is ToQueryable() method for? Is the cache initially
> not queryable? :)
>
> -Val
>
> On Fri, Jan 22, 2016 at 9:49 AM, Sergi Vladykin <se...@gmail.com>
> wrote:
>
> > Looks cool to me.
> >
> > Sergi
> >
> > 2016-01-22 18:04 GMT+03:00 Pavel Tupitsyn <pt...@gridgain.com>:
> >
> > > Igniters,
> > >
> > > I'm working on LINQ support in Ignite.NET ([1]).
> > >
> > > For the uninitiated, LINQ will allow cache SQL queries in a
> > strongly-typed
> > > way, which is awesome:
> > > cache.ToQueryable().Where(person => person.Age > 20)
> > > instead of
> > > cache.Query(new SqlQuery(typeof(Person), "age > ?", 20))
> > >
> > > To greatly simplify the task of transforming expression tree to Ignite
> > SQL,
> > > I'm going to use re-linq [2].
> > > * It is an industry standard LINQ library, used in Entity Framework and
> > > NHibernate for the same purpose
> > > * License is Apache 2.0, same as ours
> > >
> > > Any thoughts or objections?
> > >
> > >
> > > [1] https://issues.apache.org/jira/browse/IGNITE-1630
> > > [2] https://relinq.codeplex.com/
> > >
> > > --
> > > --
> > > Pavel Tupitsyn
> > > GridGain Systems, Inc.
> > > www.gridgain.com
> > >
> >
>
--
--
Pavel Tupitsyn
GridGain Systems, Inc.
www.gridgain.com
Re: LINQ support in Ignite.NET via re-linq library
Posted by Valentin Kulichenko <va...@gmail.com>.
Looks nice, but what is ToQueryable() method for? Is the cache initially
not queryable? :)
-Val
On Fri, Jan 22, 2016 at 9:49 AM, Sergi Vladykin <se...@gmail.com>
wrote:
> Looks cool to me.
>
> Sergi
>
> 2016-01-22 18:04 GMT+03:00 Pavel Tupitsyn <pt...@gridgain.com>:
>
> > Igniters,
> >
> > I'm working on LINQ support in Ignite.NET ([1]).
> >
> > For the uninitiated, LINQ will allow cache SQL queries in a
> strongly-typed
> > way, which is awesome:
> > cache.ToQueryable().Where(person => person.Age > 20)
> > instead of
> > cache.Query(new SqlQuery(typeof(Person), "age > ?", 20))
> >
> > To greatly simplify the task of transforming expression tree to Ignite
> SQL,
> > I'm going to use re-linq [2].
> > * It is an industry standard LINQ library, used in Entity Framework and
> > NHibernate for the same purpose
> > * License is Apache 2.0, same as ours
> >
> > Any thoughts or objections?
> >
> >
> > [1] https://issues.apache.org/jira/browse/IGNITE-1630
> > [2] https://relinq.codeplex.com/
> >
> > --
> > --
> > Pavel Tupitsyn
> > GridGain Systems, Inc.
> > www.gridgain.com
> >
>
Re: LINQ support in Ignite.NET via re-linq library
Posted by Sergi Vladykin <se...@gmail.com>.
Looks cool to me.
Sergi
2016-01-22 18:04 GMT+03:00 Pavel Tupitsyn <pt...@gridgain.com>:
> Igniters,
>
> I'm working on LINQ support in Ignite.NET ([1]).
>
> For the uninitiated, LINQ will allow cache SQL queries in a strongly-typed
> way, which is awesome:
> cache.ToQueryable().Where(person => person.Age > 20)
> instead of
> cache.Query(new SqlQuery(typeof(Person), "age > ?", 20))
>
> To greatly simplify the task of transforming expression tree to Ignite SQL,
> I'm going to use re-linq [2].
> * It is an industry standard LINQ library, used in Entity Framework and
> NHibernate for the same purpose
> * License is Apache 2.0, same as ours
>
> Any thoughts or objections?
>
>
> [1] https://issues.apache.org/jira/browse/IGNITE-1630
> [2] https://relinq.codeplex.com/
>
> --
> --
> Pavel Tupitsyn
> GridGain Systems, Inc.
> www.gridgain.com
>