Skip to content

Instantly share code, notes, and snippets.

@noprompt
Created March 14, 2018 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noprompt/ba6169d1aeb6e12eb96861f980e6e9b0 to your computer and use it in GitHub Desktop.
Save noprompt/ba6169d1aeb6e12eb96861f980e6e9b0 to your computer and use it in GitHub Desktop.
Write all public documentation for the ns named ns-sym to *out*.
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.
------------------------------------------------------------------------
(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