Documentation
¶
Overview ¶
Package fieldkind generates a value from what a field is called.
A schema can say a property is a string and nothing more. Everything that makes the value recognisable — that it is a token, an address, a timezone — lives in its name, and synth already knows how to read one: infer.Kind maps "email", "token", "timezone" onto real kinds. What it does not do is read a *qualified* name: its table has "token" and "id" but not "access_token" or "session_id", which is what real payloads are full of. Alias closes that gap by falling back to the head word, and String turns the result into a value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alias ¶
Alias returns the name synth recognises for this field, and whether it found one. It tries the name itself first, then progressively shorter tails ("access_token" -> "token"), then the head ("email_address" -> "email"), and finally the singular of a plural ("emails" -> "email").
Types ¶
This section is empty.