Skip to content

Conversation

Copy link

Copilot AI commented Dec 27, 2025

Follows pattern from AlaSQL#2203 to make OPEN non-reserved, allowing use as table/column names without quoting.

Changes

Grammar (src/alasqlparser.jison):

  • Added OPEN to Literal rule alongside KEY
  • Added OPEN to NonReserved section and array

Tests (test/test2224.js):

  • 12 tests covering table names, column names, aliases, and all SQL clauses
  • 1 skipped test for OPEN CURSOR syntax (cursors not implemented)

Example

// Now works without brackets
alasql('CREATE TABLE open (id INT, open VARCHAR(50))');
alasql('SELECT open FROM open WHERE open = "value"');

// Previously required quoted identifiers
alasql('CREATE TABLE [open] (id INT, [open] VARCHAR(50))');

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • upload.wikimedia.org
    • Triggering command: /usr/local/bin/node /usr/local/bin/node node_modules/mocha/bin/mocha.js ./test --reporter dot --bail --local /snap/bin/git credential.helpe/home/REDACTED/work/alasql/alasql/node_modules/@esbuild/linux-x64/bin/esbuild (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Implement issue 2224</issue_title>
<issue_description>implement this issue: AlaSQL#2224:

Limit the impact of using the keyword: OPEN

Just like in AlaSQL#2203 we want to limit the impact of having keywords. Preferably by making them keywords only in the context needed so the string/word can be used for things like table names and column names i the data - if possible. It might be too much of a hassle to make the impact less, but lets investigate what is possible - still sticking to the SQL-99 specs.

Start by making a test file named test0000.js where 0000 is the issue ID of this ticket. Replicate the use and mimic what usecases could make sense to test, like as a table name, as a column name, as a graph search. Things lke that.

The grammar can be updated in alasqlgrammar.jison. Focus on small precise changes. After updating it we need to run yarn jison && yarn test

Always run yarn format before committing.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ericmort <7136207+ericmort@users.noreply.github.com>
Copilot AI changed the title [WIP] Limit impact of using keyword OPEN Make OPEN keyword usable as identifier Dec 27, 2025
Copilot AI requested a review from ericmort December 27, 2025 20:18
@ericmort ericmort marked this pull request as ready for review December 27, 2025 20:29
@ericmort ericmort merged commit 32fc308 into develop Dec 27, 2025
@ericmort ericmort deleted the copilot/limit-keyword-impact-open branch December 27, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement issue 2224

2 participants