Skip to content

Adding EndsWith method for Query and QueryAny#2727

Merged
JKamsker merged 9 commits intolitedb-org:devfrom
rube200:feature/2726_Adding-EndsWith-to-Query
Dec 28, 2025
Merged

Adding EndsWith method for Query and QueryAny#2727
JKamsker merged 9 commits intolitedb-org:devfrom
rube200:feature/2726_Adding-EndsWith-to-Query

Conversation

@rube200
Copy link

@rube200 rube200 commented Nov 17, 2025

Adding EndsWith method to help query data.
Issue at #2726

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.
@JKamsker
Copy link
Collaborator

Awesome! Nice find! Unfortunately i am pretty tied up at the moment but i will get to it asap :)

@JKamsker
Copy link
Collaborator

JKamsker commented Dec 8, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/litedb-org/LiteDB/blob/3772078b064d747745bd565f44a5e01c2a9ddda4/Client/Structures/Query.cs#L129
P1 Badge 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".

@rube200 rube200 force-pushed the feature/2726_Adding-EndsWith-to-Query branch from 3772078 to e8fd501 Compare December 9, 2025 20:39
@rube200
Copy link
Author

rube200 commented Dec 9, 2025

@codex review
Ups, should be fixed now

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@JKamsker
Copy link
Collaborator

JKamsker commented Dec 9, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Bravo.

ℹ️ 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".

@JKamsker JKamsker changed the base branch from master to dev December 16, 2025 10:51
@rube200 rube200 marked this pull request as draft December 27, 2025 15:04
Co-authored-by: rubegrube <rubegrube@gmail.com>
cursoragent and others added 4 commits December 27, 2025 15:06
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.
@rube200 rube200 marked this pull request as ready for review December 27, 2025 15:56
@rube200 rube200 requested a review from JKamsker December 27, 2025 15:56
@JKamsker JKamsker merged commit 68b7e25 into litedb-org:dev Dec 28, 2025
45 checks passed
@JKamsker
Copy link
Collaborator

Thanks for your contribution.

@rube200 rube200 deleted the feature/2726_Adding-EndsWith-to-Query branch December 28, 2025 17:22
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.

3 participants