Skip to main content

run

Function run 

Source
pub async fn run(
    schema_path: &Path,
    database_url: &str,
    formatter: &OutputFormatter,
) -> Result<()>
Expand description

Validate that declared fact tables match database schema.

§Arguments

  • schema_path - Path to schema.json file
  • database_url - Database connection string
  • formatter - Output formatter controlling verbosity and format

§Errors

Returns an error if the schema file cannot be read, the database connection fails, or any fact table validation check fails.

§Example

fraiseql validate facts --schema schema.json --database postgresql://localhost/mydb