Skip to content

Investigate how to cache a translated SQL for an ad-hoc IEnumerable #51

@un-tone

Description

@un-tone

@Starcounter/webplatformteam guys have a DataTable component which requires IQueryable data source for work:
https://github.com/Starcounter/Starcounter.Uniform/blob/d0729e3d3581f21f50ca498dbad3cc71c1f85a6c/Starcounter.Uniform/Builder/DataTableBuilder.cs#L31
It makes using Starcounter.Linq not optimal, because it will translate expression tree to SQL expression on each query execution. Using compiled query is not possible currently too, because CompileQuery returns Func<...>, so Starcounter.Uniform.Builder.DataTableBuilder should know how to work with delegates instead of IQueryable instances.
It seems, it would be great if ad-hoc SC.Linq queries could cache its translated SQL queries after first execution. I'm not sure if it is possible to do correctly. Should be investigated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions