Created
November 2, 2011 20:13
-
-
Save boxxxie/1334752 to your computer and use it in GitHub Desktop.
always returns :false-false no matter if the DBs exist or not (:false-false is when they both don't exist)
This file contains hidden or 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
| (defmulti statsTransform | |
| (fn [fromDB toDB] | |
| (let [dbs (db/all-databases) | |
| fromDB? (some #(= % fromDB) dbs) | |
| toDB? (some #(= % toDB) dbs)] | |
| (swank.core/break) | |
| [fromDB? toDB?]))) | |
| (defmethod statsTransform [true true] [from to] :rect-shape) | |
| (defmethod statsTransform [true false] [from to] | |
| (create-transformation-db to)) | |
| (defmethod statsTransform [false false] [from to] :false-false) | |
| (defmethod statsTransform [false true] [from to] :shape-rect) | |
| (defn -statsTransform [fromDB toDB] | |
| (statsTransform fromDB toDB)) | |
| (-statsTransform "media_stats" "t_media_stats") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment