(data: NewFile)
| 19 | ) {} |
| 20 | |
| 21 | async create(data: NewFile): Promise<File> { |
| 22 | const [file] = await this.db |
| 23 | .insert(files) |
| 24 | .values({ |
| 25 | ...data, |
| 26 | }) |
| 27 | .returning(); |
| 28 | return file; |
| 29 | } |
| 30 | |
| 31 | async findById(id: string, options: FileQueryOptions = {}): Promise<File | null> { |
| 32 | const conditions: SQL[] = [eq(files.id, id)]; |
no test coverage detected