Some types have a logical idea of what a "starts_with" match would evaluate to. Today, it's possible to manually construct a range that can be passed into list() or with_key_range() that perform the same function. For example, to scan a byte range that starts with the prefix [0, 0], you would issue a db.collection::<MyCollection>().list([0,0]..[0,1]).await.
It would be nice to offer a way for types that support it to offer a way to create these ranges easily.
Some types have a logical idea of what a "starts_with" match would evaluate to. Today, it's possible to manually construct a range that can be passed into
list()
orwith_key_range()
that perform the same function. For example, to scan a byte range that starts with the prefix[0, 0]
, you would issue adb.collection::<MyCollection>().list([0,0]..[0,1]).await
.It would be nice to offer a way for types that support it to offer a way to create these ranges easily.