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

Question #3

Open
naomijub opened this issue Jul 23, 2020 · 1 comment
Open

Question #3

naomijub opened this issue Jul 23, 2020 · 1 comment

Comments

@naomijub
Copy link

What do you think of extending this crate to support LINq for Crux Datalog Query language?

This is Crux Datalog client in Rust: https://github.com/naomijub/transistor.
This is Crux Docs: https://opencrux.com/docs#queries

@mrudat
Copy link

mrudat commented Mar 9, 2024

Presuming the long-term goal is a full clone of LINQ in Rust, this crate would provide:

  • the linq! macro that provides the syntactic sugar
  • the LINQ API against generic collection interfaces
  • a concrete implementation that operates efficiently against the claimed performance characteristics of those collection interfaces (array/vec/linked list/dict/...)
  • perhaps an optimised implementation that specifically targets the standard collections directly.

Other generic collections would work, though almost certainly inefficiently, because their performance characteristics differ from the standard collections, otherwise, why would they be worth the effort of implementing?

I assume that implementing LINQ for SQL in Rust would be a distinct crate, which would provide a concrete implementation that would collect all the expressions (are macros magic enough to do that?) and serialise the query in SQL, presumably explicitly targeting a placeholder collection class identifying a table.

If so, adding specific (ie. efficient) support for a custom collection class would be something for a hypothetical 'linq-for-foo' crate that depends on this crate and the foo crate.

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

No branches or pull requests

2 participants