RetrieveColumn retrieves column in expression from the columns in schema.
(col *Column)
| 121 | |
| 122 | // RetrieveColumn retrieves column in expression from the columns in schema. |
| 123 | func (s *Schema) RetrieveColumn(col *Column) *Column { |
| 124 | index := s.ColumnIndex(col) |
| 125 | if index != -1 { |
| 126 | return s.Columns[index] |
| 127 | } |
| 128 | return nil |
| 129 | } |
| 130 | |
| 131 | // IsUnique checks if the column is unique key. |
| 132 | // Pass strong=true to check strong contraint: unique && notnull. |