Skip to content

fix: back-port KEY as a bare identifier (PRIMARY/FOREIGN KEY via expect_bareword_ci) from t-rust-db/db-core — partial #696 #702

Description

@iheitlager

Description

Partial fix for #696 that t-rust-db/db-core already carries (t-rust-db/db-core parser::row, found by diffing against this crate for t-rust-db/db-core#84): KEY is removed from the reserved keyword table and PRIMARY KEY / FOREIGN KEY match it as a case-insensitive bare word instead (Parser::expect_bareword_ci). Result: SELECT key FROM regions and … ON orders.region_key = regions.key parse — the exact case #696 names as blocking SQE's key column.

Tests in db-core: primary_key_matches_case_insensitively, key_is_usable_as_a_column_name.

Back-port here first (Lab271 is leading; the port must converge, see t-rust-db/db-core#84), then #696 can continue with the remaining 88 %fallback keywords using the same expect_bareword_ci mechanism.

Complexity

Estimate: trivial — one keyword-table entry, one helper, two call sites, two tests.

Acceptance Criteria


🤖 Analysis by Claude

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions