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
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):KEYis removed from the reserved keyword table andPRIMARY KEY/FOREIGN KEYmatch it as a case-insensitive bare word instead (Parser::expect_bareword_ci). Result:SELECT key FROM regionsand… ON orders.region_key = regions.keyparse — the exact case #696 names as blocking SQE'skeycolumn.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
%fallbackkeywords using the sameexpect_bareword_cimechanism.Complexity
Estimate: trivial — one keyword-table entry, one helper, two call sites, two tests.
Acceptance Criteria
KEYgone fromtokenizer.rs's keyword table;expect_bareword_ciingrammar.rsddl_parsertests unchangedKEYis done and the mechanism to reuse🤖 Analysis by Claude