kubo / rust-oracle

Oracle driver for Rust
189 stars 44 forks source link

Add method to retrieve CHAR/NCHAR encoding information #55

Closed christoph-heiss closed 2 years ago

christoph-heiss commented 2 years ago

Hi,

this adds a simply way to retrieve information about the size of CHAR/NCHAR (and related types like CLOB/NCLOB). Uses dpiConn_getEncodingInfo() under the hood.

Thanks!

kubo commented 2 years ago

Thanks for making the pull request.

If the encoding information retrieved by dpiConn_getEncodingInfo is useful, I'll merge it. However I don't thinks so. Rust-oracle always uses UTF-8 for CHAR and NCHAR even when the character set part of the environment variable NLS_LANG isn't UTF-8. I think that it isn't useful when the function always retrieves same encoding information.

If you think that it is useful, let's me know the reason. Otherwise, close this.