Skip to content
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

Support multiple query values with same key #139

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

adam-fowler
Copy link
Member

Add FlatDictionary to store query values, which supports storing multiple values for the same key. Use this in HBParameters.

Add FlatDictionary to store query values, which supports storing multiple values for the same key. Use this in HBParameters.
@codecov
Copy link

codecov bot commented Aug 22, 2022

Codecov Report

Base: 78.50% // Head: 78.15% // Decreases project coverage by -0.35% ⚠️

Coverage data is based on head (55b01fc) compared to base (fc53436).
Patch coverage: 56.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #139      +/-   ##
==========================================
- Coverage   78.50%   78.15%   -0.36%     
==========================================
  Files          71       72       +1     
  Lines        3038     3094      +56     
==========================================
+ Hits         2385     2418      +33     
- Misses        653      676      +23     
Impacted Files Coverage Δ
Sources/Hummingbird/Router/Parameters.swift 51.35% <27.27%> (-9.37%) ⬇️
Sources/Hummingbird/HTTP/URL.swift 84.78% <50.00%> (+1.08%) ⬆️
Sources/Hummingbird/Utils/FlatDictionary.swift 63.82% <63.82%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@drekka
Copy link
Contributor

drekka commented Aug 23, 2022

Looks good to me :-)

@adam-fowler
Copy link
Member Author

Did a quick performance test and it is slower accessing values than a standard Dictionary, but much quicker setting values than a standard Dictionary

@adam-fowler adam-fowler merged commit 3feb2ba into main Aug 23, 2022
@adam-fowler adam-fowler deleted the feature/mulitple-query-values branch August 23, 2022 11:00
@drekka
Copy link
Contributor

drekka commented Aug 23, 2022

Given that there's only ever a few parameters I'd be surprised it mattered :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants