asyncer-io / r2dbc-mysql

Reactive Relational Database Connectivity for MySQL. The official successor to mirromutth/r2dbc-mysql(dev.miku:r2dbc-mysql).
https://r2dbc.io
Apache License 2.0
203 stars 21 forks source link

Implement Relaxed Conversion Logic for Codecs #285

Open jchrys opened 2 months ago

jchrys commented 2 months ago

Existing codec implementation exhibits strict type conversions. For instance, boolean codec converts to boolean only when data type is binary or TINYINT(1) BIT(1). However, In many real-world applications, data stored in MySQL databases can be represented in multiple formats. Specifically, Boolean values might be stored in columns with different data types such as VARCHAR or CHAR, where values like 'true', 'false', '1', '0' are used to represent Boolean states. The current implementation does not support converting these string representations to Boolean values, causing inconvenience and additional data transformation efforts.

jchrys commented 2 months ago

ref: type conversions https://dev.mysql.com/doc/connector-j/en/connector-j-reference-type-conversions.html