canonical / canonical/sqlair

SELECT with boolean logic fails with syntax error

Open
#190 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
19
Forks
10
PR merge metrics
No merged PRs in 30d

Description

It's possible in SQL to check values for equality in a SELECT, which fails when using SQLair.

```
SELECT (num = 1) AS (&isOne.*)
FROM nums
```

Fails with:

```
near "(": syntax error
```

Which also isn't very helpful. There are more than one `(` in this query. Positional information would have been useful.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the SQLair query `SELECT (num = 1) AS (&isOne.*) FROM nums` and inspect the query-processing entry point and error path that reports the syntax error. Done means boolean expressions in SELECT statements work as shown and syntax errors identify the relevant position rather than an ambiguous opening parenthesis.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.