sqlode/schema_parser

Types

pub type ParseError {
  InvalidCreateTable(path: String, detail: String)
  InvalidColumn(path: String, table: String, detail: String)
  UnsupportedMysqlDdl(path: String, detail: String)
}

Constructors

  • InvalidCreateTable(path: String, detail: String)
  • InvalidColumn(path: String, table: String, detail: String)
  • UnsupportedMysqlDdl(path: String, detail: String)

    Issue #419: emitted when a MySQL schema file contains a DDL statement sqlode does not yet understand, instead of silently dropping it on the floor. The detail names the leading keywords of the offending statement so the user can tell at a glance which line triggered the failure.

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
Search Document