SplitRelation splits a relation string by the separator "." and returns the result as a slice
(relation string)
| 126 | |
| 127 | // SplitRelation splits a relation string by the separator "." and returns the result as a slice |
| 128 | func SplitRelation(relation string) (a []string) { |
| 129 | s := strings.Split(relation, SEPARATOR) // split relation by the separator "." |
| 130 | a = append(a, s...) |
| 131 | if len(a) == 1 { |
| 132 | a = append(a, "") // if there is only one element in the slice, add an empty string to the end |
| 133 | } |
| 134 | return a |
| 135 | } |
| 136 | |
| 137 | // IsRelationComputed checks if a relation is computed or not |
| 138 | func IsRelationComputed(relation string) bool { |