Skip to main content

compile_object_uncached

Function compile_object_uncached 

Source
fn compile_object_uncached(
    descriptor: ObjectDescriptor,
    profile: &str,
    variables: &BTreeMap<String, String>,
    profile_set: bool,
    file_entries: &BTreeMap<PathBuf, String>,
) -> Result<Option<CachedTypedObject>, ObjectCompileFailure>
Expand description

Compile a single object from source files without consulting the cache.

Reads the SQL content for each file variant from the pre-loaded file_entries map, parses them into AST, builds an input::DatabaseObject, and runs object-level validation via compiled::DatabaseObject::validate.

Returns Ok(Some(...)) for a successfully compiled object, Ok(None) if the object was skipped (no matching profile variant), or an error for validation failures or I/O problems.

This function is pure (no database writes) and runs in parallel via rayon.