ValidColumn reports if the column name is valid (part of the table columns).
(column string)
| 94 | |
| 95 | // ValidColumn reports if the column name is valid (part of the table columns). |
| 96 | func ValidColumn(column string) bool { |
| 97 | for i := range Columns { |
| 98 | if column == Columns[i] { |
| 99 | return true |
| 100 | } |
| 101 | } |
| 102 | for i := range ForeignKeys { |
| 103 | if column == ForeignKeys[i] { |
| 104 | return true |
| 105 | } |
| 106 | } |
| 107 | return false |
| 108 | } |
| 109 | |
| 110 | var ( |
| 111 | // DefaultCreateTime holds the default value on creation for the "create_time" field. |
no outgoing calls
no test coverage detected