MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / keyword_position_correct

Function keyword_position_correct

nodedb-sql/src/parser/preprocess/lex.rs:506–512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

504
505 #[test]
506 fn keyword_position_correct() {
507 let sql = "SELECT x FOR SYSTEM_TIME AS OF 100";
508 let pos = keyword_position_outside_literals(sql, "FOR SYSTEM_TIME").unwrap();
509 // verify the slice at that position matches the keyword (case-insensitively)
510 let found = &sql[pos..pos + "FOR SYSTEM_TIME".len()];
511 assert_eq!(found.to_uppercase(), "FOR SYSTEM_TIME");
512 }
513}

Callers

nothing calls this directly

Calls 2

lenMethod · 0.45

Tested by

no test coverage detected