feat: edit/delete terms — audited, blocked when referenced (#30)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,17 @@ pub mod vocab;
|
||||
|
||||
use sqlx::postgres::{PgPool, PgPoolOptions};
|
||||
|
||||
/// Result of a delete that catalogue-object references may block.
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum DeleteOutcome {
|
||||
/// The row was deleted.
|
||||
Deleted,
|
||||
/// Refused: `count` catalogue objects still reference it.
|
||||
InUse { count: i64 },
|
||||
/// The row did not exist.
|
||||
NotFound,
|
||||
}
|
||||
|
||||
/// A handle to the organization's PostgreSQL database.
|
||||
#[derive(Clone)]
|
||||
pub struct Db {
|
||||
|
||||
Reference in New Issue
Block a user