Skip to content

Conversation

@Artmann
Copy link
Owner

@Artmann Artmann commented Nov 16, 2025

No description provided.

Implement support for querying number fields with comparison operators,
following Laravel Eloquent and Active Record patterns.

Features:
- Three-parameter syntax: where('age', '>', 18)
- Supported operators: =, !=, <>, >, >=, <, <=
- Maps to MongoDB operators: $gt, $gte, $lt, $lte, $ne
- Maintains backward compatibility with 2-param syntax
- Full test coverage for all operators

Example usage:
```typescript
// Greater than
User.where('age', '>', 35).get()

// Less than or equal
User.where('price', '<=', 50).get()

// Chaining
User.where('age', '>', 18)
    .where('votes', '<=', 100)
    .get()
```

Resolves #57
Update all documentation to showcase the new comparison operator feature:

- Add detailed "Comparison Operators" section to retrieving-models.md
- Include operator reference table with examples
- Add chaining examples and real-world use cases
- Update README.md querying section with comparison operators
- Update CLAUDE.md development guide with query examples
- Document all supported operators: =, !=, <>, >, >=, <, <=

The documentation emphasizes:
- Three-parameter syntax for comparisons
- Backward compatibility with two-parameter syntax
- Real-world examples (age ranges, price filters, etc.)
- Chaining multiple conditions
@vercel
Copy link

vercel bot commented Nov 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
esix Ready Ready Preview Comment Nov 16, 2025 11:41am

@Artmann Artmann merged commit 6a952ae into main Nov 16, 2025
11 checks passed
@Artmann Artmann deleted the claude/add-number-field-queries-01NNLcAKffusgfj7fUpqz5TR branch November 16, 2025 11:44
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