-
Notifications
You must be signed in to change notification settings - Fork 68
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
[Request] Raw pattern matching support or raw wrapping support #62
Comments
amnesia/test/amnesia/database_test.exs Lines 242 to 253 in 211d982
|
Did you try using |
Works a charm. would you like me to push a doc section on this method. It's a common use case for optimized querying against a ordered_set table to the best of my understanding. And others have seemed to be confused by the proper syntax here.
|
Sure :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To avoid the need for multiple index rows it would be ideal to be able to perform partial pattern matching on tuples
e.g.
:mnesia.match_object({AMNESIA.TABLE, {:tuple, :encoded, :cartesian, :index, :_})
But handling this would either require writing custom exquisite queries (? maybe)
or abandoning Amnesia.
It should be possible to provide a sort of last resort filtering library such that
where the wrapper logic determines if the inner term returns
{[values], continuation} (:mnesia.select) or [values] (:mnesia.match_object) or %end_of_table or RecordList
and populates the appropriate Amnesia.Table.Select{coerce: table_from_result, continuation: continuation_from_result, values: values_from_result} or appropriate error response.
Some sort of built in last resort macro or documentation for performing partial matches if possible directly using Amnesia/Exquisite would greatly improve the portability of Amnesia.
I'm happy to provide the code for such if the code maintainers have any guidelines, requirements for such a change, but I'd need guidance on any pure Amnesia solution here.
The text was updated successfully, but these errors were encountered: