Skip to content

Conversation

@psteinroe
Copy link
Contributor

@psteinroe psteinroe commented May 23, 2025

follow-up for #486

reference: https://www.postgresql.org/docs/current/sql-explain.html

boolean: Specifies whether the selected option should be turned on or off. You can write TRUE, ON, or 1 to enable the option, and FALSE, OFF, or 0 to disable it. The boolean value can also be omitted, in which case TRUE is assumed.

makes 5 more regression tests pass 🎉

added one todo item - i was not sure if its possible to know if its specifically 1 or 0. let me know if it is! :)

@netlify
Copy link

netlify bot commented May 23, 2025

👷 Deploy request for squawkhq pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 2ca0eb9

fn opt_bool_literal(p: &mut Parser<'_>) -> bool {
let m = p.start();
if p.eat(TRUE_KW) || p.eat(FALSE_KW) {
// TOOD: we might want to check if its 1 or 0 specificially, not just `INT_NUMBER`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we can add a validation for that in crates/squawk_syntax/src/validations.rs

which is layered on top of this, the parser doesn't know about actual values, so we can't really check here

@sbdchd sbdchd added the automerge automerge with kodiak label May 23, 2025
@kodiakhq kodiakhq bot merged commit 87422ec into sbdchd:master May 23, 2025
26 checks passed
@sbdchd
Copy link
Owner

sbdchd commented May 23, 2025

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge automerge with kodiak

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants