Skip to main content

resolve_reference

Function resolve_reference 

Source
pub fn resolve_reference(
    parts: &[String],
    file_uri: &Url,
    root: &Path,
    project_cache: &ProjectCache,
) -> Option<Location>
Expand description

Resolve identifier parts to a file location using the ProjectCache.

Derives the default database/schema from the file’s path relative to the project root (expects models/<database>/<schema>/ structure), then constructs an ObjectId and looks it up in the project cache.

§Returns

A Location pointing to the start of the defining file, or None if the reference cannot be resolved (unknown object, external dependency, etc.).