Skip to content

Commit

Permalink
query, response: Add dynlist lib type trait impls and fix proto
Browse files Browse the repository at this point in the history
  • Loading branch information
ohsayan committed Jul 23, 2024
1 parent 330a8f5 commit 753b69f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,11 @@ impl SQParam for String {
}
}

const LIST_SYM_OPEN: u8 = 0x09;
const LIST_SYM_OPEN: u8 = 0x07;
const LIST_SYM_CLOSE: u8 = ']' as u8;

/// A list type representing a Skyhash list type, used in parameter lists
#[derive(Debug, PartialEq, Clone)]
pub struct QList<'a, T: SQParam> {
l: &'a [T],
}
Expand Down Expand Up @@ -428,4 +429,5 @@ fn list_param() {
list
);
assert_eq!(q.param_cnt(), 3);
dbg!(String::from_utf8(q.debug_encode_packet())).unwrap();
}
1 change: 1 addition & 0 deletions src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ impl<T: FromRow> Deref for Rows<T> {
}

/// A list received from a response
#[derive(Debug, PartialEq, Clone)]
pub struct RList<T: FromValue = Value>(Vec<T>);

impl<T: FromValue> RList<T> {
Expand Down

0 comments on commit 753b69f

Please sign in to comment.