(extend-protocol-default protocol types validation-fsig & fsigs)Perform extend-protocol on protocol and types, expanding it on each
type as so:
(extend-protocol protocol type (validation-f args false) (other-fn args (throw ex-info err-msg {})) ...)
Perform `extend-protocol` on `protocol` and `types`, expanding it on each
type as so:
(extend-protocol protocol
type
(validation-f args false)
(other-fn args (throw ex-info err-msg {}))
...)(extend-xsd-literal t
iri-suffix
&
{:keys [force-iri? strval-fn] :or {strval-fn str}})Macro that expands into a basic extend-type over the Literal protocol.
If force-iri? is true, then the resulting literal always has the XSD
datatype IRI appended; strval-fn overrides the default call to str.
Without any kwargs, (extend-xsd-literal t iri-suffix) expands into:
(extend-type t p/Literal
(-valid-literal?
[_] true)
(-format-literal
([n] (p/-format-literal n {}))
([n opts] (fmt-impl/format-literal n opts)))
(-format-literal-strval
[n] (str n))
(-format-literal-lang-tag
[n] nil)
(-format-literal-url
([n] (p/-format-literal-url n {}))
([n opts] (fmt-impl/format-xsd-iri iri-suffix opts))))
Macro that expands into a basic `extend-type` over the Literal protocol.
If `force-iri?` is true, then the resulting literal always has the XSD
datatype IRI appended; `strval-fn` overrides the default call to `str`.
Without any kwargs, `(extend-xsd-literal t iri-suffix)` expands into:
```
(extend-type t p/Literal
(-valid-literal?
[_] true)
(-format-literal
([n] (p/-format-literal n {}))
([n opts] (fmt-impl/format-literal n opts)))
(-format-literal-strval
[n] (str n))
(-format-literal-lang-tag
[n] nil)
(-format-literal-url
([n] (p/-format-literal-url n {}))
([n opts] (fmt-impl/format-xsd-iri iri-suffix opts))))
```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 |