Marco Yuen avatar Marco Yuen committed e68110b

Experimenting with different libs for the database.

Comments (0)

Files changed (4)

                  [lein-midje "1.0.10"]]
   :dependencies [[org.clojure/clojure     "1.3.0"]
                  [org.clojure/tools.trace "0.7.3"]
-                 [org.clojure/java.jdbc   "0.2.1"]
                  [org.xerial/sqlite-jdbc  "3.7.2"]
                  [compojure               "1.1.0"]
                  [hiccup                  "1.0.0"]
                  [ring-json-response      "0.2.0"]
-                 [useful                  "0.8.3-alpha2"]]
+                 [useful                  "0.8.3-alpha2"]
+                 [korma                   "0.3.0-beta10"]
+                 [lobos                   "1.0.0-SNAPSHOT"]]
   :dev-dependencies [[clojure-source "1.3.0"]
                      [midje          "1.4.0"]
                      [ring-serve     "0.1.2"]


+(ns lobos.config
+  (:use lobos.connectivity
+        [korma.db :only [sqlite3 mysql]]))
+(def gtfsdb (sqlite3 {:db "gtfs.db"}))
+(open-global gtfsdb)


+(ns lobos.migrations
+  (:refer-clojure :exclude [alter drop
+                            bigint boolean char double float time])
+  (:use (lobos connectivity core schema config
+               [migration :only [defmigration]])))
+(defmigration add-stops-table
+  (up [] (create
+          (table :stops
+                 (integer :stop_id)
+                 (varchar :stop_name 192))))
+  (down [] (drop (table :stops))))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.