util

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnescapeChar

func UnescapeChar(b byte) []byte

UnescapeChar returns the unescaped byte(s) for a MySQL backslash escape sequence. Given the byte after the backslash, it returns the replacement byte(s). For most escapes this is a single byte; for \% and \_ both the backslash and the character are preserved.

See https://dev.mysql.com/doc/refman/8.0/en/string-literals.html

\" \' \\ \n \0 \b \Z \r \t ==> escape to one char
\% \_ ==> preserve both chars
other ==> remove backslash

Types

type IHasher

type IHasher interface {
	HashBool(val bool)
	HashInt(val int)
	HashInt64(val int64)
	HashUint64(val uint64)
	HashFloat64(val float64)
	HashRune(val rune)
	HashString(val string)
	HashByte(val byte)
	HashBytes(val []byte)
	Reset()
	Sum64() uint64
}

IHasher is internal usage represent cascades/base.Hasher

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL