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 question-image workflows: the doors the web layer takes for every |
| 2 | //! question/choice image read and write. The blob I/O and its disk ordering |
| 3 | //! stay in the web layer; the row transactions (behind the question-freeze |
| 4 | //! gate) live in [`crate::db::question_image`]. |
| 5 | |
| 6 | use crateDatabase; |
| 7 | use cratedb; |
| 8 | use crateExamId; |
| 9 | use crate; |
| 10 | use crateQuestionImage; |
| 11 | use crateAppError; |
| 12 | |
| 13 | /// Create or replace the slot's image row, handing back what it stored plus |
| 14 | /// the blob name it replaced, for the caller to take off disk. |
| 15 | pub async |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | /// The slot's image row, if any (`slot = None` is the question's |
| 23 | /// illustration). |
| 24 | pub async |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | /// Every image of the exam's questions — one query for the list views. |
| 33 | pub async |
| 34 | |
| 35 | |
| 36 | |
| 37 | /// Every image of one question — the illustration plus its option pictures. |
| 38 | pub async |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | /// Drop the option pictures whose choice is gone, returning the removed rows |
| 46 | /// so the caller can take their blobs off disk. |
| 47 | pub async |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | /// Drop one image row — the returned row names the blob to unlink. |
| 56 | pub async |
| 57 | |
| 58 |