(srcFn *functionContext, langs []string, attr string)
| 1203 | } |
| 1204 | |
| 1205 | func needsStringFiltering(srcFn *functionContext, langs []string, attr string) bool { |
| 1206 | if !srcFn.isStringFn { |
| 1207 | return false |
| 1208 | } |
| 1209 | |
| 1210 | // If a predicate doesn't have @lang directive in schema, we don't need to do any string |
| 1211 | // filtering. |
| 1212 | if !schema.State().HasLang(attr) { |
| 1213 | return false |
| 1214 | } |
| 1215 | |
| 1216 | return langForFunc(langs) != "." && |
| 1217 | (srcFn.fnType == standardFn || srcFn.fnType == hasFn || |
| 1218 | srcFn.fnType == fullTextSearchFn || srcFn.fnType == compareAttrFn || |
| 1219 | srcFn.fnType == customIndexFn || srcFn.fnType == ngramFn) |
| 1220 | } |
| 1221 | |
| 1222 | func (qs *queryState) handleCompareScalarFunction(ctx context.Context, arg funcArgs) error { |
| 1223 | attr := arg.q.Attr |
no test coverage detected