Issue with D1 types when using Rust
Issue
I'm trying to query from my D1 database. Using wrangler, I know that my query is correct. It returns expected values. However, when attempting to query within my Rust code, I find that there is an issue with a specific item:
total_tokens
.
Here is the struct that I attempt to serialize the data into:
Here is my request:
Whenever I remove the total_tokens
value from the LiquidityForward
struct, it returns fine with expected data. It can't seem to understand the result with either a u128
, u64
, u32
, or String
type.
What should I be using?
Environment
- worker = { version = "0.0.18", features = ["d1"] }
- Rust0 Replies