What scany is and isn't
masterCore Purpose
scany is a scanning utility designed to map database rows into Go structs, maps, and primitive types. It eliminates the need for manual row iteration and column-by-column scanning.
Key Features
- Custom database column names via struct tags.
- Support for nested or embedded structs.
- Support for
NULLvalues and custom types. - Ability to omit specific struct fields.
- Support for destination types like maps and Go primitives.
- Ability to override default settings.
Important Distinctions
- Not an ORM: scany only works in one direction (Database $\rightarrow$ Go objects). It cannot build queries based on Go objects.
- No Relation Management: It does not handle relationships between objects (e.g., one-to-many or many-to-many).