tonbo-io / tonbo

A portable embedded database using Arrow.
https://tonbo.io
Apache License 2.0
679 stars 41 forks source link

Add mapping to Rust Bound #182

Open crwen opened 5 days ago

crwen commented 5 days ago

Rust Bound has three type of value: Unbounded, Included and Excluded, but python can not express them well. So we should build a structure mapping to Rust Bound like this:

await txn.scan(Bound::Included(1), Bound::Unbounded, limit=100, projection=["age", "weight"])
ethe commented 5 days ago

Maybe create a Python standard enum to define Bound?

crwen commented 5 days ago

Maybe create a Python standard enum to define Bound?

I also have considered two ways: