Liking cljdoc? Tell your friends :D

puppetlabs.puppetdb.query-eng.parse

AST parsing

AST parsing
raw docstring

field-rxclj

Syntax of an unquoted field component, e.g. the second component of foo.bar.baz. Includes all characters up to the next dot, or the end of the field. Taken in conjunction with the current quoted field syntax, there is no way to represent a field component that contains a dot and ends in a backslash, e.g. a fact named "foo.bar" since given the dot, it has to be quoted, but quoted fields can't end in a backslash right now (cf. quoted-field-rx).

Syntax of an unquoted field component, e.g. the second component of
foo.bar.baz.  Includes all characters up to the next dot, or the end
of the field.  Taken in conjunction with the current quoted field
syntax, there is no way to represent a field component that contains
a dot and ends in a backslash, e.g. a fact named "foo.bar\" since
given the dot, it has to be quoted, but quoted fields can't end in a
backslash right now (cf. quoted-field-rx).
sourceraw docstring

match-rxclj

Syntax of a match(regex) field component, e.g. the second component of foo.match("bar?").baz. It must begin with match, open paren, double quote, and ends at the next double-quote, close-paren that is not preceded by a backslash and is followed by either a dot, or the end of the field. The regex then, has essentially the same syntax as a double quoted field. And similarly, there is currently not way to specify a match regular expression that ends in a backslash.

Syntax of a match(regex) field component, e.g. the second component
of foo.match("bar?").baz.  It must begin with match, open paren,
double quote, and ends at the next double-quote, close-paren that is
not preceded by a backslash and is followed by either a dot, or the
end of the field.  The regex then, has essentially the same syntax
as a double quoted field.  And similarly, there is currently not way
to specify a match regular expression that ends in a backslash.
sourceraw docstring

parse-fieldclj

(parse-field s)
(parse-field s offset opts)

Parses an AST field like "certname", "facts.partition[3]" and returns a vector of the field components as maps. The first component will always be a ::named-field-part.

Parses an AST field like "certname", "facts.partition[3]" and
returns a vector of the field components as maps.  The first
component will always be a ::named-field-part.
sourceraw docstring

path-names->field-strclj

(path-names->field-str names)

Returns a properly quoted AST field string (dotted path) for the given names (only handles names, not ::indexed-field-part or ::match-field-part expressions). Throws an exception if any name cannot be quoted, since AST's current quoting syntax is incomplete (e.g. cannot represent a name that contains a dot and ends in backslash.

Returns a properly quoted AST field string (dotted path) for the
given names (only handles names, not ::indexed-field-part
or ::match-field-part expressions).  Throws an exception if any name
cannot be quoted, since AST's current quoting syntax is
incomplete (e.g. cannot represent a name that contains a dot and
ends in backslash.
sourceraw docstring

quoted-field-rxclj

Syntax of a quoted field component, e.g. the second component of foo."bar".baz. It must begin with a double quote, and ends at the next double quote that is not preceded by a backslash and is followed by either a dot, or the end of the field. There is currently no way to represent a field component that contains a dot and ends in a backslash, e.g. a fact named "foo.bar". It has to be quoted, given the dot, but as just mentioned, quoted fields can't end in a backslash.

Syntax of a quoted field component, e.g. the second component of
foo."bar".baz.  It must begin with a double quote, and ends at the
next double quote that is not preceded by a backslash and is
followed by either a dot, or the end of the field.  There is
currently no way to represent a field component that contains a dot
and ends in a backslash, e.g. a fact named "foo.bar\".  It has to
be quoted, given the dot, but as just mentioned, quoted fields can't
end in a backslash.
sourceraw docstring

top-field-rxclj

Syntax of the first component of a field path, e.g. "facts" for facts.os.

Syntax of the first component of a field path, e.g. "facts" for
facts.os.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close