Closed sathibault closed 3 years ago
Hi. Mysql uses the Text Protocol for simple queries, this is breafly mentioned in the README (see the TextProtocol section). You have to prepare and execute a statement to get Value via binary protocol (binary protocol will give you the right variant). Please note, that mysql-type -> value-variant is a lossy mapping (this page describes the correspondence).
Also note, that from_value
respects the textual representation and it may be faster to make a single query and parse a few textual rows, than to prepare and execute a statement.
Oh, that makes sense. I will use the binary protocol. Thanks for the support.
Although the Value enum has a number of variants, query results always return the data as Value::Bytes for all data types. Is there a way to get values in with the proper variant>