MCPcopy
hub / github.com/go-gorm/gorm / MapColumns

Method MapColumns

chainable_api.go:189–193  ·  view source on GitHub ↗

MapColumns modify the column names in the query results to facilitate align to the corresponding structural fields

(m map[string]string)

Source from the content-addressed store, hash-verified

187
188// MapColumns modify the column names in the query results to facilitate align to the corresponding structural fields
189func (db *DB) MapColumns(m map[string]string) (tx *DB) {
190 tx = db.getInstance()
191 tx.Statement.ColumnMapping = m
192 return
193}
194
195// Where add conditions
196//

Callers

nothing calls this directly

Calls 1

getInstanceMethod · 0.95

Tested by

no test coverage detected