ValueType s a helper function to decide value type of DirectedEdge/Posting/N-Quad.
(hasValue, hasLang, hasSpecialId bool)
| 24 | |
| 25 | // ValueType s a helper function to decide value type of DirectedEdge/Posting/N-Quad. |
| 26 | func ValueType(hasValue, hasLang, hasSpecialId bool) ValueTypeInfo { |
| 27 | switch { |
| 28 | case hasValue && hasLang: |
| 29 | return ValueMulti |
| 30 | case hasValue && !hasLang: |
| 31 | return ValuePlain |
| 32 | case !hasValue && hasSpecialId: |
| 33 | return ValueEmpty |
| 34 | case !hasValue && !hasSpecialId: |
| 35 | return ValueUid |
| 36 | default: |
| 37 | return ValueUnknown |
| 38 | } |
| 39 | } |
no outgoing calls