risingwave_connector::sink::encoder::bson

Function datum_to_bson

source
fn datum_to_bson(field: &Field, datum: DatumRef<'_>) -> Bson
Expand description

We support converting all types to MongoDB. If there is an unmatched type, it will be converted to its string representation. If there is a conversion error, a warning log is printed and a Bson::Null is returned