napkin-0.5.14
Safe HaskellSafe-Inferred
LanguageGHC2021

Napkin.Run.Effects.Hooks

Synopsis

Documentation

data WithinSet a #

Constructors

FromToRange a a 
ValuesList [a] 

Instances

Instances details
Generic (WithinSet a) # 
Instance details

Defined in Napkin.Run.Effects.Hooks.Types

Associated Types

type Rep (WithinSet a) :: Type -> Type #

Methods

from :: WithinSet a -> Rep (WithinSet a) x #

to :: Rep (WithinSet a) x -> WithinSet a #

Show a => Show (WithinSet a) # 
Instance details

Defined in Napkin.Run.Effects.Hooks.Types

Eq a => Eq (WithinSet a) # 
Instance details

Defined in Napkin.Run.Effects.Hooks.Types

Methods

(==) :: WithinSet a -> WithinSet a -> Bool #

(/=) :: WithinSet a -> WithinSet a -> Bool #

type Rep (WithinSet a) # 
Instance details

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])))

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.