我想知道使用以下示例将级联陷阱归结到多远。
(defn -main
"Good ole main boilerplate"
[people-path trap-path output-path]
(?- (hfs-textline output-path)
(people-query (hfs-textline trap-path)
(hfs-textline people-path))))
(defn people-query
"The people query!"
[trap-path people-path]
(<- [?first-name ?last-name ?daily-visits]
(:trap trap)
(some-generic-parsing-to-tuple-fn people-path :> ?fname ?lname)
(c/count ?daily-visits)))
如果some-generic-parsing-to-tuple-fn
在人员查询的范围内调用(其中包含(:trap trap)
子查询是否也可以访问该陷阱,或者是否some-generic-parsing-to-tuple-fn
还应该包含陷阱信息,即
(some-generic-parsing-to-tuple-fn trap-path people-path :> ?fname ?lname)
TL;DR 我需要在 Cascalog 查询中传递多少陷阱才能允许嵌套查询访问陷阱