-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Handle non traditional storage querying methodology #3665
Comments
Hey, We discussed this as a team but weren't able to work out exactly what you are after. Can you share an example of the code you would want to write for your entity classes, the LINQ query you want to be able to write, the SQL that would be generated, and what the results would look like. ~Rowan |
Hi Rowan, The code below is a very simple example, but our actual use case (HL7 v2 messages: https://en.wikipedia.org/wiki/Health_Level_7#HL7_version_2 ) is a lot more complex of a serialized message object which is why I've spent the time trying to develop this example. We have a custom serializer and deserializer for this, but I've substituted JSON for ease of understandibility. I believe if your team implemented something similar to this it would allow for a lot of instances when you don't want an entire relational database around your data, but still need ease to query it, a psuedo NOSQL layer on top of SQL server if you will.
|
Hey, Thanks for the details, that makes sense now. This boils down to a couple of features that are needed to achieve this.
|
This had a lot of overlap with #2141, so I generalized that issue a bit to cover this whole area. |
Currently we have a message queue that is persisted to SQL. It's a simple table structure: Message(MessageId, Timestamp, MessageContent) essentially.
When we process a message we have a meta table with distinct fields for later querying MessageMeta (MessageId, FirstName, LastName) that we query to pull the list of messages that match and then we can pull the entire message from the Message table.
Is there a way to abstract away this concept for the where clause and then deserialize MessageContent through a deserializer we already have to a CS object so we can run Linq queries on it?
Ideally some form of attributes would be awesome, eg.
[MetaFilter(table: "MessageMeta", key: "MessageId", filterFields: new List() {"FirstName", "LastName"}]
Any guidance would be extremely appreciated.
The text was updated successfully, but these errors were encountered: