diff --git a/relational-join/src/Database/Relational/Query.hs b/relational-join/src/Database/Relational/Query.hs index 0b834bd0..8551a318 100644 --- a/relational-join/src/Database/Relational/Query.hs +++ b/relational-join/src/Database/Relational/Query.hs @@ -16,7 +16,7 @@ import Database.Relational.Query.Table (Table) import Database.Relational.Query.Pi import Database.Relational.Query.Constraint (Key, recordConstraint, projectionKey, - unique, notNull, HasConstraintKey(constraintKey), + uniqueKey, notNullKey, HasConstraintKey(constraintKey), Primary, Unique, NotNull) import Database.Relational.Query.AliasId (Qualified) import Database.Relational.Query.Expr diff --git a/relational-join/src/Database/Relational/Query/Constraint.hs b/relational-join/src/Database/Relational/Query/Constraint.hs index 94005d89..8e081a3b 100644 --- a/relational-join/src/Database/Relational/Query/Constraint.hs +++ b/relational-join/src/Database/Relational/Query/Constraint.hs @@ -8,7 +8,7 @@ module Database.Relational.Query.Constraint ( returnKey, appendConstraint, - unique, notNull, + uniqueKey, notNullKey, HasConstraintKey (..), @@ -48,11 +48,11 @@ mapConstraint :: (KeyConstraint c0 r -> KeyConstraint c1 r) -> Key c1 r ct mapConstraint f = returnKey . f . recordConstraint -unique :: Key Primary r ct -> Key Unique r ct -unique = mapConstraint C.unique +uniqueKey :: Key Primary r ct -> Key Unique r ct +uniqueKey = mapConstraint C.unique -notNull :: Key Primary r ct -> Key NotNull r ct -notNull = mapConstraint C.notNull +notNullKey :: Key Primary r ct -> Key NotNull r ct +notNullKey = mapConstraint C.notNull class HasConstraintKey c r ct where @@ -60,8 +60,8 @@ class HasConstraintKey c r ct where instance HasConstraintKey Primary r ct => HasConstraintKey Unique r ct where - constraintKey = unique constraintKey + constraintKey = uniqueKey constraintKey instance HasConstraintKey Primary r ct => HasConstraintKey NotNull r ct where - constraintKey = notNull constraintKey + constraintKey = notNullKey constraintKey