Skip to content

Conversation

@ruslanti
Copy link
Collaborator

@ruslanti ruslanti commented Nov 3, 2025

…tation

@ruslanti ruslanti requested review from Copilot, godronus and qrdl November 3, 2025 08:29
@ruslanti ruslanti self-assigned this Nov 3, 2025
@ruslanti ruslanti added the enhancement New feature or request label Nov 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors the sorted set range query API by renaming zrange to zrange_by_score and updating its return type to include scores alongside values. The change improves API clarity by making the function name more descriptive and returns richer data by including score information.

  • Renamed zrange to zrange_by_score across WIT interface, FFI bindings, and Rust implementation
  • Updated return type from Vec<Vec<u8>> to Vec<(Vec<u8>, f64)> to include score information
  • Enhanced documentation to clarify score-based filtering behavior

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
wit/key-value.wit Removed type aliases and renamed zrange to zrange_by_score with updated return type; improved documentation
src/proxywasm/mod.rs Renamed FFI function from proxy_kv_store_zrange to proxy_kv_store_zrange_by_score
src/proxywasm/key_value.rs Implemented zrange_by_score with score deserialization logic and updated documentation
examples/key-value/src/lib.rs Updated example to use zrange_by_score and display scores

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

.map(|v| v.to_vec())
.map(|v| {
let mut value = v.to_vec();
let sz = size_of::<f64>();
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

Missing import for size_of. Add use std::mem::size_of; to the imports section at the top of the file.

Copilot uses AI. Check for mistakes.
@ruslanti ruslanti merged commit d87f363 into main Nov 4, 2025
3 checks passed
@ruslanti ruslanti deleted the feat/436-kv-store-improvements branch November 4, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants