Andy wrote: > > On Thursday, October 03, 2013 08:55:03 PM Claude Warren wrote: > >> I find a test called testUnnecessaryMatches() that verifies that when the > >> graph.find() method is called it does not call node_URI.matches() > >> > >> patterns checked are (Node_URI, ANY, ANY ) > >> patterns checked are (ANY, Node_URI, ANY ) > >> patterns checked are (ANY, ANY, Node_URI ) > >> > >> My question is: > >> > >> Is this a general restriction (i.e. all graph implementations should meet > >> this) or specific to the memory graph? > > > > I'm pretty sure that it's specific to GraphMem and that's it's checking > > that Mem does the work itself rather than relying on GraphBase. > > > > [If it had been graph-implementation-agnostic I'd have put it in the > > > > test-any-graph tests. I hope. If my memory serves.] > > > > Chris > > Chris - how much of match* (Node and Triple) was for QueryHandler ? or > is specific to GraphMem?
Oh, good point -- it's there for the QueryHandler stuff, which GraphMem knew about and optimised the general case. Well, maybe it optimised, there wasn't any actual testing done there. > If it's just for GraphMem now, one option is to move the code to a class > of function in chhj.mem as "boolean matches(Node, Node)" etc and gently > make Node / Triple have a smaller interface. If it's not used elsewjere -- which seems likely -- yes, that's a good idea. Good catch. Chris
