Skip to main content

read_schema

Function read_schema 

Source
pub fn read_schema(
    ddl: &str,
    rules: &'static Rules,
) -> Result<SchemaRead, ReadError>
Expand description

Read CREATE TABLE, ALTER TABLE .. ADD|DROP|ALTER COLUMN and DROP TABLE out of a DDL script (a migration file) in the dialect described by rules. Statements are split on ; tokens, so a dollar-quoted body does not split; a statement that does not parse is listed in skipped.