hezarfen_backend
Clone
https://git.tahinli.com/archive/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | //! The photo of a pool question — one optional image row per question, the |
| 2 | //! single-slot spelling of [`crate::domain::question_image`]'s child-table |
| 3 | //! shape. The row carries metadata only; the bytes live on disk under |
| 4 | //! [`crate::config::Config::files_path`] in a file named by `file` — a fresh |
| 5 | //! server-generated id per upload, so a replace never overwrites bytes in |
| 6 | //! place. The question row itself carries no image columns; the child row is |
| 7 | //! the whole photo. The writes ride the parent's own transactions in |
| 8 | //! [`crate::db::pool_question`] (pending-only, like every content write); |
| 9 | //! the reads live in [`crate::db::pool_question_image`]; the web layer owns |
| 10 | //! the blob I/O and its ordering (new blob before row, row before old blob). |
| 11 | |
| 12 | use crateFileContentType; |
| 13 | use cratePoolQuestionId; |
| 14 | |
| 15 | /// One question's photo row. `question` is the primary key — one image per |
| 16 | /// question by construction, and a replace is a plain upsert. |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 |