MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / isIDPrimaryKey

Method isIDPrimaryKey

pkg/sql2code/parser/commonParser.go:137–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135}
136
137func (info *CrudInfo) isIDPrimaryKey() bool {
138 if info == nil {
139 return false
140 }
141 if info.ColumnName == "id" && (info.GoType == "uint64" ||
142 info.GoType == "int64" ||
143 info.GoType == "uint" ||
144 info.GoType == "int" ||
145 info.GoType == "uint32" ||
146 info.GoType == "int32") {
147 return true
148 }
149 return false
150}
151
152func (info *CrudInfo) GetGRPCProtoValidation() string {
153 if info == nil {

Callers 2

TestCrudInfoFunction · 0.80
isCommonStyleMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestCrudInfoFunction · 0.64