go-ozzo / ozzo-dbx

A Go (golang) package that enhances the standard database/sql package by providing powerful data retrieval methods as well as DB-agnostic query building capabilities.
MIT License
634 stars 90 forks source link

Exposing Struct Field/Column Name Mappings? #93

Open BourgeoisBear opened 4 years ago

BourgeoisBear commented 4 years ago

I've found the ability to determine DB column names from model structs helpful, but the code that handles this is not exported. @qiangxue, would you accept a pull request adding a function to walk a model struct and return the DB column names for each mapped field?