Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data CountTolerance
- data CompareCount
- data WithinSet a
- = FromToRange a a
- | ValuesList [a]
- pattern ApproxEqualRelative :: Scientific -> CompareCount
- pattern ApproxEqualAbsolute :: Scientific -> CompareCount
- assertAllValuesWithin :: (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r ()
- assertAllValuesWithinT :: (Assert b r, Val a) => SExp -> WithinSet a -> Sem r ()
- assertAnswerConst :: forall a b r. (Show a, Real a, Val a, GlobalAssert b r) => CompareCount -> Query -> a -> Sem r ()
- assertAnswerConstT :: forall a b r q. (Show a, Real a, Val a, Assert b r) => CompareCount -> Q q -> a -> Sem r ()
- assertAnswerEq :: forall a b r. (Show a, Val a, Eq a, GlobalAssert b r) => Query -> a -> Sem r ()
- assertAnswerEqT :: forall a b r q. (Show a, Val a, Eq a, Assert b r) => Q q -> a -> Sem r ()
- assertAnswers :: forall a b r. (Show a, Real a, Val a, GlobalAssert b r) => CompareCount -> Query -> Query -> Sem r ()
- assertAnyPresent :: GlobalAssert b r => SExp -> Relation -> Sem r ()
- assertAnyPresentT :: Assert b r => SExp -> Sem r ()
- assertAnyValuesWithin :: (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r ()
- assertAnyValuesWithinT :: (Assert b r, Val a) => SExp -> WithinSet a -> Sem r ()
- assertCardinalities :: GlobalAssert b r => CompareCount -> Relation -> SExp -> Relation -> SExp -> Sem r ()
- assertCardinalitiesT :: Assert b r => CompareCount -> SExp -> Relation -> SExp -> Sem r ()
- assertCount :: GlobalAssert b r => CompareCount -> Relation -> Relation -> Sem r ()
- assertCountConst :: GlobalAssert b r => CompareCount -> Relation -> Integer -> Sem r ()
- assertCountConstT :: Assert b r => CompareCount -> Integer -> Sem r ()
- assertCountT :: Assert b r => CompareCount -> Relation -> Sem r ()
- assertExpression :: GlobalAssert b r => Relation -> SExp -> Sem r ()
- assertExpressionT :: Assert b r => SExp -> Sem r ()
- assertNotNull :: GlobalAssert b r => Relation -> [SExp] -> Sem r ()
- assertNotNullT :: Assert b r => [SExp] -> Sem r ()
- assertNoValuesWithin :: (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r ()
- assertNoValuesWithinT :: (Assert b r, Val a) => SExp -> WithinSet a -> Sem r ()
- assertUniqueBy :: GlobalAssert b r => Relation -> [Selected SExp] -> Sem r ()
- assertUniqueByCap :: GlobalAssert b r => CountTolerance -> Relation -> [Selected SExp] -> Sem r ()
- assertUniqueByCapT :: Assert b r => CountTolerance -> [Selected SExp] -> Sem r ()
- assertUniqueByT :: Assert b r => [Selected SExp] -> Sem r ()
- assertUniqueByWhere :: GlobalAssert b r => Relation -> PredicateSExp -> [Selected SExp] -> Sem r ()
- assertUniqueByWhereT :: Assert b r => PredicateSExp -> [Selected SExp] -> Sem r ()
- assertMultipleCardinalities :: GlobalAssert b r => CompareCount -> Relation -> SExp -> [(Relation, SExp)] -> Sem r ()
- assertMultipleCardinalitiesT :: Assert b r => CompareCount -> SExp -> [(Relation, SExp)] -> Sem r ()
- assertMultipleColumnsCardinalities :: GlobalAssert b r => CompareCount -> Relation -> [Selected SExp] -> Relation -> [Selected SExp] -> Sem r ()
Documentation
data CountTolerance #
Instances
Show CountTolerance # | |
Defined in Napkin.Run.Effects.Hooks.Types showsPrec :: Int -> CountTolerance -> ShowS # show :: CountTolerance -> String # showList :: [CountTolerance] -> ShowS # | |
Eq CountTolerance # | |
Defined in Napkin.Run.Effects.Hooks.Types (==) :: CountTolerance -> CountTolerance -> Bool # (/=) :: CountTolerance -> CountTolerance -> Bool # |
data CompareCount #
Instances
Show CompareCount # | |
Defined in Napkin.Run.Effects.Hooks.Types showsPrec :: Int -> CompareCount -> ShowS # show :: CompareCount -> String # showList :: [CompareCount] -> ShowS # | |
Eq CompareCount # | |
Defined in Napkin.Run.Effects.Hooks.Types (==) :: CompareCount -> CompareCount -> Bool # (/=) :: CompareCount -> CompareCount -> Bool # |
FromToRange a a | |
ValuesList [a] |
Instances
Generic (WithinSet a) # | |
Show a => Show (WithinSet a) # | |
Eq a => Eq (WithinSet a) # | |
type Rep (WithinSet a) # | |
Defined in Napkin.Run.Effects.Hooks.Types type Rep (WithinSet a) = D1 ('MetaData "WithinSet" "Napkin.Run.Effects.Hooks.Types" "napkin-0.5.14-JrXUGmKUOt9J0meJSj0Kh4" 'False) (C1 ('MetaCons "FromToRange" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "ValuesList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]))) |
pattern ApproxEqualRelative :: Scientific -> CompareCount #
pattern ApproxEqualAbsolute :: Scientific -> CompareCount #
assertAllValuesWithin :: (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r () #
Fail if the table column contains some values beyond the specified (inclusive) range.
assertAllValuesWithinT :: (Assert b r, Val a) => SExp -> WithinSet a -> Sem r () #
Fail if the target column contains some values beyond the specified (inclusive) range.
assertAnswerConst :: forall a b r. (Show a, Real a, Val a, GlobalAssert b r) => CompareCount -> Query -> a -> Sem r () #
Compares result of a query against a constant value using comparison over Real numbers, fails if check does not hold.
assertAnswerConstT :: forall a b r q. (Show a, Real a, Val a, Assert b r) => CompareCount -> Q q -> a -> Sem r () #
Compares result of a query against a constant value using comparison over Real numbers, fails if check does not hold.
assertAnswerEq :: forall a b r. (Show a, Val a, Eq a, GlobalAssert b r) => Query -> a -> Sem r () #
Compares result of a query against a constant value using comparison over Eq constraint, fails if check does not hold.
assertAnswerEqT :: forall a b r q. (Show a, Val a, Eq a, Assert b r) => Q q -> a -> Sem r () #
Compares result of a query against a constant value using comparison over Eq constraint, fails if check does not hold.
assertAnswers :: forall a b r. (Show a, Real a, Val a, GlobalAssert b r) => CompareCount -> Query -> Query -> Sem r () #
Compares result of a two queries, fails if check does not hold.
assertAnyPresent :: GlobalAssert b r => SExp -> Relation -> Sem r () #
Checks if any values are present in given column.
assertAnyPresentT :: Assert b r => SExp -> Sem r () #
Checks if any values are present in given column.
assertAnyValuesWithin :: (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r () #
Fail if the table column contains no values from the specified (inclusive) range.
assertAnyValuesWithinT :: (Assert b r, Val a) => SExp -> WithinSet a -> Sem r () #
Fail if the target column contains no values from the specified (inclusive) range.
assertCardinalities :: GlobalAssert b r => CompareCount -> Relation -> SExp -> Relation -> SExp -> Sem r () #
Checks the cardinalities of two columns that may be sourced from different tables.
assertCardinalitiesT :: Assert b r => CompareCount -> SExp -> Relation -> SExp -> Sem r () #
Checks the cardinalities of two columns that may be sourced from different tables.
assertCount :: GlobalAssert b r => CompareCount -> Relation -> Relation -> Sem r () #
Compares counts of two relations, fails if check does not hold.
assertCountConst :: GlobalAssert b r => CompareCount -> Relation -> Integer -> Sem r () #
Compares counts of relation against a constant value, fails if check does not hold.
assertCountConstT :: Assert b r => CompareCount -> Integer -> Sem r () #
Compares counts of target against a constant value, fails if check does not hold.
assertCountT :: Assert b r => CompareCount -> Relation -> Sem r () #
Compares counts of target and a relation, fails if check does not hold.
assertExpression :: GlobalAssert b r => Relation -> SExp -> Sem r () #
Assert expression is true
assertExpressionT :: Assert b r => SExp -> Sem r () #
Assert expression is true
assertNotNull :: GlobalAssert b r => Relation -> [SExp] -> Sem r () #
Fail if any of the given expressions/columns have any NULL values.
assertNotNullT :: Assert b r => [SExp] -> Sem r () #
Fail if any of the given expressions/columns have any NULL values.
assertNoValuesWithin :: (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r () #
Fail if the table column contains some values within the specified (inclusive) range.
assertNoValuesWithinT :: (Assert b r, Val a) => SExp -> WithinSet a -> Sem r () #
Fail if the target column contains some values within the specified (inclusive) range.
assertUniqueBy :: GlobalAssert b r => Relation -> [Selected SExp] -> Sem r () #
Fail if there are non-unique rows in the result.
assertUniqueByCap :: GlobalAssert b r => CountTolerance -> Relation -> [Selected SExp] -> Sem r () #
Checks if number of duplicate rows in a table is within certain tolerance.
assertUniqueByCapT :: Assert b r => CountTolerance -> [Selected SExp] -> Sem r () #
Checks if number of duplicate rows in a target is within certain tolerance.
assertUniqueByT :: Assert b r => [Selected SExp] -> Sem r () #
Fail if there are non-unique rows in the result.
assertUniqueByWhere :: GlobalAssert b r => Relation -> PredicateSExp -> [Selected SExp] -> Sem r () #
Fail if there are non-unique rows in the result for the multiple predicate and column names.
assertUniqueByWhereT :: Assert b r => PredicateSExp -> [Selected SExp] -> Sem r () #
Fail if there are non-unique rows in the result for the multiple predicate and column names.
assertMultipleCardinalities :: GlobalAssert b r => CompareCount -> Relation -> SExp -> [(Relation, SExp)] -> Sem r () #
Checks the cardinalities of multiple columns that may be sourced from many different tables.
assertMultipleCardinalitiesT :: Assert b r => CompareCount -> SExp -> [(Relation, SExp)] -> Sem r () #
Checks the cardinalities of multiple columns that may be sourced from many different tables.
assertMultipleColumnsCardinalities :: GlobalAssert b r => CompareCount -> Relation -> [Selected SExp] -> Relation -> [Selected SExp] -> Sem r () #
Checks the cardinalities of two columns that may be sourced from different tables.