Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUTF16LE ¶ added in v0.2.0
isUTF16LE checks if the first n bytes of a byte array are valid UTF-16 little-endian.
Since UTF-16 characters can be 2 or 4 bytes long (due to surrogate pairs), we need to be cautious with how many bytes we inspect to avoid cutting a character in half. For simplicity, We assume the UTF-16 encoding is little-endian, which is common, but we may need to add big-endian encoding check if required
TODO: this function isn't working as expected. It's returning true for blob data (most likely due to my misunderstanding of UTF-16)
func TryParseDataType ¶ added in v0.2.0
func TryParseDataType(data []byte) interface{}
MySQL driver always return a byte slice for all types
https://github.com/go-sql-driver/mysql/issues/407
For dynamic query type, we can only do a best effort approximation of the type
Types ¶
This section is empty.