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

✨ Added "contains" operator support to API filter params #14286

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

kevinansfield
Copy link
Member

@kevinansfield kevinansfield commented Mar 9, 2022

refs https://github.com/TryGhost/Team/issues/1408

  • switched from @nexes/nql to @tryghost/nql and bumped @tryghost/bookshelf-plugins to get access to the latest NQL version across the app
  • adds "contains" operator support
    • :~'string' - contains
    • :-~'string' - does not contain
    • :~^'string' - starts with
    • :-~^'string' - does not start with
    • :~$'string' - ends with
    • :-~$'string' - does not end with
  • enables ' escaping in strings, eg 'O\'Nolan'

@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #14286 (1c3d77f) into main (9c64d7a) will not change coverage.
The diff coverage is 85.71%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #14286   +/-   ##
=======================================
  Coverage   55.42%   55.42%           
=======================================
  Files         565      565           
  Lines       46840    46840           
  Branches     3900     3900           
=======================================
  Hits        25963    25963           
  Misses      20836    20836           
  Partials       41       41           
Impacted Files Coverage Δ
core/server/models/base/plugins/raw-knex.js 10.57% <0.00%> (ø)
...server/api/canary/utils/serializers/input/pages.js 84.54% <100.00%> (ø)
...server/api/canary/utils/serializers/input/posts.js 90.51% <100.00%> (ø)
core/server/models/post.js 36.52% <100.00%> (ø)
core/server/services/members/content-gating.js 100.00% <100.00%> (ø)
core/server/services/posts/posts-service.js 36.19% <100.00%> (ø)
core/server/services/url/UrlGenerator.js 96.25% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c64d7a...1c3d77f. Read the comment docs.

refs TryGhost/Product#1408

- switched from `@nexes/nql` to `@tryghost/nql` and bumped `@tryghost/bookshelf-plugins` to get access to the latest NQL version across the app
- adds "contains" operator support
  - `:~'string'` - contains
  - `:-~'string'` - does not contain
  - `:~^'string'` - starts with
  - `:-~^'string'` - does not start with
  - `:~$'string'` - ends with
  - `:-~$'string'` - does not end with
- enables `'` escaping in strings, eg `'O\'Nolan'`
@kevinansfield kevinansfield changed the title Added "contains" operator support to filter params ✨ Added "contains" operator support to API filter params Mar 9, 2022
@kevinansfield kevinansfield merged commit 51e04c7 into TryGhost:main Mar 9, 2022
@kevinansfield kevinansfield deleted the bump-nql branch March 9, 2022 13:02
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.

2 participants