Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - linq deserializers #55

Closed
wants to merge 1 commit into from
Closed

WIP - linq deserializers #55

wants to merge 1 commit into from

Conversation

freels
Copy link
Member

@freels freels commented Jan 11, 2024

This PR contains linq element deserializers. I need two variants:

  • if the Select body only reads fields off each document, not letting it escape, we will map that to an array of specific field values, and the accompanying deserializer needs to deserialize each field and pass the resulting tuple to a mapping function to the return type of the Select lambda.
  • if the Select body allows the document to escape, we deserialize to the document type and pass it to a mapping function.

Eventually the LINQ impl will wire up the deserializer for a page of elements with something like:

IDeserializer<Doc> docDeser = ...generated doc deserializer...;
Func<Doc, T> mapper = ...generated mapper...;
var linqDeser = new LinqDocumentDeserializer(docDeser, mapper);
var deser = new PageDeserializer<T>(linqDeser);

We can then store this deserializer alongside the other generated LINQ query apparatus, such as the FQL builder lambda.

@freels freels requested a review from pnwpedro January 11, 2024 07:09
Base automatically changed from typed-deser to main January 17, 2024 22:11
@pnwpedro pnwpedro closed this Feb 12, 2024
@freels freels deleted the linq-deser branch February 12, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants