@spec select(content_or_query_hl7(), binary()) :: HL7.Query.t()
def select(msg, segment_selector)
when is_list(msg) and (is_binary(segment_selector) or is_function(segment_selector)) do
HL7.Query.new(msg) |> perform_select(segment_selector)
end
Clearly, segment_selector can be more than a binary. The reason I'm filing an issue and not a PR straight away is that I have a bit of deja vu here but I can't find an earlier fix. So either we're the first to pass in functions here and use Dialyzer, or I'm missing something.
If not missing something, happy to provide a quick PR :)
Clearly,
segment_selector
can be more than a binary. The reason I'm filing an issue and not a PR straight away is that I have a bit of deja vu here but I can't find an earlier fix. So either we're the first to pass in functions here and use Dialyzer, or I'm missing something.If not missing something, happy to provide a quick PR :)