Location in sqlparser::tokenizer - Rust

pub struct Location {
    pub line: u64,
    pub column: u64,
}
Expand description

Location in input string

§Create an “empty” (unknown) Location

let location = Location::empty();

§Create a Location from a line and column

let location = Location::new(1, 1);

§Create a Location from a pair

let location = Location::from((1, 1));

Line number, starting from 1.

Note: Line 0 is used for empty spans

§column: u64

Line column, starting from 1.

Note: Column 0 is used for empty spans

Source§
Source

Return an “empty” / unknown location

Source

Create a new Location for a given line and column

Source

Create a new location for a given line and column

Alias for Self::new

Source

Combine self and end into a new Span

§
§
§
§
§
§