When using the MySQL coroutine client, if I query a table with numerical columns, I get strings in the resulting array.
Is there a way to get metadata for the columns so that we can parse the numerical columns as actual numbers?
MySQL server always return data as strings if you use query
But you can get numerical columns by $client->connect([..., 'strict_type' => true])
Or you can use prepare + execute (it's better)
Thanks @twose ! Is the prepare method now part of the swoole mysql class?
@osrec method prepare is defined in the \Swoole\Coroutine\MySQL class.
Great, thank you
Most helpful comment
@osrec method
prepareis defined in the \Swoole\Coroutine\MySQL class.