   https://docs.marklogic.com/javadoc/xcc/com/marklogic/xcc/Session.html
   for valid options. (Note that request options are distinct from
   session options, though *default* request options can be set for the
-  session.)"
+  session.)
+
+  If optional `content-source` is passed, the Session is created from
+  the given ContentSource rather than creating one from the database info URI."
   ([db-info]
    (create-session* db-info))
   ([db-info {:keys [default-request-options logger user-object
                     transaction-mode transaction-timeout]}]
-   (let [session (create-session* db-info)]
+   (create-session db-info
+                   nil
+                   {:default-request-options default-request-options
+                    :logger logger :user-object user-object
+                    :transaction-mode transaction-mode
+                    :transaction-timeout transaction-timeout}))
+  ([db-info content-source {:keys [default-request-options logger user-object
+                                   transaction-mode transaction-timeout]}]
+   (let [session (create-session* db-info content-source)]
      (when (map? default-request-options)
        (.setDefaultRequestOptions session (request-options default-request-options)))
      (when (instance? Logger logger)

            [clojure.data.xml :as xml]
            [slingshot.slingshot :as sling])
  (:import [java.util.logging Logger]
           [com.marklogic.xcc
            Session$TransactionMode
            RequestOptions
            ContentCreateOptions ContentPermission ContentCapability
            ContentSourceFactory ContentFactory
            DocumentFormat DocumentRepairLevel
            ValueFactory]
           [com.marklogic.xcc.types ValueType]
           [com.marklogic.xcc Version]
           java.net.URI))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Enumerations and classes.

           (seq content-base)) (.newSession cs user password content-base))))

(defn create-session
  ;; TODO document content-source parameter
  "Create a Session for querying and transacting with. Parameter
  `db-info` describing database connection information must
  include :uri key, and may optionally include connection information
