angelxmoreno / angelxmoreno/bun-sqlite-orm

[Feature]: Advanced WHERE conditions (gt, lt, like, in, between)

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
feature medium-priority minor query-builder
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**Problem Statement:**
Current query methods only support exact equality matching. Applications need complex conditions like range queries, pattern matching, and list filtering.

**Proposed Solution:**
Extend query builder with fluent interface:

```typescript
// Current: only exact matches
User.find({ age: 25 });

// Proposed: rich query conditions
User.query()
.where('age').greaterThan(18)
.where('age').lessThanOrEqual(65)
.where('name').like('%john%')
.where('status').in(['active', 'pending'])
.where('createdAt').between(startDate, endDate)
.orderBy('name', 'ASC')
.limit(10)
.offset(20)
.execute();
```

**Operators to Support:**
- Comparison: gt, gte, lt, lte, ne (not equal)
- Pattern: like, ilike (case-insensitive)
- Lists: in, notIn
- Range: between, notBetween
- Null checks: isNull, isNotNull
- Logic: and, or, not

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; start by locating the existing query methods and query builder, then compare them with the User.find({ age: 25 }) example. Done means the fluent interface supports the listed comparison, pattern, list, range, null, and logic conditions, plus orderBy, limit, offset, and execute.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, sqlite, typescript
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.