Skip to content

v0.2.0: query ergonomics, mutation wrappers, performance improvements, and real-world example#9

Merged
emremy merged 4 commits into
mainfrom
v0.2.0
Apr 30, 2026
Merged

v0.2.0: query ergonomics, mutation wrappers, performance improvements, and real-world example#9
emremy merged 4 commits into
mainfrom
v0.2.0

Conversation

@emremy
Copy link
Copy Markdown
Owner

@emremy emremy commented Apr 30, 2026

🚀 v0.2.0 Release

This release focuses on developer experience, usability, and real-world validation without changing the core architecture.

ColQL is now validated with a real backend setup and large dataset scenarios.


✨ Highlights

🔍 Query Ergonomics

  • Added object-based queries: table.where({ age: { gt: 25 }, country: "TR" })
  • Strong TypeScript typing with operator safety per column type

🔁 Mutations

  • Added table-level wrappers:
    • updateMany(predicate, partial)
    • deleteMany(predicate)
  • Existing APIs preserved (no breaking changes)

🧠 Query Execution

  • Added filter(fn) as a full-scan escape hatch:
    • runs after structured predicates
    • does not use indexes

📊 Observability

  • Added optional onQuery hook for lightweight query instrumentation

⚡ Performance

  • Removed regression introduced during development
  • Optimized query execution hot paths
  • Improved scan and index performance

1M rows (Fastify example)

  • indexed query: ~2ms
  • range query: ~25ms
  • full scan: ~25ms
  • filter(fn): ~200ms
  • 50 concurrent requests: ~3.5ms avg

🧪 Real-World Validation

Added a Fastify backend example with:

  • 1M in-memory dataset
  • full CRUD + query API
  • cold start + mutation validation
  • index rebuild verification
  • latency and stress tests
  • memory usage checks

📚 Documentation

  • Updated docs for:
    • object-based queries
    • mutation wrappers
    • filter(fn) behavior
    • TypeScript typing
  • Ensured index guarantees and planner behavior are clearly defined

🔒 Guarantees

  • No breaking changes
  • Index usage does not affect correctness
  • Planner decisions affect performance only
  • Dirty indexes are rebuilt before use
  • rowIndex is not a stable identifier

📦 Notes

  • Indexes are not serialized (must be recreated after restore)
  • filter(fn) is intentionally full-scan and should be used selectively
  • ColQL remains process-local (not distributed)

Feedback is very welcome 🙌

emremy added 3 commits April 30, 2026 13:36
improvements

- add object-based where({ ... }) with strict TypeScript typing
- add updateMany() and deleteMany() as table-level mutation wrappers
- add filter(fn) as full-scan escape hatch (no index usage)
- add optional onQuery hook for lightweight query instrumentation

- preserve existing tuple where() and mutation APIs (no breaking
  changes)
- enforce strict operator typing per column type (numeric, boolean,
  dictionary)
- add COLQL_INVALID_PREDICATE error for invalid object predicates

- stabilize insertMany() behavior and reduce unnecessary overhead
- optimize query execution hot paths (remove regression, improve scan
  performance)

- update documentation for new APIs and behaviors
- ensure full test coverage for new features and type inference

no breaking changes
tests

- add Fastify example demonstrating ColQL v0.2.0 in a real backend
- seed up to 1M in-memory rows for realistic usage scenarios

- add cold start + mutation validation:
  - updateMany / deleteMany / insertMany after large seed
  - verify query correctness and index rebuild behavior

- add latency validation scripts:
  - structured queries (indexed)
  - range queries
  - broad scan queries
  - filter(fn) full-scan scenarios

- add filter(fn) worst-case test on large dataset

- add basic concurrent stress test (50 parallel requests)
  - validate consistency and error-free responses

- add memory usage checks using process.memoryUsage()

- add example-specific scripts:
  - test:large
  - stress
  - memory:example

- update example README with usage and validation instructions

no changes to core ColQL behavior
@emremy emremy self-assigned this Apr 30, 2026
@emremy emremy added the release label Apr 30, 2026
- document indexes as derived performance structures
- clarify planner choices affect performance only, not results
- document dirty index rebuild-before-use guarantee
- clarify rowIndex/row positions are not stable external IDs
- align equality, sorted index, serialization, memory, and mutation docs
- clarify filter(fn) ordering and index behavior
@emremy emremy changed the title V0.2.0 v0.2.0: query ergonomics, mutation wrappers, performance improvements, and real-world example Apr 30, 2026
@emremy emremy merged commit 08f0864 into main Apr 30, 2026
2 checks passed
@emremy emremy deleted the v0.2.0 branch April 30, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant