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 `parent_link` table: the composite-PK upsert, the existence probe, |
| 2 | //! the per-parent listing, and the delete. The *decisions* over these rows |
| 3 | //! — who may be tied, and which reads a live link grants — live in |
| 4 | //! [`crate::service::parent_link`]. |
| 5 | |
| 6 | use crateDatabase; |
| 7 | use crateParentLink; |
| 8 | use crateUserId; |
| 9 | use crateAppError; |
| 10 | use query_as; |
| 11 | |
| 12 | pub async |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | /// True iff a link row exists for the (parent, student) pair — the storage |
| 37 | /// half of the grant. The live half (the student side still holding the |
| 38 | /// role) is [`crate::service::parent_link::links_live`]. |
| 39 | pub async |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | /// Every student `parent` observes. The composite key's text form ordered |
| 51 | /// the old listing, which for one parent means the student ids — the same |
| 52 | /// order on the natural key. |
| 53 | pub async |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | pub async |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 |