drizzle-core 0.3.0

A type-safe SQL query builder for Rust
Documentation
/// A foreign key described by types, generated by the table macros.
pub trait SQLForeignKey {
    /// The table that declares the key.
    type SourceTable;
    /// The table the key references.
    type TargetTable;
    /// The key's columns in the source table, as a tuple.
    type SourceColumns;
    /// The referenced columns in the target table, as a tuple.
    type TargetColumns;
}

/// Marker used for columns that do not define a foreign key.
pub struct NoForeignKey;

impl SQLForeignKey for NoForeignKey {
    type SourceTable = ();
    type TargetTable = ();
    type SourceColumns = ();
    type TargetColumns = ();
}