mysql-net / MySqlConnector

MySQL Connector for .NET
https://mysqlconnector.net
MIT License
1.39k stars 336 forks source link

Question: Support MariaDB extended informations #1309

Open rusher opened 1 year ago

rusher commented 1 year ago

Since 10.5.2, MariaDB has an extended information in column metadata : When capability MARIADB_CLIENT_EXTENDED_TYPE_INFO is set, Column definition packet can receive extra informations. Columns definition might receive 2 additional piece of information :

Actual use of those fields are :

(In the futur, BOOLEAN type will be send as TinyInt with 'boolean' TypeName, but that's actually not the case)

Since connector already handle JSON as text, feel free to close this issue, i'm just posting that just in case you see some other use...

bgrainger commented 1 year ago

Thanks for letting me know.

It seems like we could use this information to set the MySqlDbType for the column (e.g., to MySqlDbType.Json); however, I don't know if this would have much practical impact (other than perhaps changing the data returned from GetColumnSchema).

It's worth investigating further, though.

vaintroub commented 3 months ago

I do not think JSON is specifically interesting, but UUID might be, because Guid is a native ADO.NET type (https://learn.microsoft.com/en-us/dotnet/api/system.data.dbtype?view=net-8.0 ) . Then, there is no guessing in form of GuidFormat=Binary16 necessary. UUID is something that is marked as UUID.