Commit 91a7999
feat: add multi-line pretty formatting for ALTER TABLE statements
- Format each ALTER TABLE clause on its own line when pretty: true
- Enhanced CONSTR_IDENTITY formatting with proper indentation for sequence options
- Each sequence option appears on its own line with consistent indentation
- Follows existing pretty formatting patterns used throughout the deparser
Example output:
ALTER TABLE public.table1
ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public.table1
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
)
Co-Authored-By: Dan Lynch <[email protected]>1 parent 46d33ae commit 91a7999
File tree
2 files changed
+18
-6
lines changed- packages/deparser
- __tests__/pretty/__snapshots__
- src
2 files changed
+18
-6
lines changedLines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2744 | 2744 | | |
2745 | 2745 | | |
2746 | 2746 | | |
2747 | | - | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
2748 | 2753 | | |
2749 | 2754 | | |
2750 | 2755 | | |
| |||
4689 | 4694 | | |
4690 | 4695 | | |
4691 | 4696 | | |
4692 | | - | |
4693 | | - | |
4694 | | - | |
4695 | | - | |
| 4697 | + | |
4696 | 4698 | | |
4697 | 4699 | | |
4698 | 4700 | | |
| |||
0 commit comments