package
20.2.19+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
BytesEncodeFormatFromString converts a string into a BytesEncodeFormat.
DecodeRawBytesToByteArray converts raw bytes to a SQL-level byte array according to the encoding specification in "be".
DecodeRawBytesToByteArrayAuto detects which format to use with DecodeRawBytesToByteArray().
EncodeByteArrayToRawBytes converts a SQL-level byte array into raw bytes according to the encoding specification in "be".
EncodeEscapedSQLIdent writes the identifier in s to buf.
EncodeLocaleName writes the locale identifier in s to buf.
EncodeRestrictedSQLIdent writes the identifier in s to buf.
EncodeSQLBytes encodes the SQL byte array in 'in' to buf, to a format suitable for re-scanning.
EncodeSQLString writes a string literal to buf.
EncodeSQLStringWithFlags writes a string literal to buf.
EncodeUnrestrictedSQLIdent writes the identifier in s to buf.
EscapeSQLString returns an escaped SQL representation of the given string.
IsDigit returns true if the character is between 0 and 9.
IsHexDigit returns true if the character is a valid hexadecimal digit.
IsIdentMiddle returns true if the character is valid inside an identifier.
IsIdentStart returns true if the character is valid at the start of an identifier.
NormalizeName normalizes to lowercase and Unicode Normalization Form C (NFC).
# Constants
BytesEncodeBase64 uses base64 encoding.
BytesEncodeEscape uses the escaped format: e'abc\n'::BYTES::STRING -> 'abc\012'.
BytesEncodeHex uses the hex format: e'abc\n'::BYTES::STRING -> '\x61626312'.
EncBareIdentifiers indicates that identifiers will be rendered without wrapping quotes.
EncBareStrings indicates that strings will be rendered without wrapping quotes if they contain no special characters.
EncFirstFreeFlagBit needs to remain unused; it is used as base bit offset for tree.FmtFlags.
EncNoFlags indicates nothing special should happen while encoding.
# Variables
AllowedExperimental contains keywords for which the EXPERIMENTAL_ or TESTING_ prefixes are allowed to be parsed along with the keyword to the same token.
# Type aliases
BytesEncodeFormat controls which format to use for BYTES->STRING conversions.
EncodeFlags influence the formatting of strings and identifiers.