(n *chast.ColumnDeclaration)
| 42 | } |
| 43 | |
| 44 | func isNotNull(n *chast.ColumnDeclaration) bool { |
| 45 | if n.Type == nil { |
| 46 | return false |
| 47 | } |
| 48 | // Check if type is wrapped in Nullable() |
| 49 | // If it's Nullable, it can be null, so return false |
| 50 | // If it's not Nullable, it's NOT NULL by default in ClickHouse |
| 51 | if n.Type.Name != "" && strings.ToLower(n.Type.Name) == "nullable" { |
| 52 | return false |
| 53 | } |
| 54 | // Also check if Nullable field is explicitly set |
| 55 | if n.Nullable != nil && *n.Nullable { |
| 56 | return false |
| 57 | } |
| 58 | return true |
| 59 | } |
no outgoing calls
no test coverage detected