1module RelationTupleSet where
4import RelationAttribute
6import qualified Data.Map as M
7import qualified Data.HashSet as HS
10emptyTupleSet = HS.empty
11emptyAttributeSet = M.empty
13--ensure that all maps have the same keys and key count
15verifyRelationTupleSet :: Attributes -> RelationTupleSet -> Either RelationalError RelationTupleSet
16verifyRelationTupleSet attrs tupleSet = do
17 --check that all tuples have the same types
18 tupleList <- forM (HS.toList tupleSet) verifyTuple
19 return $ HS.fromList tupleList
21 verifyTuple tuple = if tupleAttributes tuple == attrs then
24 Left $ TupleAttributeTypeMismatchError (attributesDifference (tupleAttributes tuple) attrs)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list