Serialize binary bytea cols into hex/base64 (#537)
- Adds binary serialization into hex/base64 - Default codec is base64 - Codec can be changed via `--binary-codec` CLI option
This commit is contained in:
@@ -31,3 +31,15 @@ func containsRestrictedKeywords(str string) bool {
|
||||
|
||||
return reRestrictedKeywords.MatchString(str)
|
||||
}
|
||||
|
||||
func hasBinary(data string, checkLen int) bool {
|
||||
for idx, chr := range data {
|
||||
if int(chr) < 32 || int(chr) > 126 {
|
||||
return true
|
||||
}
|
||||
if idx >= checkLen {
|
||||
break
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user