Documentation
¶
Overview ¶
Package inflect defines the naming pipeline shared by every product: an open Kind, the Input a naming hook receives, the Next continuation, and the pure string helpers (camel casing, singular/plural, enum value names). Each product declares its own Kind constants and default inflector on top.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByColumns ¶
ByColumns joins UpperCamel column names with "And" (the "ById", "ByEmailAndTenant" suffix used by key-based names).
func LowerCamel ¶
LowerCamel converts snake_case to lowerCamelCase.
func Singularize ¶
Singularize applies simple English singularization rules — enough for common table names; plugins can override anything it gets wrong.
func UpperCamel ¶
UpperCamel converts snake_case to UpperCamelCase.
Types ¶
type Input ¶
type Input struct {
Schema string // pg schema name
Table string // pg table/view name
Column string // pg column name (when applicable)
Columns []string // multi-column keys
Constraint string // pg constraint name backing the name (relation kinds)
Function string // pg function name (when applicable)
Enum string // pg enum type name
Value string // enum value
IsList bool
}
Input carries everything a hook may need to build a name.