Errors and diagnostics
Every failure is a mabat::Error, whose message names the view and the path. A test fails when the crate has a
variant that is not listed here.
| Error | Rules |
|---|---|
mabat::Error::Plan | MPA-PLAN-4, MPA-JSON-4 |
mabat::Error::Query | — |
mabat::Error::Decode | MPA-VIEW-5 |
mabat::Error::MissingReference | MPA-VIEW-8 |
mabat::Error::NullTag | MPA-SUM-4 |
mabat::Error::UnknownTag | MPA-SUM-4 |
mabat::Error::OtherVariantColumn | MPA-SUM-4 |
mabat::Error::MissingVariant | MPA-SUM-4 |
mabat::Error::ListIndex | MPA-VIEW-9 |
mabat::Error::DuplicateMapKey | MPA-VIEW-9 |
mabat::Error::Cycle | MPA-LOAD-12 |
mabat::Error::UnloadedReference | MPA-LOAD-14 |
mabat::Error::GraphRequired | MPA-LOAD-14, MPA-JSON-5 |
mabat::Error::MixedKeys | MPA-LOAD-3 |
mabat::Error::NotFound | MPA-LOAD-2 |
mabat::Error::TooManyRows | MPA-LOAD-2 |
mabat::Error::NestedArguments | MPA-LOAD-9 |
mabat::Error::SelectionWithoutJson | MPA-JSON-6 |
mabat::Error::Json | MPA-JSON-2 |
mabat::Error::ColumnNotSelected | MPA-LOAD-7, MPA-LOAD-10 |
mabat::Error::KeysRequired | MPA-OVR-4 |
mabat::Error::Params | MPA-LOAD-19, MPA-VIEW-13 |
mabat::Error::Invalid | MPA-OVR-5 |
mabat::Error::Check | MPA-OVR-5 |
mabat::Error::NotRegistered | MPA-OVR-1 |
mabat::Error::WrongBackend | MPA-DB-3 |
mabat::Error::ManifestBackend | MPA-OVR-8 |
mabat::Error::Connection | MPA-LOAD-11 |
mabat::Error::Write | MPA-WRITE-2, MPA-WRITE-11, MPA-WRITE-13, MPA-WRITE-14, MPA-WRITE-15, MPA-WRITE-16 |
mabat::Error::Conflict | MPA-WRITE-9 |
Diagnostics
Section titled “Diagnostics”The checks of a registry (check, build, reload) and mabat check report diagnostics, each with a severity,
the view, the query, the file and line, and notes.
| Code | Severity | Meaning |
|---|---|---|
M0100 | error | An override file cannot be read or parsed |
M0101 | error | An override names no registered view, or no query of its view |
M0102 | error | A query’s columns do not match the view |
M0103 | error | A query does not prepare on the database |
M0104 | error | A query has the wrong parameters |
M0105 | warning | A query does not select every optional path |
M0201 | error | A query reads a table that is not in the schema snapshot |
M0202 | error | A query reads a column that is not in the schema snapshot |
M0203 | error | A column has a type the field cannot be decoded from |
M0204 | warning | A column is nullable under a field that is not an Option |
M0205 | error | The columns linking a query to its parent hold different kinds of key |
M0206 | warning | A view’s key column is not the primary key of its table |
M0207 | error | A generated key is on a column the database does not generate |
M0301 | error | A view cannot be planned |