-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: handle AExpr and NullTest nodes in SQL parsing #354
Conversation
This fix addresses an issue where AExpr and NullTest nodes were not being correctly handled in SQL parsing. This ensures that expressions like and are properly interpreted and typed. Example queries: - -
🦋 Changeset detectedLatest commit: e79da23 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Great, can confirm that this fixed #352: // ✅
await sql<{ has_url: boolean }[]>`
SELECT
CASE
WHEN TRUE THEN personal_intro_url_private IS NOT NULL
ELSE tech_achievements_url_private IS NOT NULL
END AS has_url
FROM
users
`; And also fixed #353: type User = {
lecturer: {
is_guest: boolean;
} | null;
};
// ✅
await sql<User[]>`
SELECT
CASE
WHEN lecturers.id IS NOT NULL THEN (
jsonb_build_object(
'is_guest',
lecturer_users.email NOT LIKE '%@upleveled.io'
)
)
ELSE NULL
END AS lecturer
FROM
lecturers
INNER JOIN users lecturer_users ON lecturers.user_id = lecturer_users.id
`; Thanks so much, amazing! 🎉 |
However, this PR introduced a new problem with inference of summed |
fixes #352 #353