You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the `ConvertsTo*()` methods on `FuncType` with `ConvertsTo()` on
`FuncExprArg`. This allows more-direct conversion-checking without
separately fetching the type.
Remove the `FuncLiteral` and `FuncSingularQuery` variants of `FuncType`.
Implementations of `ConvertsTo()` now properly distinguishes between
singular and non-singular queries, and the Literal type provided no
value over `ValueType`. This restores `FuncLiteral` to just the three
variants defined by [RFC 9535 Section 2.4.1]: `ValueType`, `NodesType`,
and `LogicalType`.
Improve the docs for `ValueFrom()`, `NodesFrom()`, and `LogicalFrom()`
to document whether and how each type is converted, and describe how to
avoid panics for invalid conversion by checking `ConvertsTo()` in the
function extension validator. Also improve the text of the `panic()`
messages, and remove the handling of boolean values from
`LogicalFrom()`, as `Logical()` handles that behavior.
Remove `NodesQueryExpr`, a thin wrapper around `PathQuery`, by simply
implementing the `FuncExprArg` interface on Query.
Move the `Function` struct to `spec` and name it `FuncExtension`. Have
the registry construct it via the `Extension()` constructor, which
tightens things up quite a bit. Also move the `Validator` and
`Evaluator` aliases to `spec` and use them consistently. Remove the
`PathFunction` interface, as it's no longer needed; we instead use
`FuncExtension` directly. More consistently refer to them as "function
extensions" in the docs, to patch the phrase of the spec.
Rename `JSONPathValue` to `PathValue`, as the `JSON` prefix feels
redundant.
[RFC 9535 Section 2.4.1]: https://www.rfc-editor.org/rfc/rfc9535#name-type-system-for-function-ex
0 commit comments