sqlode/schema_parser
Types
pub type ParseError {
InvalidCreateTable(path: String, detail: String)
InvalidColumn(path: String, table: String, detail: String)
UnsupportedStatement(path: String, statement_type: String)
}
Constructors
-
InvalidCreateTable(path: String, detail: String) -
InvalidColumn(path: String, table: String, detail: String) -
UnsupportedStatement(path: String, statement_type: String)A DDL statement was recognised as schema-changing but sqlode does not apply it to the catalog. Raised for operations that can produce a catalog that looks valid but is missing real schema changes — e.g.
DROP TABLE,ALTER TABLE ... DROP COLUMN. Informational DDL such asCREATE INDEXandALTER TABLE ... ADD CONSTRAINTstays silent.
pub type SchemaWarning {
UnresolvableViewColumn(column: String)
}
Constructors
-
UnresolvableViewColumn(column: String)
Values
pub fn error_to_string(error: ParseError) -> String
pub fn parse_files(
entries: List(#(String, String)),
) -> Result(#(model.Catalog, List(SchemaWarning)), ParseError)
pub fn parse_files_with_engine(
entries: List(#(String, String)),
engine: model.Engine,
) -> Result(#(model.Catalog, List(SchemaWarning)), ParseError)
pub fn warning_to_string(warning: SchemaWarning) -> String