elefant-tools 0.0.2

A library for doing things like pg_dump and pg_restore, with extra features, and probably more bugs.
Documentation
use crate::object_id::ObjectId;
use crate::whitespace_ignorant_string::WhitespaceIgnorantString;
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;

#[derive(Debug, Eq, PartialEq, Default, Clone, Serialize, Deserialize)]
pub struct PostgresCheckConstraint {
    pub name: String,
    pub check_clause: WhitespaceIgnorantString,
    pub comment: Option<String>,
    pub object_id: ObjectId,
}

impl PartialOrd for PostgresCheckConstraint {
    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
        Some(self.cmp(other))
    }
}

impl Ord for PostgresCheckConstraint {
    fn cmp(&self, other: &Self) -> Ordering {
        self.name.cmp(&other.name)
    }
}