Skip to main content

find_reference_at_position

Function find_reference_at_position 

Source
pub fn find_reference_at_position(
    text: &str,
    byte_offset: usize,
) -> Option<Vec<String>>
Expand description

Find the dot-qualified identifier chain at the given byte offset.

Returns None if the cursor is not on an identifier token (e.g., on a keyword, operator, string literal, dot, or whitespace).

§Arguments

  • text — SQL source text.
  • byte_offset — Cursor position as a byte offset into text.

§Returns

A vec of identifier parts (e.g., ["schema", "object"]) or None.