Sfoglia il codice sorgente

fix db performance (#2890)

Dru Jensen 8 anni fa
parent
commit
98866ea2a6

BIN
frameworks/Crystal/kemalyst/kemalyst


+ 6 - 6
frameworks/Crystal/kemalyst/shard.lock

@@ -8,13 +8,13 @@ shards:
     github: dukex/expect.cr
     commit: 17c31a0f42815cd914a630852bb2ee0da6a39dc0
 
-  granite_orm:
-    github: kemalyst/granite-orm
-    version: 0.6.2
-
   kemalyst:
     github: kemalyst/kemalyst
-    version: 0.9.0
+    version: 0.9.1
+
+  kemalyst-model:
+    github: kemalyst/kemalyst-model
+    version: 0.6.2
 
   kemalyst-spec:
     github: kemalyst/kemalyst-spec
@@ -58,7 +58,7 @@ shards:
 
   slang:
     github: jeromegn/slang
-    commit: 3b657c48791d72c109fa55ce6431d3042efe2f9c
+    commit: b817c89c7e5ae39562710c0d6c7f42cee685e14f
 
   smtp:
     github: raydf/smtp.cr

+ 2 - 2
frameworks/Crystal/kemalyst/shard.yml

@@ -11,8 +11,8 @@ dependencies:
     github: kemalyst/kemalyst
     version: ~> 0.9.0
 
-  granite_orm:
-    github: kemalyst/granite-orm
+  kemalyst-model:
+    github: kemalyst/kemalyst-model
     version: ~> 0.6.0
 
   kemalyst-spec:

+ 1 - 1
frameworks/Crystal/kemalyst/src/controllers/test_controller.cr

@@ -67,7 +67,7 @@ module TestController
 
       fortunes = Fortune.all
       fortunes << fortune
-      fortunes.sort_by! { |fortune| fortune.not_nil!.message.not_nil! }
+      fortunes.sort_by! { |fortune| fortune.message.not_nil! }
 
       html render("fortune/index.slang", "main.slang")
     end

+ 2 - 2
frameworks/Crystal/kemalyst/src/models/fortune.cr

@@ -1,6 +1,6 @@
-require "granite_orm/adapter/pg"
+require "kemalyst-model/adapter/pg"
 
-class Fortune < Granite::ORM
+class Fortune < Kemalyst::Model
   adapter pg
   table_name fortune
   primary id : Int32

+ 2 - 2
frameworks/Crystal/kemalyst/src/models/world.cr

@@ -1,6 +1,6 @@
-require "granite_orm/adapter/pg"
+require "kemalyst-model/adapter/pg"
 
-class World < Granite::ORM
+class World < Kemalyst::Model
   adapter pg
   table_name world
   primary id : Int32