Normalize returns the canonical source/kind form for this ref.
()
| 181 | |
| 182 | // Normalize returns the canonical source/kind form for this ref. |
| 183 | func (r RowRef) Normalize() RowRef { |
| 184 | if r.Source == "" { |
| 185 | r.Source = CacheSourceDB |
| 186 | } |
| 187 | if r.Kind == "" { |
| 188 | if r.ID == "" { |
| 189 | r.Kind = CacheKindTable |
| 190 | } else { |
| 191 | r.Kind = CacheKindRow |
| 192 | } |
| 193 | } |
| 194 | return r |
| 195 | } |
| 196 | |
| 197 | // DependencyKey returns the exact index key for this dependency ref. |
| 198 | func (r RowRef) DependencyKey() string { |
no outgoing calls
no test coverage detected