Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
c94e430
refactor: replace parentNodeTypes usage with DeparserContext.spawn() …
devin-ai-integration[bot] Jun 26, 2025
3a60f85
refactor: update visit method to spawn context for every node type
devin-ai-integration[bot] Jun 26, 2025
58adbe0
fix: update RenameStmt to pass objtype when spawning AlterTypeStmt co…
devin-ai-integration[bot] Jun 26, 2025
0955753
refactor: group AlterTypeStmt and objtype conditions in RangeVar for …
devin-ai-integration[bot] Jun 26, 2025
268f751
fix: update formatWindowFrame and deparseOperatorName to accept conte…
devin-ai-integration[bot] Jun 26, 2025
975d595
refactor: remove automatic context spawning from visit() method
devin-ai-integration[bot] Jun 26, 2025
5b89033
refactor: move SqlFormatter from direct import to DeparserContext pro…
devin-ai-integration[bot] Jun 26, 2025
3045f86
feat: make SqlFormatter private and add context-aware indentation
devin-ai-integration[bot] Jun 26, 2025
782d505
fix: improve CREATE TABLE constraint indentation using proper context…
devin-ai-integration[bot] Jun 26, 2025
c2f6de8
feat: improve indentation for boolean expressions and SELECT clauses
devin-ai-integration[bot] Jun 26, 2025
9c8e8d8
fix: improve CHECK constraint and nested SELECT indentation
devin-ai-integration[bot] Jun 26, 2025
b15b55b
fix: refine indentation logic for CHECK constraints, CASE expressions…
devin-ai-integration[bot] Jun 26, 2025
9849938
fix: update SelectStmt target list and WHERE clause to use indentToCu…
devin-ai-integration[bot] Jun 27, 2025
97b2f82
fix: implement systematic indentation rules for SELECT WHERE clauses …
devin-ai-integration[bot] Jun 27, 2025
8f991f8
fix: resolve VALUES clause over-indentation in SelectStmt
devin-ai-integration[bot] Jun 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ exports[`pretty: pretty/constraints-9.sql 1`] = `
ADD CONSTRAINT tax_rate_range
CHECK (
tax_rate >= 0
AND tax_rate <= 1
AND tax_rate <= 1
)"
`;

Expand Down Expand Up @@ -151,7 +151,7 @@ exports[`pretty: pretty/constraints-16.sql 1`] = `
ADD CONSTRAINT chk_enrollment_date
CHECK (
enrollment_date <= CURRENT_DATE
AND status IN ('active', 'completed', 'withdrawn')
AND status IN ('active', 'completed', 'withdrawn')
)"
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ CASE
WHEN EXISTS (SELECT 1
FROM reviews AS r
WHERE
r.product_id = p.id
AND r.rating >= 4) THEN 'Popular'
r.product_id = p.id
AND r.rating >= 4) THEN 'Popular'
ELSE 'Unrated'
END AS status
FROM products AS p
Expand Down Expand Up @@ -165,8 +165,8 @@ WHERE
AND EXISTS (SELECT 1
FROM order_notes AS n
WHERE
(n.order_id = o.id
AND n.note ILIKE '%expedite%'))))
(n.order_id = o.id
AND n.note ILIKE '%expedite%'))))
ORDER BY
o.created_at DESC"
`;
Expand Down Expand Up @@ -229,8 +229,8 @@ CASE
WHEN EXISTS (SELECT 1
FROM logins
WHERE
logins.user_id = users.user_id
AND success = false) THEN 'risky'
logins.user_id = users.user_id
AND success = false) THEN 'risky'
ELSE 'safe'
END AS risk_status
FROM users"
Expand Down Expand Up @@ -261,12 +261,12 @@ exports[`pretty: pretty/misc-12.sql 1`] = `
id,
(SELECT
CASE
WHEN count(*) > 5 THEN 'frequent'
ELSE 'occasional'
WHEN count(*) > 5 THEN 'frequent'
ELSE 'occasional'
END
FROM purchases AS p
WHERE
p.user_id = u.id) AS purchase_freq
p.user_id = u.id) AS purchase_freq
FROM users AS u"
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ WHERE
id IN (SELECT user_id
FROM orders
WHERE
total > 100)"
total > 100)"
`;

exports[`pretty: pretty/selects-14.sql 1`] = `
Expand Down
Loading