                        xdmp:document-delete('/content-factory/new-doc');"
                       {:shape :single}))))
 
-;; TODO insert as-is strings
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;; TODO security options

                                    {:variables {"my-variable" {:value false
                                                                :type :boolean-node}}
                                     :shape :single!}))))
      (is (true? (with-open [session (create-session db)]
                   (execute-xquery session "xquery version \"1.0-ml\";
                                declare variable $my-variable as boolean-node() external;
                                $my-variable"
                                   {:variables {"my-variable" {:value true
                                                               :type :boolean-node}}
                                    :shape :single!})))))))

;; TODO more variable testing
;; TODO test (all?) variable types


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

                                    :shape :single!})))))

    (testing "...variables passed `as-is?` must be passed untouched to MarkLogic"
      (testing "...with shorthand variable format"
               (is (= "test string" (with-open [session (create-session db)]
                                      (execute-xquery session "xquery version \"1.0-ml\";
                                                      declare variable $my-variable external;
                                                      $my-variable"
                                                      {:variables {"my-variable" "test string"}
                                                       :shape :single!
                                                       :as-is? :true})))))

      (testing "...with value-declared variable format"
        (is (= "test string" (with-open [session (create-session db)]
                               (execute-xquery session "xquery version \"1.0-ml\";
                                                      declare variable $my-variable external;
                                                      $my-variable"
                                               {:variables {"my-variable" {:value "test string"}}
                                                :shape :single!
                                                :as-is? :true}))))))

    (testing "...Clojure booleans must convert as instructed to XDM/XS boolean types"
      (is (= "xs:boolean"
             (with-open [session (create-session db)]
               (result->type (execute-xquery session "xquery version \"1.0-ml\";
                                                      declare variable $my-variable external;
                                                      $my-variable"
                                             {:types :raw
                                              :variables {"my-variable" {:value false
                                                                         :type :xs-boolean}}})))))
      (is (= "boolean-node()" (result->type
                               (with-open [session (create-session db)]
                                 (execute-xquery session "xquery version \"1.0-ml\";
