Use new hanami db classes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class AutoTaggings < ROM::Relation[:sql]
|
||||
class AutoTaggings < Adamantium::DB::Relation
|
||||
schema :auto_taggings, infer: true do
|
||||
associations do
|
||||
belongs_to :tag
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Highlights < ROM::Relation[:sql]
|
||||
class Highlights < Adamantium::DB::Relation
|
||||
schema :highlights, infer: true do
|
||||
associations do
|
||||
belongs_to :post
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class LoginTokens < ROM::Relation[:sql]
|
||||
class LoginTokens < Adamantium::DB::Relation
|
||||
schema :login_tokens, infer: true
|
||||
|
||||
auto_struct(true)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Movies < ROM::Relation[:sql]
|
||||
class Movies < Adamantium::DB::Relation
|
||||
schema :movies, infer: true
|
||||
|
||||
auto_struct(true)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Pages < ROM::Relation[:sql]
|
||||
class Pages < Adamantium::DB::Relation
|
||||
schema :pages, infer: true
|
||||
|
||||
auto_struct(true)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class PodcastScrobbles < ROM::Relation[:sql]
|
||||
class PodcastScrobbles < Adamantium::DB::Relation
|
||||
schema :podcast_scrobbles, infer: true
|
||||
|
||||
auto_struct(true)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Podcasts < ROM::Relation[:sql]
|
||||
class Podcasts < Adamantium::DB::Relation
|
||||
schema :podcasts, infer: true
|
||||
|
||||
auto_struct(true)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class PostTags < ROM::Relation[:sql]
|
||||
class PostTags < Adamantium::DB::Relation
|
||||
schema :post_tags, infer: true do
|
||||
associations do
|
||||
belongs_to :post
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class PostTrips < ROM::Relation[:sql]
|
||||
class PostTrips < Adamantium::DB::Relation
|
||||
schema :post_trips, infer: true do
|
||||
associations do
|
||||
belongs_to :post
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Posts < ROM::Relation[:sql]
|
||||
class Posts < Adamantium::DB::Relation
|
||||
schema :posts, infer: true do
|
||||
associations do
|
||||
has_many :post_tags
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Reactions < ROM::Relation[:sql]
|
||||
class Reactions < Adamantium::DB::Relation
|
||||
schema :reactions, infer: true do
|
||||
associations do
|
||||
belongs_to :post
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Tags < ROM::Relation[:sql]
|
||||
class Tags < Adamantium::DB::Relation
|
||||
schema :tags, infer: true do
|
||||
associations do
|
||||
has_many :post_tags
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class TopTracks < ROM::Relation[:sql]
|
||||
class TopTracks < Adamantium::DB::Relation
|
||||
schema :top_tracks, infer: true
|
||||
|
||||
auto_struct(true)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Trips < ROM::Relation[:sql]
|
||||
class Trips < Adamantium::DB::Relation
|
||||
schema :trips, infer: true do
|
||||
associations do
|
||||
has_many :post_trips
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Users < ROM::Relation[:sql]
|
||||
class Users < Adamantium::DB::Relation
|
||||
schema :users, infer: true
|
||||
|
||||
auto_struct(true)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Webmentions < ROM::Relation[:sql]
|
||||
class Webmentions < Adamantium::DB::Relation
|
||||
schema :webmentions, infer: true do
|
||||
associations do
|
||||
belongs_to :post
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
module Adamantium
|
||||
module Relations
|
||||
class Workouts < ROM::Relation[:sql]
|
||||
class Workouts < Adamantium::DB::Relation
|
||||
schema :workouts, infer: true
|
||||
|
||||
auto_struct(true)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
module Adamantium
|
||||
module Repos
|
||||
class PageRepo < Adamantium::Repo[:pages]
|
||||
class PageRepo < Adamantium::DB::Repo[:pages]
|
||||
def fetch!(slug:)
|
||||
pages
|
||||
.published
|
||||
|
@@ -1,6 +1,6 @@
|
||||
module Adamantium
|
||||
module Repos
|
||||
class PodcastScrobbleRepo < Adamantium::Repo[:podcast_scrobbles]
|
||||
class PodcastScrobbleRepo < Adamantium::DB::Repo[:podcast_scrobbles]
|
||||
commands :create
|
||||
|
||||
def exists?(id:)
|
||||
|
@@ -2,7 +2,7 @@ require "time_math"
|
||||
|
||||
module Adamantium
|
||||
module Repos
|
||||
class PostRepo < Adamantium::Repo[:posts]
|
||||
class PostRepo < Adamantium::DB::Repo[:posts]
|
||||
def recent(limit:)
|
||||
date = Time.now
|
||||
|
||||
|
Reference in New Issue
Block a user