Safe Haskell | None |
---|---|
Language | GHC2024 |
Synopsis
- data CountTolerance
- data CompareCount
- data WithinSet a
- = FromToRange a a
- | ValuesList [a]
- pattern ApproxEqualRelative :: Scientific -> CompareCount
- pattern ApproxEqualAbsolute :: Scientific -> CompareCount
- assertAllValuesWithin :: forall {k} (b :: k) (r :: EffectRow) a. (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r ()
- assertAllValuesWithinT :: forall {k} (b :: k) (r :: EffectRow) a. (Assert b r, Val a) => SExp -> WithinSet a -> Sem r ()
- assertAnswerConst :: forall {k} a (b :: k) (r :: EffectRow). (Show a, Real a, Val a, GlobalAssert b r) => CompareCount -> Query -> a -> Sem r ()
- assertAnswerConstT :: forall {k} a (b :: k) (r :: EffectRow) q. (Show a, Real a, Val a, Assert b r) => CompareCount -> Q q -> a -> Sem r ()
- assertAnswerEq :: forall {k} a (b :: k) (r :: EffectRow). (Show a, Val a, Eq a, GlobalAssert b r) => Query -> a -> Sem r ()
- assertAnswerEqT :: forall {k} a (b :: k) (r :: EffectRow) q. (Show a, Val a, Eq a, Assert b r) => Q q -> a -> Sem r ()
- assertAnswers :: forall {k} a (b :: k) (r :: EffectRow). (Show a, Real a, Val a, GlobalAssert b r) => CompareCount -> Query -> Query -> Sem r ()
- assertAnyPresent :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => SExp -> Relation -> Sem r ()
- assertAnyPresentT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => SExp -> Sem r ()
- assertAnyValuesWithin :: forall {k} (b :: k) (r :: EffectRow) a. (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r ()
- assertAnyValuesWithinT :: forall {k} (b :: k) (r :: EffectRow) a. (Assert b r, Val a) => SExp -> WithinSet a -> Sem r ()
- assertCardinalities :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CompareCount -> Relation -> SExp -> Relation -> SExp -> Sem r ()
- assertCardinalitiesT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CompareCount -> SExp -> Relation -> SExp -> Sem r ()
- assertCount :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CompareCount -> Relation -> Relation -> Sem r ()
- assertCountConst :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CompareCount -> Relation -> Integer -> Sem r ()
- assertCountConstT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CompareCount -> Integer -> Sem r ()
- assertCountT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CompareCount -> Relation -> Sem r ()
- assertExpression :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => Relation -> SExp -> Sem r ()
- assertExpressionT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => SExp -> Sem r ()
- assertNotNull :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => Relation -> [SExp] -> Sem r ()
- assertNotNullT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => [SExp] -> Sem r ()
- assertNoValuesWithin :: forall {k} (b :: k) (r :: EffectRow) a. (GlobalAssert b r, Val a) => Relation -> SExp -> WithinSet a -> Sem r ()
- assertNoValuesWithinT :: forall {k} (b :: k) (r :: EffectRow) a. (Assert b r, Val a) => SExp -> WithinSet a -> Sem r ()
- assertUniqueBy :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => Relation -> [Selected SExp] -> Sem r ()
- assertUniqueByCap :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CountTolerance -> Relation -> [Selected SExp] -> Sem r ()
- assertUniqueByCapT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CountTolerance -> [Selected SExp] -> Sem r ()
- assertUniqueByT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => [Selected SExp] -> Sem r ()
- assertUniqueByWhere :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => Relation -> PredicateSExp -> [Selected SExp] -> Sem r ()
- assertUniqueByWhereT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => PredicateSExp -> [Selected SExp] -> Sem r ()
- assertMultipleCardinalities :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CompareCount -> Relation -> SExp -> [(Relation, SExp)] -> Sem r ()
- assertMultipleCardinalitiesT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CompareCount -> SExp -> [(Relation, SExp)] -> Sem r ()
- assertMultipleColumnsCardinalities :: forall {k} (b :: k) (r :: EffectRow). 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
pattern ApproxEqualRelative :: Scientific -> CompareCount #
pattern ApproxEqualAbsolute :: Scientific -> CompareCount #
assertAllValuesWithin :: forall {k} (b :: k) (r :: EffectRow) a. (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 :: forall {k} (b :: k) (r :: EffectRow) a. (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 {k} a (b :: k) (r :: EffectRow). (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 {k} a (b :: k) (r :: EffectRow) 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 {k} a (b :: k) (r :: EffectRow). (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 {k} a (b :: k) (r :: EffectRow) 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 {k} a (b :: k) (r :: EffectRow). (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 :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => SExp -> Relation -> Sem r () #
Checks if any values are present in given column.
assertAnyPresentT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => SExp -> Sem r () #
Checks if any values are present in given column.
assertAnyValuesWithin :: forall {k} (b :: k) (r :: EffectRow) a. (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 :: forall {k} (b :: k) (r :: EffectRow) a. (Assert b r, Val a) => SExp -> WithinSet a -> Sem r () #
Fail if the target column contains no values from the specified (inclusive) range.
assertCardinalities :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CompareCount -> Relation -> SExp -> Relation -> SExp -> Sem r () #
Checks the cardinalities of two columns that may be sourced from different tables.
assertCardinalitiesT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CompareCount -> SExp -> Relation -> SExp -> Sem r () #
Checks the cardinalities of two columns that may be sourced from different tables.
assertCount :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CompareCount -> Relation -> Relation -> Sem r () #
Compares counts of two relations, fails if check does not hold.
assertCountConst :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CompareCount -> Relation -> Integer -> Sem r () #
Compares counts of relation against a constant value, fails if check does not hold.
assertCountConstT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CompareCount -> Integer -> Sem r () #
Compares counts of target against a constant value, fails if check does not hold.
assertCountT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CompareCount -> Relation -> Sem r () #
Compares counts of target and a relation, fails if check does not hold.
assertExpression :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => Relation -> SExp -> Sem r () #
Assert expression is true
assertExpressionT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => SExp -> Sem r () #
Assert expression is true
assertNotNull :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => Relation -> [SExp] -> Sem r () #
Fail if any of the given expressions/columns have any NULL values.
assertNotNullT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => [SExp] -> Sem r () #
Fail if any of the given expressions/columns have any NULL values.
assertNoValuesWithin :: forall {k} (b :: k) (r :: EffectRow) a. (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 :: forall {k} (b :: k) (r :: EffectRow) a. (Assert b r, Val a) => SExp -> WithinSet a -> Sem r () #
Fail if the target column contains some values within the specified (inclusive) range.
assertUniqueBy :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => Relation -> [Selected SExp] -> Sem r () #
Fail if there are non-unique rows in the result.
assertUniqueByCap :: forall {k} (b :: k) (r :: EffectRow). GlobalAssert b r => CountTolerance -> Relation -> [Selected SExp] -> Sem r () #
Checks if number of duplicate rows in a table is within certain tolerance.
assertUniqueByCapT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CountTolerance -> [Selected SExp] -> Sem r () #
Checks if number of duplicate rows in a target is within certain tolerance.
assertUniqueByT :: forall {k} (b :: k) (r :: EffectRow). Assert b r => [Selected SExp] -> Sem r () #
Fail if there are non-unique rows in the result.
assertUniqueByWhere :: forall {k} (b :: k) (r :: EffectRow). 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 :: forall {k} (b :: k) (r :: EffectRow). 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 :: forall {k} (b :: k) (r :: EffectRow). 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 :: forall {k} (b :: k) (r :: EffectRow). Assert b r => CompareCount -> SExp -> [(Relation, SExp)] -> Sem r () #
Checks the cardinalities of multiple columns that may be sourced from many different tables.