Created
March 14, 2018 17:50
-
-
Save noprompt/ba6169d1aeb6e12eb96861f980e6e9b0 to your computer and use it in GitHub Desktop.
Write all public documentation for the ns named ns-sym to *out*.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datomic.client.api | |
Synchronous client library for interacting with Datomic. | |
This namespace is a wrapper for datomic.client.api.async. | |
Functions in this namespace that communicate with a separate | |
process take an arg-map with the following optional keys: | |
:timeout Timeout in msec. | |
Functions that support offset and limit take the following | |
additional optional keys: | |
:offset Number of results to omit from the beginning | |
of the returned data. | |
:limit Maximum total number of results to return. | |
Specify -1 for no limit. Defaults to -1 for q | |
and to 1000 for all other APIs. | |
Functions that return datoms return values of a type that supports | |
indexed (count/nth) access of [e a v t added] as well as | |
lookup (keyword) access via :e :a :v :t :added. | |
All errors are reported via ex-info exceptions, with map contents | |
as specified by cognitect.anomalies. | |
See https://github.com/cognitect-labs/anomalies. | |
------------------------------------------------------------------------ | |
delete-database | |
Deletes a database specified by arg-map with keys: | |
:db-name The database name. | |
Returns true. See namespace doc for error and timeout handling. | |
------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn ns-doc | |
"Write all public documentation for the ns named ns-sym to *out*." | |
[ns-sym] | |
(let [ns (the-ns ns-sym)] | |
(println ns-sym) | |
(println) | |
(when-some [docstring (:doc (meta ns))] | |
(println docstring) | |
(println)) | |
(println "------------------------------------------------------------------------") | |
(println) | |
(run! | |
(fn [[sym var]] | |
(println sym) | |
(println) | |
(if-some [docstring (:doc (meta var))] | |
(println docstring) | |
(println "Undocumented")) | |
(println) | |
(println "------------------------------------------------------------------------") | |
(println)) | |
(ns-publics ns)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment