Commits

Shantanu Kumar committed 4b2f69c

tests for SQL Visitor feature

  • Participants
  • Parent commits 8242958

Comments (0)

Files changed (1)

File src/main/clj/org/bituf/clj_liquibase/sql_visitor.clj

 (defn make-visitors
   "Return a list of visitors from a DSL-like fluent list of arguments.
   Example:
-    (make-visitors :asitis  (map (partial for-dbms! :mysql)
+    (make-visitors :include (map (partial for-dbms! :mysql)
                                  (make-visitors :append \"engine=InnoDB\"))
                    :append  \" -- creating table\n\"
                    :replace [:integer :bigint]
   (let [pairs (partition 2 (into [k v] args))
         makev (fn [k v]
                 (case k
-                  :asitis  (mu/as-vector v)
+                  :include (mu/as-vector v)
                   :append  [(make-append-visitor  v)]
                   :prepend [(make-prepend-visitor v)]
                   :replace (if (map? v)
                                  'v "list of 2 arguments (needle, new-text)"
                                  v)))
                   (mu/illegal-argval
-                    'k ":append/:prepend/:replace" k)))]
+                    'k ":include/:append/:prepend/:replace" k)))]
     (into [] (reduce concat (map (fn [[k v]] (makev k v)) pairs)))))