Is there a way to return Sequel return models instead of a hash for raw sql?
class Post < Sequel::Model def self.recent db["some sql goes here"].all #would like models returned here instead end end
Hope this makes sense.
class Post < Sequel::Model def self.recent with_sql("some sql goes here").all end end
Source: https://habr.com/ru/post/1447626/More articles:How to stop list items when jumping when using inline block with drag and drop jQuery? - jqueryIs there a short way to change the DateTime to "today" but save the previous saved time? - phpfunctional link instead of function body - in a loop (with argument) - javascriptMarshalling structure containing int and int [] from C # to C ++ - c ++python / django for loop and list attributes - pythonC ++ Saving dynamic_bitset to a file - c ++Direct Access Blocking - phpHow to store neighboring nodes for Dijkstra's algorithm? - cHaskell - recursion count - haskellRuntime error executeQueryLocally - javascriptAll Articles