mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-11-29 06:37:03 +03:00
relational-query: prefixed name is better for top-level import. prepare to rename.
This commit is contained in:
parent
b688c9d7b8
commit
9dd460e04a
@ -22,12 +22,15 @@ module Database.Relational.Sequence (
|
|||||||
|
|
||||||
SequenceDerivable (..),
|
SequenceDerivable (..),
|
||||||
|
|
||||||
Binding (..), fromRelation,
|
Binding (..), seqFromRelation,
|
||||||
|
|
||||||
Number, unsafeSpecifyNumber, extractNumber,
|
Number, unsafeSpecifyNumber, extractNumber,
|
||||||
($$!), ($$),
|
($$!), ($$),
|
||||||
|
|
||||||
updateNumber', updateNumber,
|
updateNumber', updateNumber,
|
||||||
|
|
||||||
|
-- * Deprecated
|
||||||
|
fromRelation,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Prelude hiding (seq)
|
import Prelude hiding (seq)
|
||||||
@ -103,11 +106,18 @@ class (TableDerivable r, SequenceDerivable s i)
|
|||||||
fromTable :: Binding r s i => Table r -> Sequence s i
|
fromTable :: Binding r s i => Table r -> Sequence s i
|
||||||
fromTable = const derivedSequence
|
fromTable = const derivedSequence
|
||||||
|
|
||||||
|
-- | Derive 'Sequence' from corresponding 'Relation'
|
||||||
|
seqFromRelation :: Binding r s i
|
||||||
|
=> Relation () r
|
||||||
|
-> Sequence s i
|
||||||
|
seqFromRelation = fromTable . tableFromRelation
|
||||||
|
|
||||||
-- | Derive 'Sequence' from corresponding 'Relation'
|
-- | Derive 'Sequence' from corresponding 'Relation'
|
||||||
fromRelation :: Binding r s i
|
fromRelation :: Binding r s i
|
||||||
=> Relation () r
|
=> Relation () r
|
||||||
-> Sequence s i
|
-> Sequence s i
|
||||||
fromRelation = fromTable . tableFromRelation
|
fromRelation = seqFromRelation
|
||||||
|
{-# DEPRECATED fromRelation "use seqFromRelation instead of this." #-}
|
||||||
|
|
||||||
-- | Sequence number type for record type 'r'
|
-- | Sequence number type for record type 'r'
|
||||||
newtype Number r i = Number i deriving (Eq, Ord, Show)
|
newtype Number r i = Number i deriving (Eq, Ord, Show)
|
||||||
|
Loading…
Reference in New Issue
Block a user