This namespace deals with all Cascalog variable transformations.
This namespace deals with all Cascalog variable transformations.
(cascalog-var? obj)
A predicate on 'obj' to check is it a cascalog variable.
A predicate on 'obj' to check is it a cascalog variable.
Returns true if every supplied var is a ground variable, false otherwise.
Returns true if every supplied var is a ground variable, false otherwise.
Returns a unique non-nullable var with a optional suffix.
Returns a unique non-nullable var with a optional suffix.
(gen-non-nullable-vars amt)
Generates the given number, 'amt', of non-nullable variables in a sequence.
Example: (let [var-seq (gen-non-nullable-vars n)] (?<- (hfs-textline out-path) var-seq (in :>> var-seq)))
Generates the given number, 'amt', of non-nullable variables in a sequence. Example: (let [var-seq (gen-non-nullable-vars n)] (?<- (hfs-textline out-path) var-seq (in :>> var-seq)))
Returns a unique nullable var with a optional suffix.
Returns a unique nullable var with a optional suffix.
(gen-nullable-vars amt)
Generates the given number, 'amt', of nullable variables in a sequence.
Example: (let [var-seq (gen-nullable-vars n)] (?<- (hfs-textline out-path) var-seq (in :>> var-seq)))
Generates the given number, 'amt', of nullable variables in a sequence. Example: (let [var-seq (gen-nullable-vars n)] (?<- (hfs-textline out-path) var-seq (in :>> var-seq)))
Returns a unique ungrounding var with an optional suffix.
Returns a unique ungrounding var with an optional suffix.
(gen-var-fn prefix)
Accepts a prefix and returns a function of no arguments that, when called, produces a unique string with the supplied prefix.
Accepts a prefix and returns a function of no arguments that, when called, produces a unique string with the supplied prefix.
Returns true of the supplied var is capable of triggering a join (prefixed by ! or ?), false otherwise.
Returns true of the supplied var is capable of triggering a join (prefixed by ! or ?), false otherwise.
Symbol prefixes reserved by Cascalog for use within predicates. Any symbol or string prefixed by one of these characters will be interpreted as a logic variable.
Symbol prefixes reserved by Cascalog for use within predicates. Any symbol or string prefixed by one of these characters will be interpreted as a logic variable.
Returns true if the supplied symbol is a Cascalog logic variable, false otherwise. & and _ are also accepted.
Returns true if the supplied symbol is a Cascalog logic variable, false otherwise. & and _ are also accepted.
(non-nullable-var? sym-or-str)
Returns true if the supplied symbol (or string) references a non-nullable logic variable (prefixed by ?), false otherwise.
Returns true if the supplied symbol (or string) references a non-nullable logic variable (prefixed by ?), false otherwise.
Returns true of the supplied symbol (or string) references a nullable logic variable (prefixed by ! or !!)
Returns true of the supplied symbol (or string) references a nullable logic variable (prefixed by ! or !!)
(prefixed-by? prefix v)
Returns true if the supplied var v
is prefixed by the supplied
prefix, false otherwise.
Returns true if the supplied var `v` is prefixed by the supplied prefix, false otherwise.
(replace-dups coll)
Accepts a sequence returns the set of replacements, plus a new
sequence with all duplicates replaced by a call to gen
.
Accepts a sequence returns the set of replacements, plus a new sequence with all duplicates replaced by a call to `gen`.
Returns true if the supplied symbol is reserved by Cascalog, false otherwise.
Returns true if the supplied symbol is reserved by Cascalog, false otherwise.
(sanitize pred)
Accepts a (potentially nested) data structure and returns a transformed, sanitized predicate generated by replacing all wildcards and logic variables with strings.
Accepts a (potentially nested) data structure and returns a transformed, sanitized predicate generated by replacing all wildcards and logic variables with strings.
(sanitize-fn anon-gen)
Returns a function that sanitizes an element by resolving logic variable names and replacing wildcards using the supplied generator.
Returns a function that sanitizes an element by resolving logic variable names and replacing wildcards using the supplied generator.
Returns true if the supplied keyword is reserved by cascalog, false otherwise.
Returns true if the supplied keyword is reserved by cascalog, false otherwise.
Keywords that have special meaning within Cascalog's predicates.
Keywords that have special meaning within Cascalog's predicates.
(unground-var? sym-or-str)
Returns true if the supplied symbol (or string) references an ungrounding logic variable (prefixed by !!), false otherwise.
Returns true if the supplied symbol (or string) references an ungrounding logic variable (prefixed by !!), false otherwise.
(uniquify-var v)
Appends a unique suffix to the supplied input.
Appends a unique suffix to the supplied input.
Wildcard strings reserved by Cascalog.
Wildcard strings reserved by Cascalog.
(with-logic-vars to-search & body)
Binds all logic variables within the to-search
of with-logic-vars
to
their string equivalents, allowing the user to write bare symbols within the body.
For example:
(with-logic-vars [?a ?b :see] (str ?a ?b :see)) ;=> "?a?b:see"
Binds all logic variables within the `to-search` of `with-logic-vars` to their string equivalents, allowing the user to write bare symbols within the body. For example: (with-logic-vars [?a ?b :see] (str ?a ?b :see)) ;=> "?a?b:see"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close