Commit d521264
authored
feat(typegen): add functions setof type introspection (#971)
* feat(typegen): add setof function type introspection
- Introspect the setof function fields for functions
- Restore functions as unions of args + returns
* chore: update snapshots
* chore: unify sort and dedup loops
* chore: remove duplicate sort
* chore: include view in type
* fix: isOneToOne
* fix: tests
* chore: dedup typescript typegen logic
* chore: re-use generateColumn
* fix: retrieve prorows only
* chore: refactor typegen for prorows only
* fix: only get reltype in types
* chore: reuse relationTypeByIds
* chore: reduce functions changes to minimum
* chore: only single loop for types
* chore: single sort for relationships
* chore: reduce loops
* fix: relationtype setof functions generation
* chore: fix prettier
* chore: update snapshots
* chore: fix types test
* fix: test types
* fix: include materializedView types
* test: add search_todos_by_details function
* fix: add setof from * for all relation functions
* fix(typescript): union unknown null (#995)
* fix(typescript): unknown is already nullable
Fixes: supabase/cli#4234
supabase/cli#577
* fix: also exclude any from null union1 parent 1d0dad1 commit d521264
File tree
10 files changed
+3308
-178
lines changed- src
- lib
- sql
- server/templates
- test
- db
- lib
- server
10 files changed
+3308
-178
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| |||
0 commit comments