MCPcopy
hub / github.com/sqlc-dev/sqlc / hasNotNullConstraint

Function hasNotNullConstraint

internal/engine/sqlite/utils.go:23–37  ·  view source on GitHub ↗
(checks []parser.IColumn_constraintContext)

Source from the content-addressed store, hash-verified

21}
22
23func hasNotNullConstraint(checks []parser.IColumn_constraintContext) bool {
24 for i := range checks {
25 constraint, ok := checks[i].(*parser.Column_constraintContext)
26 if !ok {
27 continue
28 }
29 if constraint.PRIMARY_() != nil && constraint.KEY_() != nil {
30 return true
31 }
32 if constraint.NOT_() != nil && constraint.NULL_() != nil {
33 return true
34 }
35 }
36 return false
37}

Calls 4

PRIMARY_Method · 0.65
KEY_Method · 0.65
NOT_Method · 0.65
NULL_Method · 0.65

Tested by

no test coverage detected