Litedb: Some useful enhancements

Created on 27 Dec 2017  路  3Comments  路  Source: mbdavid/LiteDB

I am planning to use LiteDB for my desktop application which is going to be backed by a small .NET Core API. I abstracted the LiteRepository class in order to use .NET Core DI mechanism but I think the library can be enhanced in a handful of ways:

  1. Change LiteQueryable ctor visibility to public. In my case it would be very useful to have one (instead I have to rely on Reflection to construct the object) since I am basically re-implementing the LiteRepository class.

  2. Add a public ctor for LiteRepository which accepts LiteDatabase as argument. It is useful for debugging purposes since with LiteRepository the developer has no way of enabling logging for LiteDatabase.

  3. LiteQueryable to implement IQueryable.

There is already a closed issue about the last request and I know it is very difficult to implement a LINQ provider but it is a very helpful abstraction which allows to write code independent from the specific database implementation.

Most helpful comment

Is there such thing as a LINQ-Provider expert? :D

However, I am taking a look at the code and I made a fork. I am going to provide some PR. ;)

All 3 comments

Hi @axelgenus, thanks for consider LiteDB :) About your questions:

About 1 and 2 it's easy to impemenet, because LiteRepository is just a simpler wrapper to LiteDatabase do change API.

About 3, I know about this request and will be great to implement. But has some problems:

  • First because it's very difficult (as I mention before) and I always wait for an LINQ-Provider expert to help with this...
  • Second, for next major version, LiteDB will change the way how API will be accessed. A complete new SQL-Like language will be used to query documents. So, all my enforcement are based on this task for I while.

Maybe in this next major version an IQueryable can be done better and easily.

Is there such thing as a LINQ-Provider expert? :D

However, I am taking a look at the code and I made a fork. I am going to provide some PR. ;)

Hi! With the objective of organizing our issues, we are closing old unsolved issues. Please check the latest version of LiteDB and open a new issue if your problem/question/suggestion still applies. Thanks!

Was this page helpful?
0 / 5 - 0 ratings