gorm 0.1.4

An orm that is simple to use and prevents all mistakes at compile time
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::Table;

/// A trait used to represent some unique constraint on some table.
///
/// This trait is used to refer to unique constraints in `ON CONFLICT` clauses.
pub trait UniqueConstraint {
    /// The table that this unique constraint belongs to.
    type Table: Table;

    /// A comma seperated list of field names that this unique constraint
    /// enforces uniqueness on.
    const FIELDS_COMMA_SEPERATED: &'static str;
}