| 1307 | } |
| 1308 | |
| 1309 | func (e *ExtImpl) ShouldQuery(inputs []ast.Constant, filters []ast.BaseTerm, pushdown []ast.Term) bool { |
| 1310 | if inputs[0].Equals(ast.Number(1)) { |
| 1311 | e.called1++ |
| 1312 | return true |
| 1313 | } |
| 1314 | if inputs[0].Equals(ast.Number(2)) { |
| 1315 | e.called2++ |
| 1316 | e.pushdown = pushdown |
| 1317 | } |
| 1318 | if inputs[0].Equals(ast.Number(3)) { |
| 1319 | e.called3++ |
| 1320 | e.filters = filters |
| 1321 | return true |
| 1322 | } |
| 1323 | return false |
| 1324 | } |
| 1325 | |
| 1326 | func (e *ExtImpl) ExecuteQuery(inputs []ast.Constant, filters []ast.BaseTerm, pushdown []ast.Term, |
| 1327 | cb func(output []ast.BaseTerm)) error { |