(encode-factpath-element element)Inputs: [element :- fact-path-element] Returns: s/Str
Converts a fact-path-element to an encoded string ready for database storage.
Inputs: [element :- fact-path-element] Returns: s/Str Converts a fact-path-element to an encoded string ready for database storage.
(escape-delimiter element)Inputs: [element :- s/Str] Returns: s/Str
Escape the delimiter from a string
Inputs: [element :- s/Str] Returns: s/Str Escape the delimiter from a string
(factpath-regexp-elements-to-regexp rearray)Inputs: [rearray :- fact-path] Returns: fact-path
Converts a field found in a factpath regexp to its equivalent regexp.
Inputs: [rearray :- fact-path] Returns: fact-path Converts a field found in a factpath regexp to its equivalent regexp.
(factpath-regexp-to-regexp rearray)Inputs: [rearray :- fact-path] Returns: s/Str
Converts a regexp array to a single regexp for querying against the database.
Returns a string that contains a formatted regexp.
Inputs: [rearray :- fact-path] Returns: s/Str Converts a regexp array to a single regexp for querying against the database. Returns a string that contains a formatted regexp.
(factpath-to-string factpath)Inputs: [factpath :- fact-path] Returns: s/Str
Converts a fact-path to an encoded string ready for database storage.
Inputs: [factpath :- fact-path] Returns: s/Str Converts a `fact-path` to an encoded string ready for database storage.
(facts->pathmaps facts)Inputs: [facts :- fact-set-schema] Returns: [pathmap-schema]
Returns [path valuemap] pairs for all facts. i.e. (["foo#~bar" vm] ...)
Inputs: [facts :- fact-set-schema] Returns: [pathmap-schema] Returns [path valuemap] pairs for all facts. i.e. (["foo#~bar" vm] ...)
(flatten-facts-with leaf-fn facts)(flatten-facts-with leaf-fn data mem path)Returns a collection of (leaf-fn path leaf) for all of the paths represented by facts.
Returns a collection of (leaf-fn path leaf) for all of the paths represented by facts.
(maybe-num-string? k)Return true if first character of string is a digit.
Return true if first character of string is a digit.
(normalize-facts version received facts-payload)Converts facts from the wire to the canonical form accepted by the facts schema
Converts facts from the wire to the canonical form accepted by the facts schema
(path->pathmap path leaf)Inputs: [path :- fact-path leaf] Returns: pathmap-schema
Inputs: [path :- fact-path leaf] Returns: pathmap-schema
(quote-integer-strings string)Inputs: [string :- s/Str] Returns: s/Str
Surround a string with quotes if it looks like a number.
Inputs: [string :- s/Str] Returns: s/Str Surround a string with quotes if it looks like a number.
(str->num s)Attempt to coerce a string to a number, otherwise return nil.
Attempt to coerce a string to a number, otherwise return nil.
(string-to-factpath s)Inputs: [s :- s/Str] Returns: fact-path
Converts a database encoded string back to a factpath.
Inputs: [s :- s/Str] Returns: fact-path Converts a database encoded string back to a factpath.
(unencode-path-segment s)Attempt to coerce string to number, otherwise unescape.
Attempt to coerce string to number, otherwise unescape.
(unescape-delimiter element)Inputs: [element :- s/Str] Returns: s/Str
Un-escape the delimiter from a string
Inputs: [element :- s/Str] Returns: s/Str Un-escape the delimiter from a string
(unstringify-value type value)Inputs: [type :- s/Str value :- (s/maybe s/Str)]
Converts a stringified value from the database into its real value and type.
Accepts either a string or a nil as input values.
Inputs: [type :- s/Str value :- (s/maybe s/Str)] Converts a stringified value from the database into its real value and type. Accepts either a string or a nil as input values.
(value-type-id data)Inputs: [data :- s/Any] Returns: s/Int
Given a piece of standard hierarchical data, returns the type as an id.
Inputs: [data :- s/Any] Returns: s/Int Given a piece of standard hierarchical data, returns the type as an id.
(wire-v2->wire-v5 facts received-time)Takes a v2 formatted replace facts command and upgrades it to a v5 facts command
Takes a v2 formatted replace facts command and upgrades it to a v5 facts command
(wire-v3->wire-v5 facts)Takes a v3 formatted replace facts command and upgrades it to a v5 facts command
Takes a v3 formatted replace facts command and upgrades it to a v5 facts command
(wire-v4->wire-v5 facts)Takes a v4 formatted replace facts command and upgrades it to a v5 facts command
Takes a v4 formatted replace facts command and upgrades it to a v5 facts command
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |