rust-hl7 icon indicating copy to clipboard operation
rust-hl7 copied to clipboard

Move `query()` funcs into separate structs

Open wokket opened this issue 4 years ago • 2 comments

As part of moving to a 'toolbox' approach rather than all-in-one framework move the querying into it's own area (like EscapeSequence).

JsonPath uses a Selector struct with new() and find() funcs which I quite like.

wokket avatar Aug 16 '21 20:08 wokket

Still trying to make sense of what benefit this brings, other than code clarity and a refactor opportunity.

sempervictus avatar Aug 25 '21 15:08 sempervictus

I haven't done any serious work here yet, but that pretty much sums it up... hoping for :

  • Reduce amount of code in Message etc for clarity/easier modification
  • Separation of Concerns
  • Keep query tests all together
  • Better fit 'toolkit' approach
  • More opportunity to optimise perf by caching data in the selector (like the regexes in EscapeSequence)

wokket avatar Aug 25 '21 20:08 wokket