Documentation
¶
Index ¶
Constants ¶
View Source
const (
SchemaNamePrefix = "_"
)
Variables ¶
Functions ¶
func DecodeSchemaNameBase62 ¶
func EncodeSchemaNameBase62 ¶
EncodeSchemaNameBase62 encodes the input string using base62 encoding and returns a schema name prefixed with SchemaNamePrefix. The resulting encoded schema name must be between 3 and 62 characters long. Returns an error if the input is empty or the encoded length is out of bounds.
Postgresql allows max 63 bytes for schema name. Keeps schema names in db encoding, usually UTF-8. In UTF-8, ASCII characters are 1 byte (a-z, A-Z, 0-9, _). Non-ASCII characters can be more than 1 byte. ASCII characters are 1 byte. If 63 characters long string in golang contains only ASCII characters, it will be 63 bytes long.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.