(db: StageDb, threadId: string)
| 257 | } |
| 258 | |
| 259 | function threadComments(db: StageDb, threadId: string): CommentRow[] { |
| 260 | return db |
| 261 | .select() |
| 262 | .from(comment) |
| 263 | .where(eq(comment.threadId, threadId)) |
| 264 | .orderBy(asc(comment.createdAt)) |
| 265 | .all(); |
| 266 | } |
| 267 | |
| 268 | function threadExists(db: StageDb, threadId: string): boolean { |
| 269 | return ( |