refactor: Define error for memory catalog

This commit is contained in:
evenyag
2022-05-07 14:13:31 +08:00
parent 83262acc0e
commit 99c7ffb456
4 changed files with 49 additions and 17 deletions
+9 -4
View File
@@ -1,17 +1,22 @@
/// Common status code for public API.
#[derive(Debug, Clone, Copy)]
pub enum StatusCode {
// ====== Begin of common status code ===========
// ====== Begin of common status code ==============
/// Unknown error.
Unknown,
/// Unsupported operation.
Unsupported,
/// Internal server error.
Internal,
// ====== End of common status code =============
// ====== End of common status code ================
// ====== Begin of SQL related status code ======
// ====== Begin of SQL related status code =========
/// SQL Syntax error.
InvalidSyntax,
// ====== End of SQL related status code ========
// ====== End of SQL related status code ===========
// ====== Begin of catalog related status code =====
/// Table already exists.
TableAlreadyExists,
// ====== End of catalog related status code =======
}