MCPcopy Index your code
hub / github.com/Masterminds/structable / whereIds

Method whereIds

structable.go:567–577  ·  view source on GitHub ↗

whereIds gets a list of names and a list of values for all columns marked as primary keys.

()

Source from the content-addressed store, hash-verified

565// whereIds gets a list of names and a list of values for all columns marked as primary
566// keys.
567func (s *DbRecorder) whereIds() map[string]interface{} {
568 clause := make(map[string]interface{}, len(s.key))
569
570 ar := reflect.Indirect(reflect.ValueOf(s.record))
571
572 for _, f := range s.key {
573 clause[f.column] = ar.FieldByName(f.name).Interface()
574 }
575
576 return clause
577}
578
579// scanFields extracts the tags from all of the fields on a struct.
580func (s *DbRecorder) scanFields(ar Record) {

Callers 4

LoadMethod · 0.95
ExistsMethod · 0.95
DeleteMethod · 0.95
UpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected