Skip to content

Custom LINQ Provider #87

@Turnerj

Description

@Turnerj

While #54 talks about replacing the entire driver, this is a more focused change on replacing the entire LINQ pipeline of the driver with a custom implementation.

The main benefit is extensibility of queries and potentially generation of more optimal queries.
This project is still a huge undertaking but is one independent step towards a better library.

Thoughts:

  • Have some type of mapping service between the IQueryable extension methods and the actual functions that will help generate that part of the stage.
  • Have this mapper be able to be updated at runtime by passing in the function you want mapped and the class capable of mapping the value to some intermediate type
  • Like the driver, certain commands that appear after each other (like two or more Where calls) need to be merged together.
  • Would entirely eliminate the reflection methods used to support the BsonDocument pre-stage stuff etc
  • Would allow more generic support for things like $geoNear etc
  • Optimising away the ResultTransformer, allowing better queries (eg. .Any()) to be translated more directly

The hardest thing in the whole build of this is all the sub-query bits, things like complex Where or Select statements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions