napkin-api-2.0.0
Safe HaskellNone
LanguageGHC2024

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) 
Instance details

Defined in Napkin.Run.Effects.Hooks.Types

type Rep (WithinSet a) = D1 ('MetaData "WithinSet" "Napkin.Run.Effects.Hooks.Types" "napkin-api-2.0.0-Dv0TTighdJzLQkO5RNigEJ" '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])))

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-api-2.0.0-Dv0TTighdJzLQkO5RNigEJ" '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 :: 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.

assertMultipleColumnsCardinalities :: forall {k} (b :: k) (r :: EffectRow). 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.