Commit de78282
committed
feat(sql-orm-client): extend junction link-write gate to cover connect
Renames the `CreateDisabled` flag on `RelationMutator` to
`LinkWritesDisabled` and applies the same `never`-arg guard to both
`create` and `connect` overloads. `disconnect` is unaffected (it issues
a DELETE, not an INSERT, so no payload column is needed).
`HasRequiredJunctionPayload` is already threaded as the flag via
`RelationMutationCallback` — no change required there. The runtime
guard in `mutation-executor.ts` already blocks both operations; the
type system now matches.
Test file renamed to `junction-link-write-disable.test-d.ts`; the
former "connect remains available" positive test is replaced with a
`@ts-expect-error` assertion, and a new pure-positive disconnect test
preserves coverage of the allowed path.
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>1 parent 8baf866 commit de78282
2 files changed
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1003 | 1003 | | |
1004 | 1004 | | |
1005 | 1005 | | |
1006 | | - | |
| 1006 | + | |
1007 | 1007 | | |
1008 | 1008 | | |
1009 | | - | |
| 1009 | + | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | | - | |
| 1012 | + | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | | - | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1018 | 1020 | | |
1019 | 1021 | | |
1020 | | - | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
1021 | 1025 | | |
1022 | 1026 | | |
1023 | 1027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
0 commit comments