Adding EndsWith method for Query and QueryAny#2727
Conversation
This document outlines the Code of Conduct for community members, detailing pledges, standards of behavior, enforcement responsibilities, and consequences for violations.
Updated build status badge and added pre-release badge.
|
Awesome! Nice find! Unfortunately i am pretty tied up at the moment but i will get to it asap :) |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
https://github.com/litedb-org/LiteDB/blob/3772078b064d747745bd565f44a5e01c2a9ddda4/Client/Structures/Query.cs#L129
Make EndsWith generate suffix match
The new Query.EndsWith builds LIKE value + "%", which matches strings beginning with the provided value and is functionally identical to StartsWith. Any caller expecting suffix semantics (e.g., Query.EndsWith("Customers[*].Name", "na")) will return names starting with na instead of ending with it, so the new API does not satisfy its documented behavior.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3772078 to
e8fd501
Compare
|
|
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-authored-by: rubegrube <rubegrube@gmail.com>
Co-authored-by: rubegrube <rubegrube@gmail.com>
Added unit tests for the string matching query methods in QueryApi_Tests.cs: - Query.StartsWith: Tests filtering by name prefix - Query.EndsWith: Tests filtering by name suffix - Query.Contains: Tests filtering by substring match
Use "John" instead of "an" to avoid case-sensitivity differences between LINQ string.Contains() and LiteDB LIKE operator.
LiteDB pull request 2727
|
Thanks for your contribution. |
Adding
EndsWithmethod to help query data.Issue at #2726