Browse Source

Clojure - use lowercase collection names (#3215)

Nate 7 years ago
parent
commit
ec1f18b32f

+ 3 - 3
frameworks/Clojure/luminus/hello/resources/sql/queries.sql

@@ -1,14 +1,14 @@
 --:name get-all-fortunes :? :*
 -- select all records from the fortune table
-SELECT * FROM "Fortune"
+SELECT * FROM "fortune"
 
 -- :name update-world! :! :1
 -- update an existing world record
-UPDATE "World"
+UPDATE "world"
 SET "randomnumber" = :randomnumber
 WHERE id = :id
 
 -- :name get-world :? :1
 -- get world by id
-SELECT * FROM "World"
+SELECT * FROM "world"
 WHERE id = :id

+ 4 - 4
frameworks/Clojure/macchiato/hello/src/hello/db.cljs

@@ -19,23 +19,23 @@
 
 (defstate worlds
   :start (.define @db
-                  "World"
+                  "world"
                   #js{:id           #js {:type       "Sequelize.INTEGER"
                                          :primaryKey true}
                       :randomnumber {:type "Sequelize.INTEGER"}}
                   #js {:timestamps      false
                        :freezeTableName true
-                       :tableName       "World"}))
+                       :tableName       "world"}))
 
 (defstate fortunes
   :start (.define @db
-                  "Fortune"
+                  "fortune"
                   #js {:id      #js {:type       "Sequelize.INTEGER"
                                      :primaryKey true}
                        :message {:type "Sequelize.STRING"}}
                   #js {:timestamps      false
                        :freezeTableName true
-                       :tableName       "Fortune"}))
+                       :tableName       "fortune"}))
 
 (defn all-fortunes [handler error-handler]
   (-> @fortunes