Query add pattern matching on Field Reference types#605
Open
ElijahAhianyo wants to merge 13 commits into
Open
Conversation
|
| Branch | elijah/like-query |
| Testbed | github-ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| empty_router/empty_router | 📈 view plot 🚷 view threshold | 6,531.80 µs(+3.57%)Baseline: 6,306.45 µs | 7,725.01 µs (84.55%) |
| json_api/json_api | 📈 view plot 🚷 view threshold | 1,097.70 µs(+0.30%)Baseline: 1,094.42 µs | 1,316.16 µs (83.40%) |
| nested_routers/nested_routers | 📈 view plot 🚷 view threshold | 1,033.00 µs(+1.69%)Baseline: 1,015.86 µs | 1,192.25 µs (86.64%) |
| single_root_route/single_root_route | 📈 view plot 🚷 view threshold | 997.20 µs(+1.85%)Baseline: 979.07 µs | 1,157.32 µs (86.16%) |
| single_root_route_burst/single_root_route_burst | 📈 view plot 🚷 view threshold | 19,923.00 µs(+12.87%)Baseline: 17,651.05 µs | 21,133.86 µs (94.27%) |
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
.contains, .starts_with, .ends_with` proof of concept.contains, .starts_with, .ends_with proof of concept
- improve code quality - Add docs - refactor/move expr into a module since db/query file has grown bigger now
.contains, .starts_with, .ends_with proof of concept.contains, .starts_with, .ends_with, .raw_like
.contains, .starts_with, .ends_with, .raw_like
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds basic string pattern matching to queries. This is equivalent to
LIKE,ILIKE(postgres specific) andGLOB(sqlite specific) variants on database enginesThe expressions supported are:
containsstarts_withends_withraw_likeand with an i-prefixed case-insensitive counterpart of each:
icontainsistarts_withiends_withiraw_likeUsage:
raw_like/iraw_likeare escape hatches that accept a raw glob pattern (* for zero-or-more characters, ? for exactly one, \ to escape a wildcard) rather than a plain literal, for shapes the other four methods can't express, such as a fixed-width or middle-of-string match:These methods can be combined with Boolean and comparison operators like any other expression:
Type of change