Skip to content

Commit 376c05e

Browse files
committed
Add len and is_empty methods to query
1 parent 9c44e56 commit 376c05e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,14 @@ impl Query {
380380
});
381381
self
382382
}
383+
/// Returns the number of arguments in this query
384+
pub fn len(&self) -> usize {
385+
self.size_count
386+
}
387+
/// Check if the query is empty
388+
pub fn is_empty(&self) -> bool {
389+
self.size_count == 0
390+
}
383391
/// Number of items in the datagroup
384392
pub(crate) fn __len(&self) -> usize {
385393
self.size_count

0 commit comments

Comments
 (0)