Skip to content

Commit 2cdb6b8

Browse files
clarify
1 parent 298f767 commit 2cdb6b8

File tree

1 file changed

+8
-2
lines changed
  • crates/pgls_treesitter/src/context

1 file changed

+8
-2
lines changed

crates/pgls_treesitter/src/context/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,17 @@ pub struct TreesitterContext<'a> {
101101
pub text: &'a str,
102102
pub position: usize,
103103

104-
/// Tuple containing up to two qualifier identifiers from dot notation.
105-
/// For example:
104+
/// Tuple containing up to two qualifiers for identifier-node under the cursor.
105+
///
106+
/// The qualifiers represent different "parents" based on the context, for example:
106107
/// - `table.column` -> (None, Some("table"))
108+
/// - `alias.column` -> (None, Some("alias"))
109+
/// - `schema.table` -> (None, Some("schema"))
107110
/// - `schema.table.column` -> (Some("schema"), Some("table"))
111+
///
112+
/// Without any qualifiers:
108113
/// - `column` -> (None, None)
114+
/// - `table` -> (None, None)
109115
pub identifier_qualifiers: (Option<String>, Option<String>),
110116

111117
pub wrapping_clause_type: Option<WrappingClause<'a>>,

0 commit comments

Comments
 (0)