Episode
Constants
EF_SEARCH = 200
pgvector hnsw.ef_search for the recs kNN. 200 gives ~near-exact recall@20 on the current corpus; pinned by scripts/verify-recs-hnsw.sh. Code literal (SET LOCAL takes no bind params) — not user input.
Constructors
Class methods
for_feed(feed_id : Int64, limit : Int32 = 50, offset : Int32 = 0, order : String = "desc") : Array(Episode)
Sourcefor_inbox_semantic(user_id : Int64, query_vec : Array(Float64), limit : Int32 = 100, offset : Int32 = 0) : Array(Episode)
Sourceupsert(feed_id : Int64, guid : String, title : String, description : String | Nil, audio_url : String, duration_sec : Int32 | Nil, published_at : Time | Nil, image_url : String | Nil = nil) : UpsertResult | Nil
Insert-or-update an episode. Returns nil only if neither path runs
(current SQL guarantees a row either way; the nil branch is for safety
against future schema/constraint changes). The was_inserted flag uses
the standard Postgres trick: xmax is 0 on a fresh INSERT and set to
the deleter's xid on an UPDATE-from-conflict.
Instance methods
audio_url
Sourcedescription
Sourceduration_display
Sourceduration_sec
Sourcefeed_id
Sourceguid
Sourceid
Sourceimage_url
Sourcepublished_at
Sourcetitle
Source