Documentation
¶
Index ¶
- func HasJSONModifier(tag string) bool
- func HasJSONTag(tags map[string]string) bool
- func HasKeyRoleModifier(tag, role string) bool
- func HasModifier(tag, modifier string) bool
- func NormalizeJSONFieldValue(fieldType reflect.Type, value any) (any, error)
- func NormalizeJSONReflectValue(fieldType reflect.Type, value reflect.Value) (any, error)
- func UnmarshalJSONFieldValue(av types.AttributeValue, dest reflect.Value, fallback func() error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasJSONModifier ¶
HasJSONModifier reports whether a raw theorydb tag includes the json modifier.
func HasJSONTag ¶
HasJSONTag reports whether parsed field metadata includes the json modifier.
func HasKeyRoleModifier ¶
HasKeyRoleModifier reports whether a theorydb tag declares the requested key role either as a standalone token or in the legacy gsi:Name:pk / lsi:Name:sk form. Attribute names containing the same substring do not match.
func HasModifier ¶
HasModifier reports whether a raw comma-separated tag contains an exact standalone modifier token. Substring matches are deliberately rejected because modifiers such as omitempty can control destructive update actions.
func NormalizeJSONFieldValue ¶
NormalizeJSONFieldValue converts a json-tagged field value into the canonical Go shape used by DynamoDB conversion. Structured fields are normalized into generic JSON-compatible maps/slices/scalars; string-like fields retain text.
func NormalizeJSONReflectValue ¶
NormalizeJSONReflectValue mirrors NormalizeJSONFieldValue for reflect-based callers handling struct fields.
func UnmarshalJSONFieldValue ¶
func UnmarshalJSONFieldValue(av types.AttributeValue, dest reflect.Value, fallback func() error) error
UnmarshalJSONFieldValue decodes a json-tagged DynamoDB attribute value into a field destination. Structured fields accept both native document values and legacy JSON strings; string-like fields accept both raw strings and native documents re-encoded as JSON text.
Types ¶
This section is empty.