mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-15 14:30:49 +00:00
Option<T> is generally used to represent either a T or a null value. In SQLite, it makes sense to model this as either a regular T binding (when the option is Some) or a regular NULL binding (when the option is None). This commit implements Bindable for any Option<T> where T is already Bindable, allowing those Options to be used directly with statements, filling in NULL where needed. No new unsafe code is needed. Tests are included.