Closed C4Phoenix closed 1 month ago
@C4Phoenix Thank you for your message/work and support for the project! Your macro syntax you propose reduces the code. Are you already using this approach in your projects?
Regarding the integration into the native_db
repository, for now, I will keep the crate more focused on a single query syntax. If it becomes relevant, why not fully adopt your approach? But for now, you are welcome to publish a crate that allows using native_db
with a macro. You can include a link to it in the README.md of native_db
.
@vincent-herlemont, I'm currently using it for one project but not yet extensively because adding the unit tests revealed the bug reported earlier. I really wanted to add a pattern to 'link' two keys together like in a graph database like surrealdb but I could not implement that properly (as I wanted to assume that a index was non unique). The current implementation also collects iterators often which might hide some ram costs in certain queries (when only selecting a value from a struct for instance). All that is too say still a bit of a work in progress but good enough for me, once the #208 is resolved and I've used/tested it more I'll look into publishing a crate. Thanks for the awesome work.
I would like to make the database interaction a bit more ergonomic and am working on completing a declarative macro. It looks like other people are also making wrappers around the API at the moment so I was hoping this could be included in the repo here. I can also publish it in a different crate (/repo) if you'd like too keep this a bit more centered.
What I have currently looks something like this:
(thanks too https://lukaslueg.github.io/macro_railroad_wasm_demo/)
this can be used like so:
I was a bit constraint on some of the characters I was allowed too use but I like the end result. If you'd like to include this ill make a pull request with what I have so far implementation wise. Also let me know your opinion about the syntax. Thanks for your consideration. Love the project.