I am trying to run some experiments using queries in order to workout some application logic. I am in ‘dual mode’, you know chatscript.exe. I am not in server mode or client mode.
Now, I have some facts that get created by tables. Here they are:
> :facts requiredby
216383: ( manywho-goalid requiredby repeating-manywho-goalid x100000 )
216382: ( manywho-code-goalid requiredby repeating-manywho-goalid x100000 )
216226: ( location-goalid requiredby provider-finder-goalid x100000 )
216223: ( support-bnumber-goalid requiredby support-unlock-account-goalid x100000 )
216220: ( manywho-code-goalid requiredby manywho-goalid x100000 )
using ^writefact and using ToSet parm for ^query kind of works. It only gives you the first fact in the set. How would I get the rest of them?
: > :do ^writefact( ^query( direct_v ? requiredby ? 2 ? @5fact) )
CHARLIE: ( manywho-goalid requiredby repeating-manywho-goalid x100000 )
I do not seem to be able to manually run a query to get a fact collection and look at the results.
I thought I would use :fact @10 to show the fact set. Now facts do not stay between volleys so you can’t just do @10 = ^query() and then do :facts@10. But I thought ^save(@10) would do it. It does not.
This does not work.
: > :do ^save(@10 true)
CHARLIE:
: > :do @10 = ^query( direct_v ? requiredby ? )
CHARLIE:
: > :facts @10
Fact set @10: 0 facts
Using ^writeFact() does not work
> :do ^writefact( ^first( ^query(direct_v ? requiredby ?) ) )
CHARLIE:
Is there any way to try these things without having to put it into a rule and recompile the bot?
I was hoping it would be a bit like :testPattern and :testtopic, where you can try things out on the system without having to rebuild.