(sg *SubGraph)
| 212 | } |
| 213 | |
| 214 | func validateSubGraphForRDF(sg *SubGraph) error { |
| 215 | if sg.IsGroupBy() { |
| 216 | return errors.New("groupby is not supported in rdf output format") |
| 217 | } |
| 218 | uidCount := sg.Attr == "uid" && sg.Params.DoCount && sg.IsInternal() |
| 219 | if uidCount { |
| 220 | return errors.New("uid count is not supported in the rdf output format") |
| 221 | } |
| 222 | if sg.Params.Normalize { |
| 223 | return errors.New("normalize directive is not supported in the rdf output format") |
| 224 | } |
| 225 | if sg.Params.IgnoreReflex { |
| 226 | return errors.New("ignorereflex directive is not supported in the rdf output format") |
| 227 | } |
| 228 | if sg.SrcFunc != nil && sg.SrcFunc.Name == "checkpwd" { |
| 229 | return errors.New("chkpwd function is not supported in the rdf output format") |
| 230 | } |
| 231 | if sg.Params.Facet != nil && !sg.Params.ExpandAll { |
| 232 | return errors.New("facets are not supported in the rdf output format") |
| 233 | } |
| 234 | return nil |
| 235 | } |
| 236 | |
| 237 | func quotedNumber(val []byte) []byte { |
| 238 | const overhead = 2 // opening and closing quotes |
no test coverage detected