photoncloud-monorepo/flaredb/crates/flaredb-sql/src/error.rs
centra 5c6eb04a46 T036: Add VM cluster deployment configs for nixos-anywhere
- netboot-base.nix with SSH key auth
- Launch scripts for node01/02/03
- Node configuration.nix and disko.nix
- Nix modules for first-boot automation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 09:59:19 +09:00

42 lines
976 B
Rust

use thiserror::Error;
#[derive(Error, Debug)]
pub enum SqlError {
#[error("Parse error: {0}")]
ParseError(String),
#[error("Table '{0}' not found")]
TableNotFound(String),
#[error("Table '{0}' already exists")]
TableAlreadyExists(String),
#[error("Column '{0}' not found in table '{1}'")]
ColumnNotFound(String, String),
#[error("Type mismatch: expected {expected:?}, got {actual:?}")]
TypeMismatch {
expected: String,
actual: String,
},
#[error("Primary key violation: {0}")]
PrimaryKeyViolation(String),
#[error("Constraint violation: {0}")]
ConstraintViolation(String),
#[error("KVS error: {0}")]
KvsError(String),
#[error("Serialization error: {0}")]
SerializationError(String),
#[error("Invalid operation: {0}")]
InvalidOperation(String),
#[error("Internal error: {0}")]
InternalError(String),
}
pub type Result<T> = std::result::Result<T, SqlError>;