Skip to main content

extract_data_artifact

Function extract_data_artifact 

Source
pub fn extract_data_artifact(
    source_path: &str,
    input: &str,
) -> Result<DataDocument, DataExtractionError>
Expand description

Extracts a supported SQL, Prisma, Alembic, SQLAlchemy, or Diesel artifact.

Dispatch is path-only: .sql, .prisma, Alembic migration paths, conventional SQLAlchemy model filenames, and Diesel’s exact schema.rs filename. Source contents never change the selected parser.

§Errors

Returns DataExtractionError for unsupported paths. Oversized inputs and structured output degrade to bounded incomplete documents so one large dump cannot abort a workspace scan. Over-budget inputs and unsupported SQL dialect constructs produce an incomplete source-free document rather than aborting the workspace scan.