{-# LANGUAGE DuplicateRecordFields #-}

-- | Types for Transact-SQL aka T-SQL; the language of SQL Server.
module Hasura.Backends.BigQuery.Types
  ( Aggregate (..),
    Aliased (..),
    ArrayAgg (..),
    Base64,
    BigDecimal (..),
    BooleanOperators (..),
    Cardinality (..),
    ColumnName (ColumnName),
    Countable (..),
    Date (..),
    Datetime (..),
    Decimal (..),
    EntityAlias (..),
    Expression (..),
    FieldName (..),
    FieldOrigin (..),
    Float64,
    From (..),
    SelectFromFunction (..),
    Geography (Geography),
    Int64 (Int64),
    Join (..),
    JoinProvenance (ArrayAggregateJoinProvenance, ArrayJoinProvenance, ObjectJoinProvenance, OrderByJoinProvenance),
    JoinSource (..),
    JsonPath (..),
    NullsOrder (..),
    Op (..),
    Order (..),
    OrderBy (..),
    Projection (..),
    Reselect (..),
    ScalarType (..),
    Select (..),
    AsStruct (..),
    PartitionableSelect (..),
    noExtraPartitionFields,
    withExtraPartitionFields,
    simpleSelect,
    SelectJson (..),
    TableName (..),
    Time (..),
    Timestamp (..),
    Top (..),
    Value (..),
    Where (..),
    WindowFunction (..),
    aggregateProjectionsFieldOrigin,
    doubleToBigDecimal,
    doubleToFloat64,
    getGQLTableName,
    intToInt64,
    int64Expr,
    isComparableType,
    isNumType,
    parseScalarValue,
    projectionAlias,
    scientificToText,
    columnToFieldName,
    FunctionName (..),
    ComputedFieldDefinition (..),
    ArgumentExp (..),
    ComputedFieldImplicitArguments,
    ComputedFieldReturn (..),
    FunctionArgument (..),
  )
where

import Data.Aeson (FromJSON, FromJSONKey, ToJSON, ToJSONKey)
import Data.Aeson qualified as J
import Data.Aeson.Casing qualified as J
import Data.Aeson.Extended qualified as J
import Data.Aeson.Types qualified as J
import Data.ByteString (ByteString)
import Data.ByteString.Base64 qualified as Base64
import Data.ByteString.Lazy qualified as L
import Data.Coerce
import Data.Int qualified as Int
import Data.Scientific
import Data.Text qualified as T
import Data.Text.Encoding qualified as T
import Data.Text.Extended
import Data.Text.Lazy (toStrict)
import Data.Text.Lazy.Builder (toLazyText)
import Data.Text.Lazy.Builder.Scientific (formatScientificBuilder)
import Data.Vector (Vector)
import Data.Vector.Instances ()
import Hasura.Base.Error
import Hasura.Base.ErrorValue qualified as ErrorValue
import Hasura.Base.ToErrorValue
import Hasura.Incremental.Internal.Dependency
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp
import Hasura.RQL.Types.Function (FunctionArgName)
import Language.GraphQL.Draft.Syntax qualified as G
import Language.Haskell.TH.Syntax
import Text.ParserCombinators.ReadP (eof, readP_to_S)

data Select = Select
  { Select -> Top
selectTop :: Top,
    Select -> AsStruct
selectAsStruct :: AsStruct,
    Select -> NonEmpty Projection
selectProjections :: NonEmpty Projection,
    Select -> From
selectFrom :: From,
    Select -> [Join]
selectJoins :: [Join],
    Select -> Where
selectWhere :: Where,
    Select -> Maybe (NonEmpty OrderBy)
selectOrderBy :: Maybe (NonEmpty OrderBy),
    Select -> Maybe Expression
selectOffset :: Maybe Expression,
    Select -> [FieldName]
selectGroupBy :: [FieldName],
    Select -> Maybe [Text]
selectFinalWantedFields :: Maybe [Text],
    Select -> Cardinality
selectCardinality :: Cardinality
  }
  deriving (Select -> Select -> Bool
(Select -> Select -> Bool)
-> (Select -> Select -> Bool) -> Eq Select
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Select -> Select -> Bool
$c/= :: Select -> Select -> Bool
== :: Select -> Select -> Bool
$c== :: Select -> Select -> Bool
Eq, Eq Select
Eq Select
-> (Select -> Select -> Ordering)
-> (Select -> Select -> Bool)
-> (Select -> Select -> Bool)
-> (Select -> Select -> Bool)
-> (Select -> Select -> Bool)
-> (Select -> Select -> Select)
-> (Select -> Select -> Select)
-> Ord Select
Select -> Select -> Bool
Select -> Select -> Ordering
Select -> Select -> Select
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Select -> Select -> Select
$cmin :: Select -> Select -> Select
max :: Select -> Select -> Select
$cmax :: Select -> Select -> Select
>= :: Select -> Select -> Bool
$c>= :: Select -> Select -> Bool
> :: Select -> Select -> Bool
$c> :: Select -> Select -> Bool
<= :: Select -> Select -> Bool
$c<= :: Select -> Select -> Bool
< :: Select -> Select -> Bool
$c< :: Select -> Select -> Bool
compare :: Select -> Select -> Ordering
$ccompare :: Select -> Select -> Ordering
$cp1Ord :: Eq Select
Ord, Int -> Select -> ShowS
[Select] -> ShowS
Select -> String
(Int -> Select -> ShowS)
-> (Select -> String) -> ([Select] -> ShowS) -> Show Select
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Select] -> ShowS
$cshowList :: [Select] -> ShowS
show :: Select -> String
$cshow :: Select -> String
showsPrec :: Int -> Select -> ShowS
$cshowsPrec :: Int -> Select -> ShowS
Show, (forall x. Select -> Rep Select x)
-> (forall x. Rep Select x -> Select) -> Generic Select
forall x. Rep Select x -> Select
forall x. Select -> Rep Select x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Select x -> Select
$cfrom :: forall x. Select -> Rep Select x
Generic, Typeable Select
DataType
Constr
Typeable Select
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Select -> c Select)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Select)
-> (Select -> Constr)
-> (Select -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Select))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Select))
-> ((forall b. Data b => b -> b) -> Select -> Select)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Select -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Select -> r)
-> (forall u. (forall d. Data d => d -> u) -> Select -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Select -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Select -> m Select)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Select -> m Select)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Select -> m Select)
-> Data Select
Select -> DataType
Select -> Constr
(forall b. Data b => b -> b) -> Select -> Select
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Select -> c Select
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Select
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Select -> u
forall u. (forall d. Data d => d -> u) -> Select -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Select -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Select -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Select -> m Select
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Select -> m Select
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Select
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Select -> c Select
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Select)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Select)
$cSelect :: Constr
$tSelect :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Select -> m Select
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Select -> m Select
gmapMp :: (forall d. Data d => d -> m d) -> Select -> m Select
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Select -> m Select
gmapM :: (forall d. Data d => d -> m d) -> Select -> m Select
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Select -> m Select
gmapQi :: Int -> (forall d. Data d => d -> u) -> Select -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Select -> u
gmapQ :: (forall d. Data d => d -> u) -> Select -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Select -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Select -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Select -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Select -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Select -> r
gmapT :: (forall b. Data b => b -> b) -> Select -> Select
$cgmapT :: (forall b. Data b => b -> b) -> Select -> Select
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Select)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Select)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Select)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Select)
dataTypeOf :: Select -> DataType
$cdataTypeOf :: Select -> DataType
toConstr :: Select -> Constr
$ctoConstr :: Select -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Select
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Select
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Select -> c Select
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Select -> c Select
$cp1Data :: Typeable Select
Data, Select -> Q Exp
Select -> Q (TExp Select)
(Select -> Q Exp) -> (Select -> Q (TExp Select)) -> Lift Select
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Select -> Q (TExp Select)
$cliftTyped :: Select -> Q (TExp Select)
lift :: Select -> Q Exp
$clift :: Select -> Q Exp
Lift)

instance FromJSON Select

instance Hashable Select

instance Cacheable Select

instance NFData Select

-- | Helper type allowing addition of extra fields used
-- in PARTITION BY.
--
-- The main purpose of this type is sumulation of DISTINCT ON
-- implemented in Hasura.Backends.BigQuery.FromIr.simulateDistinctOn
data PartitionableSelect = PartitionableSelect
  { PartitionableSelect -> Maybe [FieldName] -> Select
pselectFinalize :: Maybe [FieldName] -> Select,
    PartitionableSelect -> From
pselectFrom :: From
  }

simpleSelect :: Select -> PartitionableSelect
simpleSelect :: Select -> PartitionableSelect
simpleSelect Select
select =
  PartitionableSelect :: (Maybe [FieldName] -> Select) -> From -> PartitionableSelect
PartitionableSelect
    { $sel:pselectFinalize:PartitionableSelect :: Maybe [FieldName] -> Select
pselectFinalize = Select -> Maybe [FieldName] -> Select
forall a b. a -> b -> a
const Select
select,
      $sel:pselectFrom:PartitionableSelect :: From
pselectFrom = Select -> From
selectFrom Select
select
    }

noExtraPartitionFields :: PartitionableSelect -> Select
noExtraPartitionFields :: PartitionableSelect -> Select
noExtraPartitionFields PartitionableSelect {From
Maybe [FieldName] -> Select
pselectFrom :: From
pselectFinalize :: Maybe [FieldName] -> Select
$sel:pselectFrom:PartitionableSelect :: PartitionableSelect -> From
$sel:pselectFinalize:PartitionableSelect :: PartitionableSelect -> Maybe [FieldName] -> Select
..} = Maybe [FieldName] -> Select
pselectFinalize Maybe [FieldName]
forall a. Maybe a
Nothing

withExtraPartitionFields :: PartitionableSelect -> [FieldName] -> Select
withExtraPartitionFields :: PartitionableSelect -> [FieldName] -> Select
withExtraPartitionFields PartitionableSelect {From
Maybe [FieldName] -> Select
pselectFrom :: From
pselectFinalize :: Maybe [FieldName] -> Select
$sel:pselectFrom:PartitionableSelect :: PartitionableSelect -> From
$sel:pselectFinalize:PartitionableSelect :: PartitionableSelect -> Maybe [FieldName] -> Select
..} = Maybe [FieldName] -> Select
pselectFinalize (Maybe [FieldName] -> Select)
-> ([FieldName] -> Maybe [FieldName]) -> [FieldName] -> Select
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FieldName] -> Maybe [FieldName]
forall a. a -> Maybe a
Just

data ArrayAgg = ArrayAgg
  { ArrayAgg -> NonEmpty Projection
arrayAggProjections :: NonEmpty Projection,
    ArrayAgg -> Maybe (NonEmpty OrderBy)
arrayAggOrderBy :: Maybe (NonEmpty OrderBy),
    ArrayAgg -> Top
arrayAggTop :: Top
  }
  deriving (ArrayAgg -> ArrayAgg -> Bool
(ArrayAgg -> ArrayAgg -> Bool)
-> (ArrayAgg -> ArrayAgg -> Bool) -> Eq ArrayAgg
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArrayAgg -> ArrayAgg -> Bool
$c/= :: ArrayAgg -> ArrayAgg -> Bool
== :: ArrayAgg -> ArrayAgg -> Bool
$c== :: ArrayAgg -> ArrayAgg -> Bool
Eq, Eq ArrayAgg
Eq ArrayAgg
-> (ArrayAgg -> ArrayAgg -> Ordering)
-> (ArrayAgg -> ArrayAgg -> Bool)
-> (ArrayAgg -> ArrayAgg -> Bool)
-> (ArrayAgg -> ArrayAgg -> Bool)
-> (ArrayAgg -> ArrayAgg -> Bool)
-> (ArrayAgg -> ArrayAgg -> ArrayAgg)
-> (ArrayAgg -> ArrayAgg -> ArrayAgg)
-> Ord ArrayAgg
ArrayAgg -> ArrayAgg -> Bool
ArrayAgg -> ArrayAgg -> Ordering
ArrayAgg -> ArrayAgg -> ArrayAgg
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ArrayAgg -> ArrayAgg -> ArrayAgg
$cmin :: ArrayAgg -> ArrayAgg -> ArrayAgg
max :: ArrayAgg -> ArrayAgg -> ArrayAgg
$cmax :: ArrayAgg -> ArrayAgg -> ArrayAgg
>= :: ArrayAgg -> ArrayAgg -> Bool
$c>= :: ArrayAgg -> ArrayAgg -> Bool
> :: ArrayAgg -> ArrayAgg -> Bool
$c> :: ArrayAgg -> ArrayAgg -> Bool
<= :: ArrayAgg -> ArrayAgg -> Bool
$c<= :: ArrayAgg -> ArrayAgg -> Bool
< :: ArrayAgg -> ArrayAgg -> Bool
$c< :: ArrayAgg -> ArrayAgg -> Bool
compare :: ArrayAgg -> ArrayAgg -> Ordering
$ccompare :: ArrayAgg -> ArrayAgg -> Ordering
$cp1Ord :: Eq ArrayAgg
Ord, Int -> ArrayAgg -> ShowS
[ArrayAgg] -> ShowS
ArrayAgg -> String
(Int -> ArrayAgg -> ShowS)
-> (ArrayAgg -> String) -> ([ArrayAgg] -> ShowS) -> Show ArrayAgg
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArrayAgg] -> ShowS
$cshowList :: [ArrayAgg] -> ShowS
show :: ArrayAgg -> String
$cshow :: ArrayAgg -> String
showsPrec :: Int -> ArrayAgg -> ShowS
$cshowsPrec :: Int -> ArrayAgg -> ShowS
Show, (forall x. ArrayAgg -> Rep ArrayAgg x)
-> (forall x. Rep ArrayAgg x -> ArrayAgg) -> Generic ArrayAgg
forall x. Rep ArrayAgg x -> ArrayAgg
forall x. ArrayAgg -> Rep ArrayAgg x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ArrayAgg x -> ArrayAgg
$cfrom :: forall x. ArrayAgg -> Rep ArrayAgg x
Generic, Typeable ArrayAgg
DataType
Constr
Typeable ArrayAgg
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ArrayAgg -> c ArrayAgg)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ArrayAgg)
-> (ArrayAgg -> Constr)
-> (ArrayAgg -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ArrayAgg))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArrayAgg))
-> ((forall b. Data b => b -> b) -> ArrayAgg -> ArrayAgg)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ArrayAgg -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ArrayAgg -> r)
-> (forall u. (forall d. Data d => d -> u) -> ArrayAgg -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> ArrayAgg -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg)
-> Data ArrayAgg
ArrayAgg -> DataType
ArrayAgg -> Constr
(forall b. Data b => b -> b) -> ArrayAgg -> ArrayAgg
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ArrayAgg -> c ArrayAgg
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ArrayAgg
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ArrayAgg -> u
forall u. (forall d. Data d => d -> u) -> ArrayAgg -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ArrayAgg -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ArrayAgg -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ArrayAgg
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ArrayAgg -> c ArrayAgg
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ArrayAgg)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArrayAgg)
$cArrayAgg :: Constr
$tArrayAgg :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg
gmapMp :: (forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg
gmapM :: (forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ArrayAgg -> m ArrayAgg
gmapQi :: Int -> (forall d. Data d => d -> u) -> ArrayAgg -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ArrayAgg -> u
gmapQ :: (forall d. Data d => d -> u) -> ArrayAgg -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ArrayAgg -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ArrayAgg -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ArrayAgg -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ArrayAgg -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ArrayAgg -> r
gmapT :: (forall b. Data b => b -> b) -> ArrayAgg -> ArrayAgg
$cgmapT :: (forall b. Data b => b -> b) -> ArrayAgg -> ArrayAgg
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArrayAgg)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArrayAgg)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ArrayAgg)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ArrayAgg)
dataTypeOf :: ArrayAgg -> DataType
$cdataTypeOf :: ArrayAgg -> DataType
toConstr :: ArrayAgg -> Constr
$ctoConstr :: ArrayAgg -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ArrayAgg
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ArrayAgg
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ArrayAgg -> c ArrayAgg
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ArrayAgg -> c ArrayAgg
$cp1Data :: Typeable ArrayAgg
Data, ArrayAgg -> Q Exp
ArrayAgg -> Q (TExp ArrayAgg)
(ArrayAgg -> Q Exp)
-> (ArrayAgg -> Q (TExp ArrayAgg)) -> Lift ArrayAgg
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: ArrayAgg -> Q (TExp ArrayAgg)
$cliftTyped :: ArrayAgg -> Q (TExp ArrayAgg)
lift :: ArrayAgg -> Q Exp
$clift :: ArrayAgg -> Q Exp
Lift)

instance FromJSON ArrayAgg

instance Hashable ArrayAgg

instance Cacheable ArrayAgg

instance NFData ArrayAgg

data Reselect = Reselect
  { Reselect -> NonEmpty Projection
reselectProjections :: NonEmpty Projection,
    Reselect -> Where
reselectWhere :: Where
  }
  deriving (Reselect -> Reselect -> Bool
(Reselect -> Reselect -> Bool)
-> (Reselect -> Reselect -> Bool) -> Eq Reselect
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Reselect -> Reselect -> Bool
$c/= :: Reselect -> Reselect -> Bool
== :: Reselect -> Reselect -> Bool
$c== :: Reselect -> Reselect -> Bool
Eq, Eq Reselect
Eq Reselect
-> (Reselect -> Reselect -> Ordering)
-> (Reselect -> Reselect -> Bool)
-> (Reselect -> Reselect -> Bool)
-> (Reselect -> Reselect -> Bool)
-> (Reselect -> Reselect -> Bool)
-> (Reselect -> Reselect -> Reselect)
-> (Reselect -> Reselect -> Reselect)
-> Ord Reselect
Reselect -> Reselect -> Bool
Reselect -> Reselect -> Ordering
Reselect -> Reselect -> Reselect
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Reselect -> Reselect -> Reselect
$cmin :: Reselect -> Reselect -> Reselect
max :: Reselect -> Reselect -> Reselect
$cmax :: Reselect -> Reselect -> Reselect
>= :: Reselect -> Reselect -> Bool
$c>= :: Reselect -> Reselect -> Bool
> :: Reselect -> Reselect -> Bool
$c> :: Reselect -> Reselect -> Bool
<= :: Reselect -> Reselect -> Bool
$c<= :: Reselect -> Reselect -> Bool
< :: Reselect -> Reselect -> Bool
$c< :: Reselect -> Reselect -> Bool
compare :: Reselect -> Reselect -> Ordering
$ccompare :: Reselect -> Reselect -> Ordering
$cp1Ord :: Eq Reselect
Ord, Int -> Reselect -> ShowS
[Reselect] -> ShowS
Reselect -> String
(Int -> Reselect -> ShowS)
-> (Reselect -> String) -> ([Reselect] -> ShowS) -> Show Reselect
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Reselect] -> ShowS
$cshowList :: [Reselect] -> ShowS
show :: Reselect -> String
$cshow :: Reselect -> String
showsPrec :: Int -> Reselect -> ShowS
$cshowsPrec :: Int -> Reselect -> ShowS
Show, (forall x. Reselect -> Rep Reselect x)
-> (forall x. Rep Reselect x -> Reselect) -> Generic Reselect
forall x. Rep Reselect x -> Reselect
forall x. Reselect -> Rep Reselect x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Reselect x -> Reselect
$cfrom :: forall x. Reselect -> Rep Reselect x
Generic, Typeable Reselect
DataType
Constr
Typeable Reselect
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Reselect -> c Reselect)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Reselect)
-> (Reselect -> Constr)
-> (Reselect -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Reselect))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Reselect))
-> ((forall b. Data b => b -> b) -> Reselect -> Reselect)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Reselect -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Reselect -> r)
-> (forall u. (forall d. Data d => d -> u) -> Reselect -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Reselect -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Reselect -> m Reselect)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Reselect -> m Reselect)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Reselect -> m Reselect)
-> Data Reselect
Reselect -> DataType
Reselect -> Constr
(forall b. Data b => b -> b) -> Reselect -> Reselect
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Reselect -> c Reselect
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Reselect
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Reselect -> u
forall u. (forall d. Data d => d -> u) -> Reselect -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Reselect -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Reselect -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Reselect -> m Reselect
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Reselect -> m Reselect
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Reselect
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Reselect -> c Reselect
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Reselect)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Reselect)
$cReselect :: Constr
$tReselect :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Reselect -> m Reselect
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Reselect -> m Reselect
gmapMp :: (forall d. Data d => d -> m d) -> Reselect -> m Reselect
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Reselect -> m Reselect
gmapM :: (forall d. Data d => d -> m d) -> Reselect -> m Reselect
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Reselect -> m Reselect
gmapQi :: Int -> (forall d. Data d => d -> u) -> Reselect -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Reselect -> u
gmapQ :: (forall d. Data d => d -> u) -> Reselect -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Reselect -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Reselect -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Reselect -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Reselect -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Reselect -> r
gmapT :: (forall b. Data b => b -> b) -> Reselect -> Reselect
$cgmapT :: (forall b. Data b => b -> b) -> Reselect -> Reselect
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Reselect)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Reselect)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Reselect)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Reselect)
dataTypeOf :: Reselect -> DataType
$cdataTypeOf :: Reselect -> DataType
toConstr :: Reselect -> Constr
$ctoConstr :: Reselect -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Reselect
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Reselect
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Reselect -> c Reselect
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Reselect -> c Reselect
$cp1Data :: Typeable Reselect
Data, Reselect -> Q Exp
Reselect -> Q (TExp Reselect)
(Reselect -> Q Exp)
-> (Reselect -> Q (TExp Reselect)) -> Lift Reselect
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Reselect -> Q (TExp Reselect)
$cliftTyped :: Reselect -> Q (TExp Reselect)
lift :: Reselect -> Q Exp
$clift :: Reselect -> Q Exp
Lift)

instance FromJSON Reselect

instance Hashable Reselect

instance Cacheable Reselect

instance NFData Reselect

data OrderBy = OrderBy
  { OrderBy -> FieldName
orderByFieldName :: FieldName,
    OrderBy -> Order
orderByOrder :: Order,
    OrderBy -> NullsOrder
orderByNullsOrder :: NullsOrder
  }
  deriving (OrderBy -> OrderBy -> Bool
(OrderBy -> OrderBy -> Bool)
-> (OrderBy -> OrderBy -> Bool) -> Eq OrderBy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrderBy -> OrderBy -> Bool
$c/= :: OrderBy -> OrderBy -> Bool
== :: OrderBy -> OrderBy -> Bool
$c== :: OrderBy -> OrderBy -> Bool
Eq, Eq OrderBy
Eq OrderBy
-> (OrderBy -> OrderBy -> Ordering)
-> (OrderBy -> OrderBy -> Bool)
-> (OrderBy -> OrderBy -> Bool)
-> (OrderBy -> OrderBy -> Bool)
-> (OrderBy -> OrderBy -> Bool)
-> (OrderBy -> OrderBy -> OrderBy)
-> (OrderBy -> OrderBy -> OrderBy)
-> Ord OrderBy
OrderBy -> OrderBy -> Bool
OrderBy -> OrderBy -> Ordering
OrderBy -> OrderBy -> OrderBy
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OrderBy -> OrderBy -> OrderBy
$cmin :: OrderBy -> OrderBy -> OrderBy
max :: OrderBy -> OrderBy -> OrderBy
$cmax :: OrderBy -> OrderBy -> OrderBy
>= :: OrderBy -> OrderBy -> Bool
$c>= :: OrderBy -> OrderBy -> Bool
> :: OrderBy -> OrderBy -> Bool
$c> :: OrderBy -> OrderBy -> Bool
<= :: OrderBy -> OrderBy -> Bool
$c<= :: OrderBy -> OrderBy -> Bool
< :: OrderBy -> OrderBy -> Bool
$c< :: OrderBy -> OrderBy -> Bool
compare :: OrderBy -> OrderBy -> Ordering
$ccompare :: OrderBy -> OrderBy -> Ordering
$cp1Ord :: Eq OrderBy
Ord, Int -> OrderBy -> ShowS
[OrderBy] -> ShowS
OrderBy -> String
(Int -> OrderBy -> ShowS)
-> (OrderBy -> String) -> ([OrderBy] -> ShowS) -> Show OrderBy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrderBy] -> ShowS
$cshowList :: [OrderBy] -> ShowS
show :: OrderBy -> String
$cshow :: OrderBy -> String
showsPrec :: Int -> OrderBy -> ShowS
$cshowsPrec :: Int -> OrderBy -> ShowS
Show, (forall x. OrderBy -> Rep OrderBy x)
-> (forall x. Rep OrderBy x -> OrderBy) -> Generic OrderBy
forall x. Rep OrderBy x -> OrderBy
forall x. OrderBy -> Rep OrderBy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrderBy x -> OrderBy
$cfrom :: forall x. OrderBy -> Rep OrderBy x
Generic, Typeable OrderBy
DataType
Constr
Typeable OrderBy
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> OrderBy -> c OrderBy)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c OrderBy)
-> (OrderBy -> Constr)
-> (OrderBy -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c OrderBy))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OrderBy))
-> ((forall b. Data b => b -> b) -> OrderBy -> OrderBy)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> OrderBy -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> OrderBy -> r)
-> (forall u. (forall d. Data d => d -> u) -> OrderBy -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> OrderBy -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> OrderBy -> m OrderBy)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OrderBy -> m OrderBy)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OrderBy -> m OrderBy)
-> Data OrderBy
OrderBy -> DataType
OrderBy -> Constr
(forall b. Data b => b -> b) -> OrderBy -> OrderBy
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrderBy -> c OrderBy
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrderBy
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> OrderBy -> u
forall u. (forall d. Data d => d -> u) -> OrderBy -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrderBy -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrderBy -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OrderBy -> m OrderBy
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrderBy -> m OrderBy
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrderBy
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrderBy -> c OrderBy
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrderBy)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OrderBy)
$cOrderBy :: Constr
$tOrderBy :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> OrderBy -> m OrderBy
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrderBy -> m OrderBy
gmapMp :: (forall d. Data d => d -> m d) -> OrderBy -> m OrderBy
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OrderBy -> m OrderBy
gmapM :: (forall d. Data d => d -> m d) -> OrderBy -> m OrderBy
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OrderBy -> m OrderBy
gmapQi :: Int -> (forall d. Data d => d -> u) -> OrderBy -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OrderBy -> u
gmapQ :: (forall d. Data d => d -> u) -> OrderBy -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OrderBy -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrderBy -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OrderBy -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrderBy -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OrderBy -> r
gmapT :: (forall b. Data b => b -> b) -> OrderBy -> OrderBy
$cgmapT :: (forall b. Data b => b -> b) -> OrderBy -> OrderBy
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OrderBy)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OrderBy)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c OrderBy)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OrderBy)
dataTypeOf :: OrderBy -> DataType
$cdataTypeOf :: OrderBy -> DataType
toConstr :: OrderBy -> Constr
$ctoConstr :: OrderBy -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrderBy
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OrderBy
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrderBy -> c OrderBy
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OrderBy -> c OrderBy
$cp1Data :: Typeable OrderBy
Data, OrderBy -> Q Exp
OrderBy -> Q (TExp OrderBy)
(OrderBy -> Q Exp) -> (OrderBy -> Q (TExp OrderBy)) -> Lift OrderBy
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: OrderBy -> Q (TExp OrderBy)
$cliftTyped :: OrderBy -> Q (TExp OrderBy)
lift :: OrderBy -> Q Exp
$clift :: OrderBy -> Q Exp
Lift)

instance FromJSON OrderBy

instance Hashable OrderBy

instance Cacheable OrderBy

instance ToJSON OrderBy

instance NFData OrderBy

data Order
  = AscOrder
  | DescOrder
  deriving (Order -> Order -> Bool
(Order -> Order -> Bool) -> (Order -> Order -> Bool) -> Eq Order
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Order -> Order -> Bool
$c/= :: Order -> Order -> Bool
== :: Order -> Order -> Bool
$c== :: Order -> Order -> Bool
Eq, Eq Order
Eq Order
-> (Order -> Order -> Ordering)
-> (Order -> Order -> Bool)
-> (Order -> Order -> Bool)
-> (Order -> Order -> Bool)
-> (Order -> Order -> Bool)
-> (Order -> Order -> Order)
-> (Order -> Order -> Order)
-> Ord Order
Order -> Order -> Bool
Order -> Order -> Ordering
Order -> Order -> Order
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Order -> Order -> Order
$cmin :: Order -> Order -> Order
max :: Order -> Order -> Order
$cmax :: Order -> Order -> Order
>= :: Order -> Order -> Bool
$c>= :: Order -> Order -> Bool
> :: Order -> Order -> Bool
$c> :: Order -> Order -> Bool
<= :: Order -> Order -> Bool
$c<= :: Order -> Order -> Bool
< :: Order -> Order -> Bool
$c< :: Order -> Order -> Bool
compare :: Order -> Order -> Ordering
$ccompare :: Order -> Order -> Ordering
$cp1Ord :: Eq Order
Ord, Int -> Order -> ShowS
[Order] -> ShowS
Order -> String
(Int -> Order -> ShowS)
-> (Order -> String) -> ([Order] -> ShowS) -> Show Order
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Order] -> ShowS
$cshowList :: [Order] -> ShowS
show :: Order -> String
$cshow :: Order -> String
showsPrec :: Int -> Order -> ShowS
$cshowsPrec :: Int -> Order -> ShowS
Show, (forall x. Order -> Rep Order x)
-> (forall x. Rep Order x -> Order) -> Generic Order
forall x. Rep Order x -> Order
forall x. Order -> Rep Order x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Order x -> Order
$cfrom :: forall x. Order -> Rep Order x
Generic, Typeable Order
DataType
Constr
Typeable Order
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Order -> c Order)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Order)
-> (Order -> Constr)
-> (Order -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Order))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Order))
-> ((forall b. Data b => b -> b) -> Order -> Order)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Order -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Order -> r)
-> (forall u. (forall d. Data d => d -> u) -> Order -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Order -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Order -> m Order)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Order -> m Order)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Order -> m Order)
-> Data Order
Order -> DataType
Order -> Constr
(forall b. Data b => b -> b) -> Order -> Order
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Order -> c Order
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Order
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Order -> u
forall u. (forall d. Data d => d -> u) -> Order -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Order -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Order -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Order -> m Order
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Order -> m Order
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Order
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Order -> c Order
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Order)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Order)
$cDescOrder :: Constr
$cAscOrder :: Constr
$tOrder :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Order -> m Order
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Order -> m Order
gmapMp :: (forall d. Data d => d -> m d) -> Order -> m Order
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Order -> m Order
gmapM :: (forall d. Data d => d -> m d) -> Order -> m Order
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Order -> m Order
gmapQi :: Int -> (forall d. Data d => d -> u) -> Order -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Order -> u
gmapQ :: (forall d. Data d => d -> u) -> Order -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Order -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Order -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Order -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Order -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Order -> r
gmapT :: (forall b. Data b => b -> b) -> Order -> Order
$cgmapT :: (forall b. Data b => b -> b) -> Order -> Order
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Order)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Order)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Order)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Order)
dataTypeOf :: Order -> DataType
$cdataTypeOf :: Order -> DataType
toConstr :: Order -> Constr
$ctoConstr :: Order -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Order
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Order
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Order -> c Order
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Order -> c Order
$cp1Data :: Typeable Order
Data, Order -> Q Exp
Order -> Q (TExp Order)
(Order -> Q Exp) -> (Order -> Q (TExp Order)) -> Lift Order
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Order -> Q (TExp Order)
$cliftTyped :: Order -> Q (TExp Order)
lift :: Order -> Q Exp
$clift :: Order -> Q Exp
Lift)

instance FromJSON Order

instance Hashable Order

instance Cacheable Order

instance ToJSON Order

instance NFData Order

data NullsOrder
  = NullsFirst
  | NullsLast
  | NullsAnyOrder
  deriving (NullsOrder -> NullsOrder -> Bool
(NullsOrder -> NullsOrder -> Bool)
-> (NullsOrder -> NullsOrder -> Bool) -> Eq NullsOrder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NullsOrder -> NullsOrder -> Bool
$c/= :: NullsOrder -> NullsOrder -> Bool
== :: NullsOrder -> NullsOrder -> Bool
$c== :: NullsOrder -> NullsOrder -> Bool
Eq, Eq NullsOrder
Eq NullsOrder
-> (NullsOrder -> NullsOrder -> Ordering)
-> (NullsOrder -> NullsOrder -> Bool)
-> (NullsOrder -> NullsOrder -> Bool)
-> (NullsOrder -> NullsOrder -> Bool)
-> (NullsOrder -> NullsOrder -> Bool)
-> (NullsOrder -> NullsOrder -> NullsOrder)
-> (NullsOrder -> NullsOrder -> NullsOrder)
-> Ord NullsOrder
NullsOrder -> NullsOrder -> Bool
NullsOrder -> NullsOrder -> Ordering
NullsOrder -> NullsOrder -> NullsOrder
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: NullsOrder -> NullsOrder -> NullsOrder
$cmin :: NullsOrder -> NullsOrder -> NullsOrder
max :: NullsOrder -> NullsOrder -> NullsOrder
$cmax :: NullsOrder -> NullsOrder -> NullsOrder
>= :: NullsOrder -> NullsOrder -> Bool
$c>= :: NullsOrder -> NullsOrder -> Bool
> :: NullsOrder -> NullsOrder -> Bool
$c> :: NullsOrder -> NullsOrder -> Bool
<= :: NullsOrder -> NullsOrder -> Bool
$c<= :: NullsOrder -> NullsOrder -> Bool
< :: NullsOrder -> NullsOrder -> Bool
$c< :: NullsOrder -> NullsOrder -> Bool
compare :: NullsOrder -> NullsOrder -> Ordering
$ccompare :: NullsOrder -> NullsOrder -> Ordering
$cp1Ord :: Eq NullsOrder
Ord, Int -> NullsOrder -> ShowS
[NullsOrder] -> ShowS
NullsOrder -> String
(Int -> NullsOrder -> ShowS)
-> (NullsOrder -> String)
-> ([NullsOrder] -> ShowS)
-> Show NullsOrder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NullsOrder] -> ShowS
$cshowList :: [NullsOrder] -> ShowS
show :: NullsOrder -> String
$cshow :: NullsOrder -> String
showsPrec :: Int -> NullsOrder -> ShowS
$cshowsPrec :: Int -> NullsOrder -> ShowS
Show, (forall x. NullsOrder -> Rep NullsOrder x)
-> (forall x. Rep NullsOrder x -> NullsOrder) -> Generic NullsOrder
forall x. Rep NullsOrder x -> NullsOrder
forall x. NullsOrder -> Rep NullsOrder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NullsOrder x -> NullsOrder
$cfrom :: forall x. NullsOrder -> Rep NullsOrder x
Generic, Typeable NullsOrder
DataType
Constr
Typeable NullsOrder
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> NullsOrder -> c NullsOrder)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c NullsOrder)
-> (NullsOrder -> Constr)
-> (NullsOrder -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c NullsOrder))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c NullsOrder))
-> ((forall b. Data b => b -> b) -> NullsOrder -> NullsOrder)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> NullsOrder -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> NullsOrder -> r)
-> (forall u. (forall d. Data d => d -> u) -> NullsOrder -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> NullsOrder -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder)
-> Data NullsOrder
NullsOrder -> DataType
NullsOrder -> Constr
(forall b. Data b => b -> b) -> NullsOrder -> NullsOrder
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NullsOrder -> c NullsOrder
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NullsOrder
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NullsOrder -> u
forall u. (forall d. Data d => d -> u) -> NullsOrder -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NullsOrder -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NullsOrder -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NullsOrder
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NullsOrder -> c NullsOrder
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NullsOrder)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NullsOrder)
$cNullsAnyOrder :: Constr
$cNullsLast :: Constr
$cNullsFirst :: Constr
$tNullsOrder :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder
gmapMp :: (forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder
gmapM :: (forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NullsOrder -> m NullsOrder
gmapQi :: Int -> (forall d. Data d => d -> u) -> NullsOrder -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NullsOrder -> u
gmapQ :: (forall d. Data d => d -> u) -> NullsOrder -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NullsOrder -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NullsOrder -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NullsOrder -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NullsOrder -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NullsOrder -> r
gmapT :: (forall b. Data b => b -> b) -> NullsOrder -> NullsOrder
$cgmapT :: (forall b. Data b => b -> b) -> NullsOrder -> NullsOrder
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NullsOrder)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NullsOrder)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c NullsOrder)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NullsOrder)
dataTypeOf :: NullsOrder -> DataType
$cdataTypeOf :: NullsOrder -> DataType
toConstr :: NullsOrder -> Constr
$ctoConstr :: NullsOrder -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NullsOrder
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NullsOrder
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NullsOrder -> c NullsOrder
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NullsOrder -> c NullsOrder
$cp1Data :: Typeable NullsOrder
Data, NullsOrder -> Q Exp
NullsOrder -> Q (TExp NullsOrder)
(NullsOrder -> Q Exp)
-> (NullsOrder -> Q (TExp NullsOrder)) -> Lift NullsOrder
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: NullsOrder -> Q (TExp NullsOrder)
$cliftTyped :: NullsOrder -> Q (TExp NullsOrder)
lift :: NullsOrder -> Q Exp
$clift :: NullsOrder -> Q Exp
Lift)

instance FromJSON NullsOrder

instance Hashable NullsOrder

instance Cacheable NullsOrder

instance ToJSON NullsOrder

instance NFData NullsOrder

data FieldOrigin
  = NoOrigin
  | AggregateOrigin [Aliased Aggregate]
  deriving (FieldOrigin -> FieldOrigin -> Bool
(FieldOrigin -> FieldOrigin -> Bool)
-> (FieldOrigin -> FieldOrigin -> Bool) -> Eq FieldOrigin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FieldOrigin -> FieldOrigin -> Bool
$c/= :: FieldOrigin -> FieldOrigin -> Bool
== :: FieldOrigin -> FieldOrigin -> Bool
$c== :: FieldOrigin -> FieldOrigin -> Bool
Eq, Eq FieldOrigin
Eq FieldOrigin
-> (FieldOrigin -> FieldOrigin -> Ordering)
-> (FieldOrigin -> FieldOrigin -> Bool)
-> (FieldOrigin -> FieldOrigin -> Bool)
-> (FieldOrigin -> FieldOrigin -> Bool)
-> (FieldOrigin -> FieldOrigin -> Bool)
-> (FieldOrigin -> FieldOrigin -> FieldOrigin)
-> (FieldOrigin -> FieldOrigin -> FieldOrigin)
-> Ord FieldOrigin
FieldOrigin -> FieldOrigin -> Bool
FieldOrigin -> FieldOrigin -> Ordering
FieldOrigin -> FieldOrigin -> FieldOrigin
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: FieldOrigin -> FieldOrigin -> FieldOrigin
$cmin :: FieldOrigin -> FieldOrigin -> FieldOrigin
max :: FieldOrigin -> FieldOrigin -> FieldOrigin
$cmax :: FieldOrigin -> FieldOrigin -> FieldOrigin
>= :: FieldOrigin -> FieldOrigin -> Bool
$c>= :: FieldOrigin -> FieldOrigin -> Bool
> :: FieldOrigin -> FieldOrigin -> Bool
$c> :: FieldOrigin -> FieldOrigin -> Bool
<= :: FieldOrigin -> FieldOrigin -> Bool
$c<= :: FieldOrigin -> FieldOrigin -> Bool
< :: FieldOrigin -> FieldOrigin -> Bool
$c< :: FieldOrigin -> FieldOrigin -> Bool
compare :: FieldOrigin -> FieldOrigin -> Ordering
$ccompare :: FieldOrigin -> FieldOrigin -> Ordering
$cp1Ord :: Eq FieldOrigin
Ord, Int -> FieldOrigin -> ShowS
[FieldOrigin] -> ShowS
FieldOrigin -> String
(Int -> FieldOrigin -> ShowS)
-> (FieldOrigin -> String)
-> ([FieldOrigin] -> ShowS)
-> Show FieldOrigin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FieldOrigin] -> ShowS
$cshowList :: [FieldOrigin] -> ShowS
show :: FieldOrigin -> String
$cshow :: FieldOrigin -> String
showsPrec :: Int -> FieldOrigin -> ShowS
$cshowsPrec :: Int -> FieldOrigin -> ShowS
Show, (forall x. FieldOrigin -> Rep FieldOrigin x)
-> (forall x. Rep FieldOrigin x -> FieldOrigin)
-> Generic FieldOrigin
forall x. Rep FieldOrigin x -> FieldOrigin
forall x. FieldOrigin -> Rep FieldOrigin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FieldOrigin x -> FieldOrigin
$cfrom :: forall x. FieldOrigin -> Rep FieldOrigin x
Generic, Typeable FieldOrigin
DataType
Constr
Typeable FieldOrigin
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> FieldOrigin -> c FieldOrigin)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c FieldOrigin)
-> (FieldOrigin -> Constr)
-> (FieldOrigin -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c FieldOrigin))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c FieldOrigin))
-> ((forall b. Data b => b -> b) -> FieldOrigin -> FieldOrigin)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldOrigin -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldOrigin -> r)
-> (forall u. (forall d. Data d => d -> u) -> FieldOrigin -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> FieldOrigin -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin)
-> Data FieldOrigin
FieldOrigin -> DataType
FieldOrigin -> Constr
(forall b. Data b => b -> b) -> FieldOrigin -> FieldOrigin
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldOrigin -> c FieldOrigin
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FieldOrigin
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> FieldOrigin -> u
forall u. (forall d. Data d => d -> u) -> FieldOrigin -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FieldOrigin -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FieldOrigin -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FieldOrigin
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldOrigin -> c FieldOrigin
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FieldOrigin)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FieldOrigin)
$cAggregateOrigin :: Constr
$cNoOrigin :: Constr
$tFieldOrigin :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin
gmapMp :: (forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin
gmapM :: (forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FieldOrigin -> m FieldOrigin
gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldOrigin -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FieldOrigin -> u
gmapQ :: (forall d. Data d => d -> u) -> FieldOrigin -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> FieldOrigin -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FieldOrigin -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FieldOrigin -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FieldOrigin -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FieldOrigin -> r
gmapT :: (forall b. Data b => b -> b) -> FieldOrigin -> FieldOrigin
$cgmapT :: (forall b. Data b => b -> b) -> FieldOrigin -> FieldOrigin
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FieldOrigin)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FieldOrigin)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c FieldOrigin)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FieldOrigin)
dataTypeOf :: FieldOrigin -> DataType
$cdataTypeOf :: FieldOrigin -> DataType
toConstr :: FieldOrigin -> Constr
$ctoConstr :: FieldOrigin -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FieldOrigin
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FieldOrigin
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldOrigin -> c FieldOrigin
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldOrigin -> c FieldOrigin
$cp1Data :: Typeable FieldOrigin
Data, FieldOrigin -> Q Exp
FieldOrigin -> Q (TExp FieldOrigin)
(FieldOrigin -> Q Exp)
-> (FieldOrigin -> Q (TExp FieldOrigin)) -> Lift FieldOrigin
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: FieldOrigin -> Q (TExp FieldOrigin)
$cliftTyped :: FieldOrigin -> Q (TExp FieldOrigin)
lift :: FieldOrigin -> Q Exp
$clift :: FieldOrigin -> Q Exp
Lift)

instance FromJSON FieldOrigin

instance Hashable FieldOrigin

instance Cacheable FieldOrigin

instance NFData FieldOrigin

aggregateProjectionsFieldOrigin :: Projection -> FieldOrigin
aggregateProjectionsFieldOrigin :: Projection -> FieldOrigin
aggregateProjectionsFieldOrigin = \case
  AggregateProjections Aliased (NonEmpty (Aliased Aggregate))
a -> [Aliased Aggregate] -> FieldOrigin
AggregateOrigin ([Aliased Aggregate] -> FieldOrigin)
-> (Aliased (NonEmpty (Aliased Aggregate)) -> [Aliased Aggregate])
-> Aliased (NonEmpty (Aliased Aggregate))
-> FieldOrigin
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NonEmpty (Aliased Aggregate) -> [Aliased Aggregate]
forall (t :: * -> *) a. Foldable t => t a -> [a]
toList (NonEmpty (Aliased Aggregate) -> [Aliased Aggregate])
-> (Aliased (NonEmpty (Aliased Aggregate))
    -> NonEmpty (Aliased Aggregate))
-> Aliased (NonEmpty (Aliased Aggregate))
-> [Aliased Aggregate]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Aliased (NonEmpty (Aliased Aggregate))
-> NonEmpty (Aliased Aggregate)
forall a. Aliased a -> a
aliasedThing (Aliased (NonEmpty (Aliased Aggregate)) -> FieldOrigin)
-> Aliased (NonEmpty (Aliased Aggregate)) -> FieldOrigin
forall a b. (a -> b) -> a -> b
$ Aliased (NonEmpty (Aliased Aggregate))
a
  AggregateProjection Aliased Aggregate
a -> [Aliased Aggregate] -> FieldOrigin
AggregateOrigin [Aliased Aggregate
a]
  Projection
_ -> FieldOrigin
NoOrigin

data Projection
  = ExpressionProjection (Aliased Expression)
  | FieldNameProjection (Aliased FieldName)
  | AggregateProjections (Aliased (NonEmpty (Aliased Aggregate)))
  | AggregateProjection (Aliased Aggregate)
  | StarProjection
  | ArrayAggProjection (Aliased ArrayAgg)
  | EntityProjection (Aliased [(FieldName, FieldOrigin)])
  | ArrayEntityProjection EntityAlias (Aliased [FieldName])
  | WindowProjection (Aliased WindowFunction)
  deriving (Projection -> Projection -> Bool
(Projection -> Projection -> Bool)
-> (Projection -> Projection -> Bool) -> Eq Projection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Projection -> Projection -> Bool
$c/= :: Projection -> Projection -> Bool
== :: Projection -> Projection -> Bool
$c== :: Projection -> Projection -> Bool
Eq, Int -> Projection -> ShowS
[Projection] -> ShowS
Projection -> String
(Int -> Projection -> ShowS)
-> (Projection -> String)
-> ([Projection] -> ShowS)
-> Show Projection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Projection] -> ShowS
$cshowList :: [Projection] -> ShowS
show :: Projection -> String
$cshow :: Projection -> String
showsPrec :: Int -> Projection -> ShowS
$cshowsPrec :: Int -> Projection -> ShowS
Show, (forall x. Projection -> Rep Projection x)
-> (forall x. Rep Projection x -> Projection) -> Generic Projection
forall x. Rep Projection x -> Projection
forall x. Projection -> Rep Projection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Projection x -> Projection
$cfrom :: forall x. Projection -> Rep Projection x
Generic, Typeable Projection
DataType
Constr
Typeable Projection
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Projection -> c Projection)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Projection)
-> (Projection -> Constr)
-> (Projection -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Projection))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Projection))
-> ((forall b. Data b => b -> b) -> Projection -> Projection)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Projection -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Projection -> r)
-> (forall u. (forall d. Data d => d -> u) -> Projection -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Projection -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Projection -> m Projection)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Projection -> m Projection)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Projection -> m Projection)
-> Data Projection
Projection -> DataType
Projection -> Constr
(forall b. Data b => b -> b) -> Projection -> Projection
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Projection -> c Projection
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Projection
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Projection -> u
forall u. (forall d. Data d => d -> u) -> Projection -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Projection -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Projection -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Projection -> m Projection
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Projection -> m Projection
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Projection
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Projection -> c Projection
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Projection)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Projection)
$cWindowProjection :: Constr
$cArrayEntityProjection :: Constr
$cEntityProjection :: Constr
$cArrayAggProjection :: Constr
$cStarProjection :: Constr
$cAggregateProjection :: Constr
$cAggregateProjections :: Constr
$cFieldNameProjection :: Constr
$cExpressionProjection :: Constr
$tProjection :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Projection -> m Projection
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Projection -> m Projection
gmapMp :: (forall d. Data d => d -> m d) -> Projection -> m Projection
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Projection -> m Projection
gmapM :: (forall d. Data d => d -> m d) -> Projection -> m Projection
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Projection -> m Projection
gmapQi :: Int -> (forall d. Data d => d -> u) -> Projection -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Projection -> u
gmapQ :: (forall d. Data d => d -> u) -> Projection -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Projection -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Projection -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Projection -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Projection -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Projection -> r
gmapT :: (forall b. Data b => b -> b) -> Projection -> Projection
$cgmapT :: (forall b. Data b => b -> b) -> Projection -> Projection
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Projection)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Projection)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Projection)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Projection)
dataTypeOf :: Projection -> DataType
$cdataTypeOf :: Projection -> DataType
toConstr :: Projection -> Constr
$ctoConstr :: Projection -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Projection
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Projection
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Projection -> c Projection
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Projection -> c Projection
$cp1Data :: Typeable Projection
Data, Projection -> Q Exp
Projection -> Q (TExp Projection)
(Projection -> Q Exp)
-> (Projection -> Q (TExp Projection)) -> Lift Projection
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Projection -> Q (TExp Projection)
$cliftTyped :: Projection -> Q (TExp Projection)
lift :: Projection -> Q Exp
$clift :: Projection -> Q Exp
Lift, Eq Projection
Eq Projection
-> (Projection -> Projection -> Ordering)
-> (Projection -> Projection -> Bool)
-> (Projection -> Projection -> Bool)
-> (Projection -> Projection -> Bool)
-> (Projection -> Projection -> Bool)
-> (Projection -> Projection -> Projection)
-> (Projection -> Projection -> Projection)
-> Ord Projection
Projection -> Projection -> Bool
Projection -> Projection -> Ordering
Projection -> Projection -> Projection
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Projection -> Projection -> Projection
$cmin :: Projection -> Projection -> Projection
max :: Projection -> Projection -> Projection
$cmax :: Projection -> Projection -> Projection
>= :: Projection -> Projection -> Bool
$c>= :: Projection -> Projection -> Bool
> :: Projection -> Projection -> Bool
$c> :: Projection -> Projection -> Bool
<= :: Projection -> Projection -> Bool
$c<= :: Projection -> Projection -> Bool
< :: Projection -> Projection -> Bool
$c< :: Projection -> Projection -> Bool
compare :: Projection -> Projection -> Ordering
$ccompare :: Projection -> Projection -> Ordering
$cp1Ord :: Eq Projection
Ord)

instance FromJSON Projection

instance Hashable Projection

instance Cacheable Projection

instance NFData Projection

data WindowFunction
  = -- | ROW_NUMBER() OVER(PARTITION BY field)
    RowNumberOverPartitionBy (NonEmpty FieldName) (Maybe (NonEmpty OrderBy))
  deriving (WindowFunction -> WindowFunction -> Bool
(WindowFunction -> WindowFunction -> Bool)
-> (WindowFunction -> WindowFunction -> Bool) -> Eq WindowFunction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WindowFunction -> WindowFunction -> Bool
$c/= :: WindowFunction -> WindowFunction -> Bool
== :: WindowFunction -> WindowFunction -> Bool
$c== :: WindowFunction -> WindowFunction -> Bool
Eq, Int -> WindowFunction -> ShowS
[WindowFunction] -> ShowS
WindowFunction -> String
(Int -> WindowFunction -> ShowS)
-> (WindowFunction -> String)
-> ([WindowFunction] -> ShowS)
-> Show WindowFunction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WindowFunction] -> ShowS
$cshowList :: [WindowFunction] -> ShowS
show :: WindowFunction -> String
$cshow :: WindowFunction -> String
showsPrec :: Int -> WindowFunction -> ShowS
$cshowsPrec :: Int -> WindowFunction -> ShowS
Show, (forall x. WindowFunction -> Rep WindowFunction x)
-> (forall x. Rep WindowFunction x -> WindowFunction)
-> Generic WindowFunction
forall x. Rep WindowFunction x -> WindowFunction
forall x. WindowFunction -> Rep WindowFunction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WindowFunction x -> WindowFunction
$cfrom :: forall x. WindowFunction -> Rep WindowFunction x
Generic, Typeable WindowFunction
DataType
Constr
Typeable WindowFunction
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> WindowFunction -> c WindowFunction)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c WindowFunction)
-> (WindowFunction -> Constr)
-> (WindowFunction -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c WindowFunction))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c WindowFunction))
-> ((forall b. Data b => b -> b)
    -> WindowFunction -> WindowFunction)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> WindowFunction -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> WindowFunction -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> WindowFunction -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> WindowFunction -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> WindowFunction -> m WindowFunction)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> WindowFunction -> m WindowFunction)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> WindowFunction -> m WindowFunction)
-> Data WindowFunction
WindowFunction -> DataType
WindowFunction -> Constr
(forall b. Data b => b -> b) -> WindowFunction -> WindowFunction
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WindowFunction -> c WindowFunction
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WindowFunction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> WindowFunction -> u
forall u. (forall d. Data d => d -> u) -> WindowFunction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WindowFunction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WindowFunction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> WindowFunction -> m WindowFunction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> WindowFunction -> m WindowFunction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WindowFunction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WindowFunction -> c WindowFunction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WindowFunction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WindowFunction)
$cRowNumberOverPartitionBy :: Constr
$tWindowFunction :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> WindowFunction -> m WindowFunction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> WindowFunction -> m WindowFunction
gmapMp :: (forall d. Data d => d -> m d)
-> WindowFunction -> m WindowFunction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> WindowFunction -> m WindowFunction
gmapM :: (forall d. Data d => d -> m d)
-> WindowFunction -> m WindowFunction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> WindowFunction -> m WindowFunction
gmapQi :: Int -> (forall d. Data d => d -> u) -> WindowFunction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> WindowFunction -> u
gmapQ :: (forall d. Data d => d -> u) -> WindowFunction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> WindowFunction -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WindowFunction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> WindowFunction -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WindowFunction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> WindowFunction -> r
gmapT :: (forall b. Data b => b -> b) -> WindowFunction -> WindowFunction
$cgmapT :: (forall b. Data b => b -> b) -> WindowFunction -> WindowFunction
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WindowFunction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c WindowFunction)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c WindowFunction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c WindowFunction)
dataTypeOf :: WindowFunction -> DataType
$cdataTypeOf :: WindowFunction -> DataType
toConstr :: WindowFunction -> Constr
$ctoConstr :: WindowFunction -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WindowFunction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c WindowFunction
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WindowFunction -> c WindowFunction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> WindowFunction -> c WindowFunction
$cp1Data :: Typeable WindowFunction
Data, WindowFunction -> Q Exp
WindowFunction -> Q (TExp WindowFunction)
(WindowFunction -> Q Exp)
-> (WindowFunction -> Q (TExp WindowFunction))
-> Lift WindowFunction
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: WindowFunction -> Q (TExp WindowFunction)
$cliftTyped :: WindowFunction -> Q (TExp WindowFunction)
lift :: WindowFunction -> Q Exp
$clift :: WindowFunction -> Q Exp
Lift, Eq WindowFunction
Eq WindowFunction
-> (WindowFunction -> WindowFunction -> Ordering)
-> (WindowFunction -> WindowFunction -> Bool)
-> (WindowFunction -> WindowFunction -> Bool)
-> (WindowFunction -> WindowFunction -> Bool)
-> (WindowFunction -> WindowFunction -> Bool)
-> (WindowFunction -> WindowFunction -> WindowFunction)
-> (WindowFunction -> WindowFunction -> WindowFunction)
-> Ord WindowFunction
WindowFunction -> WindowFunction -> Bool
WindowFunction -> WindowFunction -> Ordering
WindowFunction -> WindowFunction -> WindowFunction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: WindowFunction -> WindowFunction -> WindowFunction
$cmin :: WindowFunction -> WindowFunction -> WindowFunction
max :: WindowFunction -> WindowFunction -> WindowFunction
$cmax :: WindowFunction -> WindowFunction -> WindowFunction
>= :: WindowFunction -> WindowFunction -> Bool
$c>= :: WindowFunction -> WindowFunction -> Bool
> :: WindowFunction -> WindowFunction -> Bool
$c> :: WindowFunction -> WindowFunction -> Bool
<= :: WindowFunction -> WindowFunction -> Bool
$c<= :: WindowFunction -> WindowFunction -> Bool
< :: WindowFunction -> WindowFunction -> Bool
$c< :: WindowFunction -> WindowFunction -> Bool
compare :: WindowFunction -> WindowFunction -> Ordering
$ccompare :: WindowFunction -> WindowFunction -> Ordering
$cp1Ord :: Eq WindowFunction
Ord)

instance FromJSON WindowFunction

instance Hashable WindowFunction

instance Cacheable WindowFunction

instance ToJSON WindowFunction

instance NFData WindowFunction

data Join = Join
  { Join -> JoinSource
joinSource :: JoinSource,
    Join -> EntityAlias
joinAlias :: EntityAlias,
    Join -> [(FieldName, FieldName)]
joinOn :: [(FieldName, FieldName)],
    Join -> JoinProvenance
joinProvenance :: JoinProvenance,
    Join -> Text
joinFieldName :: Text,
    Join -> Maybe Text
joinExtractPath :: Maybe Text,
    Join -> EntityAlias
joinRightTable :: EntityAlias
  }
  deriving (Join -> Join -> Bool
(Join -> Join -> Bool) -> (Join -> Join -> Bool) -> Eq Join
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Join -> Join -> Bool
$c/= :: Join -> Join -> Bool
== :: Join -> Join -> Bool
$c== :: Join -> Join -> Bool
Eq, Eq Join
Eq Join
-> (Join -> Join -> Ordering)
-> (Join -> Join -> Bool)
-> (Join -> Join -> Bool)
-> (Join -> Join -> Bool)
-> (Join -> Join -> Bool)
-> (Join -> Join -> Join)
-> (Join -> Join -> Join)
-> Ord Join
Join -> Join -> Bool
Join -> Join -> Ordering
Join -> Join -> Join
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Join -> Join -> Join
$cmin :: Join -> Join -> Join
max :: Join -> Join -> Join
$cmax :: Join -> Join -> Join
>= :: Join -> Join -> Bool
$c>= :: Join -> Join -> Bool
> :: Join -> Join -> Bool
$c> :: Join -> Join -> Bool
<= :: Join -> Join -> Bool
$c<= :: Join -> Join -> Bool
< :: Join -> Join -> Bool
$c< :: Join -> Join -> Bool
compare :: Join -> Join -> Ordering
$ccompare :: Join -> Join -> Ordering
$cp1Ord :: Eq Join
Ord, Int -> Join -> ShowS
[Join] -> ShowS
Join -> String
(Int -> Join -> ShowS)
-> (Join -> String) -> ([Join] -> ShowS) -> Show Join
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Join] -> ShowS
$cshowList :: [Join] -> ShowS
show :: Join -> String
$cshow :: Join -> String
showsPrec :: Int -> Join -> ShowS
$cshowsPrec :: Int -> Join -> ShowS
Show, (forall x. Join -> Rep Join x)
-> (forall x. Rep Join x -> Join) -> Generic Join
forall x. Rep Join x -> Join
forall x. Join -> Rep Join x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Join x -> Join
$cfrom :: forall x. Join -> Rep Join x
Generic, Typeable Join
DataType
Constr
Typeable Join
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Join -> c Join)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Join)
-> (Join -> Constr)
-> (Join -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Join))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Join))
-> ((forall b. Data b => b -> b) -> Join -> Join)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Join -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Join -> r)
-> (forall u. (forall d. Data d => d -> u) -> Join -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Join -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Join -> m Join)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Join -> m Join)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Join -> m Join)
-> Data Join
Join -> DataType
Join -> Constr
(forall b. Data b => b -> b) -> Join -> Join
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Join -> c Join
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Join
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Join -> u
forall u. (forall d. Data d => d -> u) -> Join -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Join -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Join -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Join -> m Join
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Join -> m Join
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Join
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Join -> c Join
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Join)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Join)
$cJoin :: Constr
$tJoin :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Join -> m Join
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Join -> m Join
gmapMp :: (forall d. Data d => d -> m d) -> Join -> m Join
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Join -> m Join
gmapM :: (forall d. Data d => d -> m d) -> Join -> m Join
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Join -> m Join
gmapQi :: Int -> (forall d. Data d => d -> u) -> Join -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Join -> u
gmapQ :: (forall d. Data d => d -> u) -> Join -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Join -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Join -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Join -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Join -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Join -> r
gmapT :: (forall b. Data b => b -> b) -> Join -> Join
$cgmapT :: (forall b. Data b => b -> b) -> Join -> Join
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Join)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Join)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Join)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Join)
dataTypeOf :: Join -> DataType
$cdataTypeOf :: Join -> DataType
toConstr :: Join -> Constr
$ctoConstr :: Join -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Join
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Join
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Join -> c Join
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Join -> c Join
$cp1Data :: Typeable Join
Data, Join -> Q Exp
Join -> Q (TExp Join)
(Join -> Q Exp) -> (Join -> Q (TExp Join)) -> Lift Join
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Join -> Q (TExp Join)
$cliftTyped :: Join -> Q (TExp Join)
lift :: Join -> Q Exp
$clift :: Join -> Q Exp
Lift)

instance FromJSON Join

instance Hashable Join

instance Cacheable Join

instance NFData Join

data JoinProvenance
  = OrderByJoinProvenance
  | ObjectJoinProvenance [Text]
  | ArrayAggregateJoinProvenance [(Text, FieldOrigin)]
  | ArrayJoinProvenance [Text]
  | MultiplexProvenance
  deriving (JoinProvenance -> JoinProvenance -> Bool
(JoinProvenance -> JoinProvenance -> Bool)
-> (JoinProvenance -> JoinProvenance -> Bool) -> Eq JoinProvenance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JoinProvenance -> JoinProvenance -> Bool
$c/= :: JoinProvenance -> JoinProvenance -> Bool
== :: JoinProvenance -> JoinProvenance -> Bool
$c== :: JoinProvenance -> JoinProvenance -> Bool
Eq, Eq JoinProvenance
Eq JoinProvenance
-> (JoinProvenance -> JoinProvenance -> Ordering)
-> (JoinProvenance -> JoinProvenance -> Bool)
-> (JoinProvenance -> JoinProvenance -> Bool)
-> (JoinProvenance -> JoinProvenance -> Bool)
-> (JoinProvenance -> JoinProvenance -> Bool)
-> (JoinProvenance -> JoinProvenance -> JoinProvenance)
-> (JoinProvenance -> JoinProvenance -> JoinProvenance)
-> Ord JoinProvenance
JoinProvenance -> JoinProvenance -> Bool
JoinProvenance -> JoinProvenance -> Ordering
JoinProvenance -> JoinProvenance -> JoinProvenance
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: JoinProvenance -> JoinProvenance -> JoinProvenance
$cmin :: JoinProvenance -> JoinProvenance -> JoinProvenance
max :: JoinProvenance -> JoinProvenance -> JoinProvenance
$cmax :: JoinProvenance -> JoinProvenance -> JoinProvenance
>= :: JoinProvenance -> JoinProvenance -> Bool
$c>= :: JoinProvenance -> JoinProvenance -> Bool
> :: JoinProvenance -> JoinProvenance -> Bool
$c> :: JoinProvenance -> JoinProvenance -> Bool
<= :: JoinProvenance -> JoinProvenance -> Bool
$c<= :: JoinProvenance -> JoinProvenance -> Bool
< :: JoinProvenance -> JoinProvenance -> Bool
$c< :: JoinProvenance -> JoinProvenance -> Bool
compare :: JoinProvenance -> JoinProvenance -> Ordering
$ccompare :: JoinProvenance -> JoinProvenance -> Ordering
$cp1Ord :: Eq JoinProvenance
Ord, Int -> JoinProvenance -> ShowS
[JoinProvenance] -> ShowS
JoinProvenance -> String
(Int -> JoinProvenance -> ShowS)
-> (JoinProvenance -> String)
-> ([JoinProvenance] -> ShowS)
-> Show JoinProvenance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JoinProvenance] -> ShowS
$cshowList :: [JoinProvenance] -> ShowS
show :: JoinProvenance -> String
$cshow :: JoinProvenance -> String
showsPrec :: Int -> JoinProvenance -> ShowS
$cshowsPrec :: Int -> JoinProvenance -> ShowS
Show, (forall x. JoinProvenance -> Rep JoinProvenance x)
-> (forall x. Rep JoinProvenance x -> JoinProvenance)
-> Generic JoinProvenance
forall x. Rep JoinProvenance x -> JoinProvenance
forall x. JoinProvenance -> Rep JoinProvenance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JoinProvenance x -> JoinProvenance
$cfrom :: forall x. JoinProvenance -> Rep JoinProvenance x
Generic, Typeable JoinProvenance
DataType
Constr
Typeable JoinProvenance
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> JoinProvenance -> c JoinProvenance)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c JoinProvenance)
-> (JoinProvenance -> Constr)
-> (JoinProvenance -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c JoinProvenance))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c JoinProvenance))
-> ((forall b. Data b => b -> b)
    -> JoinProvenance -> JoinProvenance)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> JoinProvenance -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> JoinProvenance -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> JoinProvenance -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> JoinProvenance -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> JoinProvenance -> m JoinProvenance)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> JoinProvenance -> m JoinProvenance)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> JoinProvenance -> m JoinProvenance)
-> Data JoinProvenance
JoinProvenance -> DataType
JoinProvenance -> Constr
(forall b. Data b => b -> b) -> JoinProvenance -> JoinProvenance
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JoinProvenance -> c JoinProvenance
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JoinProvenance
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> JoinProvenance -> u
forall u. (forall d. Data d => d -> u) -> JoinProvenance -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JoinProvenance -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JoinProvenance -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> JoinProvenance -> m JoinProvenance
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> JoinProvenance -> m JoinProvenance
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JoinProvenance
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JoinProvenance -> c JoinProvenance
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c JoinProvenance)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c JoinProvenance)
$cMultiplexProvenance :: Constr
$cArrayJoinProvenance :: Constr
$cArrayAggregateJoinProvenance :: Constr
$cObjectJoinProvenance :: Constr
$cOrderByJoinProvenance :: Constr
$tJoinProvenance :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> JoinProvenance -> m JoinProvenance
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> JoinProvenance -> m JoinProvenance
gmapMp :: (forall d. Data d => d -> m d)
-> JoinProvenance -> m JoinProvenance
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> JoinProvenance -> m JoinProvenance
gmapM :: (forall d. Data d => d -> m d)
-> JoinProvenance -> m JoinProvenance
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> JoinProvenance -> m JoinProvenance
gmapQi :: Int -> (forall d. Data d => d -> u) -> JoinProvenance -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> JoinProvenance -> u
gmapQ :: (forall d. Data d => d -> u) -> JoinProvenance -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> JoinProvenance -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JoinProvenance -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JoinProvenance -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JoinProvenance -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JoinProvenance -> r
gmapT :: (forall b. Data b => b -> b) -> JoinProvenance -> JoinProvenance
$cgmapT :: (forall b. Data b => b -> b) -> JoinProvenance -> JoinProvenance
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c JoinProvenance)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c JoinProvenance)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c JoinProvenance)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c JoinProvenance)
dataTypeOf :: JoinProvenance -> DataType
$cdataTypeOf :: JoinProvenance -> DataType
toConstr :: JoinProvenance -> Constr
$ctoConstr :: JoinProvenance -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JoinProvenance
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JoinProvenance
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JoinProvenance -> c JoinProvenance
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JoinProvenance -> c JoinProvenance
$cp1Data :: Typeable JoinProvenance
Data, JoinProvenance -> Q Exp
JoinProvenance -> Q (TExp JoinProvenance)
(JoinProvenance -> Q Exp)
-> (JoinProvenance -> Q (TExp JoinProvenance))
-> Lift JoinProvenance
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: JoinProvenance -> Q (TExp JoinProvenance)
$cliftTyped :: JoinProvenance -> Q (TExp JoinProvenance)
lift :: JoinProvenance -> Q Exp
$clift :: JoinProvenance -> Q Exp
Lift)

instance FromJSON JoinProvenance

instance Hashable JoinProvenance

instance Cacheable JoinProvenance

instance NFData JoinProvenance

data JoinSource
  = JoinSelect Select
  -- We're not using existingJoins at the moment, which was used to
  -- avoid re-joining on the same table twice.
  deriving (JoinSource -> JoinSource -> Bool
(JoinSource -> JoinSource -> Bool)
-> (JoinSource -> JoinSource -> Bool) -> Eq JoinSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JoinSource -> JoinSource -> Bool
$c/= :: JoinSource -> JoinSource -> Bool
== :: JoinSource -> JoinSource -> Bool
$c== :: JoinSource -> JoinSource -> Bool
Eq, Eq JoinSource
Eq JoinSource
-> (JoinSource -> JoinSource -> Ordering)
-> (JoinSource -> JoinSource -> Bool)
-> (JoinSource -> JoinSource -> Bool)
-> (JoinSource -> JoinSource -> Bool)
-> (JoinSource -> JoinSource -> Bool)
-> (JoinSource -> JoinSource -> JoinSource)
-> (JoinSource -> JoinSource -> JoinSource)
-> Ord JoinSource
JoinSource -> JoinSource -> Bool
JoinSource -> JoinSource -> Ordering
JoinSource -> JoinSource -> JoinSource
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: JoinSource -> JoinSource -> JoinSource
$cmin :: JoinSource -> JoinSource -> JoinSource
max :: JoinSource -> JoinSource -> JoinSource
$cmax :: JoinSource -> JoinSource -> JoinSource
>= :: JoinSource -> JoinSource -> Bool
$c>= :: JoinSource -> JoinSource -> Bool
> :: JoinSource -> JoinSource -> Bool
$c> :: JoinSource -> JoinSource -> Bool
<= :: JoinSource -> JoinSource -> Bool
$c<= :: JoinSource -> JoinSource -> Bool
< :: JoinSource -> JoinSource -> Bool
$c< :: JoinSource -> JoinSource -> Bool
compare :: JoinSource -> JoinSource -> Ordering
$ccompare :: JoinSource -> JoinSource -> Ordering
$cp1Ord :: Eq JoinSource
Ord, Int -> JoinSource -> ShowS
[JoinSource] -> ShowS
JoinSource -> String
(Int -> JoinSource -> ShowS)
-> (JoinSource -> String)
-> ([JoinSource] -> ShowS)
-> Show JoinSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JoinSource] -> ShowS
$cshowList :: [JoinSource] -> ShowS
show :: JoinSource -> String
$cshow :: JoinSource -> String
showsPrec :: Int -> JoinSource -> ShowS
$cshowsPrec :: Int -> JoinSource -> ShowS
Show, (forall x. JoinSource -> Rep JoinSource x)
-> (forall x. Rep JoinSource x -> JoinSource) -> Generic JoinSource
forall x. Rep JoinSource x -> JoinSource
forall x. JoinSource -> Rep JoinSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JoinSource x -> JoinSource
$cfrom :: forall x. JoinSource -> Rep JoinSource x
Generic, Typeable JoinSource
DataType
Constr
Typeable JoinSource
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> JoinSource -> c JoinSource)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c JoinSource)
-> (JoinSource -> Constr)
-> (JoinSource -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c JoinSource))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c JoinSource))
-> ((forall b. Data b => b -> b) -> JoinSource -> JoinSource)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> JoinSource -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> JoinSource -> r)
-> (forall u. (forall d. Data d => d -> u) -> JoinSource -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> JoinSource -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> JoinSource -> m JoinSource)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> JoinSource -> m JoinSource)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> JoinSource -> m JoinSource)
-> Data JoinSource
JoinSource -> DataType
JoinSource -> Constr
(forall b. Data b => b -> b) -> JoinSource -> JoinSource
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JoinSource -> c JoinSource
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JoinSource
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> JoinSource -> u
forall u. (forall d. Data d => d -> u) -> JoinSource -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JoinSource -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JoinSource -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> JoinSource -> m JoinSource
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JoinSource -> m JoinSource
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JoinSource
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JoinSource -> c JoinSource
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c JoinSource)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoinSource)
$cJoinSelect :: Constr
$tJoinSource :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> JoinSource -> m JoinSource
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JoinSource -> m JoinSource
gmapMp :: (forall d. Data d => d -> m d) -> JoinSource -> m JoinSource
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JoinSource -> m JoinSource
gmapM :: (forall d. Data d => d -> m d) -> JoinSource -> m JoinSource
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> JoinSource -> m JoinSource
gmapQi :: Int -> (forall d. Data d => d -> u) -> JoinSource -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> JoinSource -> u
gmapQ :: (forall d. Data d => d -> u) -> JoinSource -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> JoinSource -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JoinSource -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JoinSource -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JoinSource -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JoinSource -> r
gmapT :: (forall b. Data b => b -> b) -> JoinSource -> JoinSource
$cgmapT :: (forall b. Data b => b -> b) -> JoinSource -> JoinSource
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoinSource)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JoinSource)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c JoinSource)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c JoinSource)
dataTypeOf :: JoinSource -> DataType
$cdataTypeOf :: JoinSource -> DataType
toConstr :: JoinSource -> Constr
$ctoConstr :: JoinSource -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JoinSource
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JoinSource
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JoinSource -> c JoinSource
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JoinSource -> c JoinSource
$cp1Data :: Typeable JoinSource
Data, JoinSource -> Q Exp
JoinSource -> Q (TExp JoinSource)
(JoinSource -> Q Exp)
-> (JoinSource -> Q (TExp JoinSource)) -> Lift JoinSource
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: JoinSource -> Q (TExp JoinSource)
$cliftTyped :: JoinSource -> Q (TExp JoinSource)
lift :: JoinSource -> Q Exp
$clift :: JoinSource -> Q Exp
Lift)

instance FromJSON JoinSource

instance Hashable JoinSource

instance Cacheable JoinSource

instance NFData JoinSource

newtype Where
  = Where [Expression]
  deriving (Where -> ()
(Where -> ()) -> NFData Where
forall a. (a -> ()) -> NFData a
rnf :: Where -> ()
$crnf :: Where -> ()
NFData, Where -> Where -> Bool
(Where -> Where -> Bool) -> (Where -> Where -> Bool) -> Eq Where
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Where -> Where -> Bool
$c/= :: Where -> Where -> Bool
== :: Where -> Where -> Bool
$c== :: Where -> Where -> Bool
Eq, Eq Where
Eq Where
-> (Where -> Where -> Ordering)
-> (Where -> Where -> Bool)
-> (Where -> Where -> Bool)
-> (Where -> Where -> Bool)
-> (Where -> Where -> Bool)
-> (Where -> Where -> Where)
-> (Where -> Where -> Where)
-> Ord Where
Where -> Where -> Bool
Where -> Where -> Ordering
Where -> Where -> Where
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Where -> Where -> Where
$cmin :: Where -> Where -> Where
max :: Where -> Where -> Where
$cmax :: Where -> Where -> Where
>= :: Where -> Where -> Bool
$c>= :: Where -> Where -> Bool
> :: Where -> Where -> Bool
$c> :: Where -> Where -> Bool
<= :: Where -> Where -> Bool
$c<= :: Where -> Where -> Bool
< :: Where -> Where -> Bool
$c< :: Where -> Where -> Bool
compare :: Where -> Where -> Ordering
$ccompare :: Where -> Where -> Ordering
$cp1Ord :: Eq Where
Ord, Int -> Where -> ShowS
[Where] -> ShowS
Where -> String
(Int -> Where -> ShowS)
-> (Where -> String) -> ([Where] -> ShowS) -> Show Where
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Where] -> ShowS
$cshowList :: [Where] -> ShowS
show :: Where -> String
$cshow :: Where -> String
showsPrec :: Int -> Where -> ShowS
$cshowsPrec :: Int -> Where -> ShowS
Show, (forall x. Where -> Rep Where x)
-> (forall x. Rep Where x -> Where) -> Generic Where
forall x. Rep Where x -> Where
forall x. Where -> Rep Where x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Where x -> Where
$cfrom :: forall x. Where -> Rep Where x
Generic, Typeable Where
DataType
Constr
Typeable Where
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Where -> c Where)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Where)
-> (Where -> Constr)
-> (Where -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Where))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Where))
-> ((forall b. Data b => b -> b) -> Where -> Where)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Where -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Where -> r)
-> (forall u. (forall d. Data d => d -> u) -> Where -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Where -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Where -> m Where)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Where -> m Where)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Where -> m Where)
-> Data Where
Where -> DataType
Where -> Constr
(forall b. Data b => b -> b) -> Where -> Where
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Where -> c Where
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Where
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Where -> u
forall u. (forall d. Data d => d -> u) -> Where -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Where -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Where -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Where -> m Where
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Where -> m Where
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Where
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Where -> c Where
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Where)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Where)
$cWhere :: Constr
$tWhere :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Where -> m Where
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Where -> m Where
gmapMp :: (forall d. Data d => d -> m d) -> Where -> m Where
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Where -> m Where
gmapM :: (forall d. Data d => d -> m d) -> Where -> m Where
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Where -> m Where
gmapQi :: Int -> (forall d. Data d => d -> u) -> Where -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Where -> u
gmapQ :: (forall d. Data d => d -> u) -> Where -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Where -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Where -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Where -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Where -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Where -> r
gmapT :: (forall b. Data b => b -> b) -> Where -> Where
$cgmapT :: (forall b. Data b => b -> b) -> Where -> Where
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Where)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Where)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Where)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Where)
dataTypeOf :: Where -> DataType
$cdataTypeOf :: Where -> DataType
toConstr :: Where -> Constr
$ctoConstr :: Where -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Where
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Where
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Where -> c Where
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Where -> c Where
$cp1Data :: Typeable Where
Data, Where -> Q Exp
Where -> Q (TExp Where)
(Where -> Q Exp) -> (Where -> Q (TExp Where)) -> Lift Where
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Where -> Q (TExp Where)
$cliftTyped :: Where -> Q (TExp Where)
lift :: Where -> Q Exp
$clift :: Where -> Q Exp
Lift, Value -> Parser [Where]
Value -> Parser Where
(Value -> Parser Where)
-> (Value -> Parser [Where]) -> FromJSON Where
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Where]
$cparseJSONList :: Value -> Parser [Where]
parseJSON :: Value -> Parser Where
$cparseJSON :: Value -> Parser Where
FromJSON, Int -> Where -> Int
Where -> Int
(Int -> Where -> Int) -> (Where -> Int) -> Hashable Where
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Where -> Int
$chash :: Where -> Int
hashWithSalt :: Int -> Where -> Int
$chashWithSalt :: Int -> Where -> Int
Hashable, Eq Where
Eq Where -> (Accesses -> Where -> Where -> Bool) -> Cacheable Where
Accesses -> Where -> Where -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> Where -> Where -> Bool
$cunchanged :: Accesses -> Where -> Where -> Bool
$cp1Cacheable :: Eq Where
Cacheable, b -> Where -> Where
NonEmpty Where -> Where
Where -> Where -> Where
(Where -> Where -> Where)
-> (NonEmpty Where -> Where)
-> (forall b. Integral b => b -> Where -> Where)
-> Semigroup Where
forall b. Integral b => b -> Where -> Where
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
stimes :: b -> Where -> Where
$cstimes :: forall b. Integral b => b -> Where -> Where
sconcat :: NonEmpty Where -> Where
$csconcat :: NonEmpty Where -> Where
<> :: Where -> Where -> Where
$c<> :: Where -> Where -> Where
Semigroup, Semigroup Where
Where
Semigroup Where
-> Where
-> (Where -> Where -> Where)
-> ([Where] -> Where)
-> Monoid Where
[Where] -> Where
Where -> Where -> Where
forall a.
Semigroup a -> a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
mconcat :: [Where] -> Where
$cmconcat :: [Where] -> Where
mappend :: Where -> Where -> Where
$cmappend :: Where -> Where -> Where
mempty :: Where
$cmempty :: Where
$cp1Monoid :: Semigroup Where
Monoid)

data Cardinality
  = Many
  | One
  deriving (Cardinality -> Cardinality -> Bool
(Cardinality -> Cardinality -> Bool)
-> (Cardinality -> Cardinality -> Bool) -> Eq Cardinality
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Cardinality -> Cardinality -> Bool
$c/= :: Cardinality -> Cardinality -> Bool
== :: Cardinality -> Cardinality -> Bool
$c== :: Cardinality -> Cardinality -> Bool
Eq, Eq Cardinality
Eq Cardinality
-> (Cardinality -> Cardinality -> Ordering)
-> (Cardinality -> Cardinality -> Bool)
-> (Cardinality -> Cardinality -> Bool)
-> (Cardinality -> Cardinality -> Bool)
-> (Cardinality -> Cardinality -> Bool)
-> (Cardinality -> Cardinality -> Cardinality)
-> (Cardinality -> Cardinality -> Cardinality)
-> Ord Cardinality
Cardinality -> Cardinality -> Bool
Cardinality -> Cardinality -> Ordering
Cardinality -> Cardinality -> Cardinality
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Cardinality -> Cardinality -> Cardinality
$cmin :: Cardinality -> Cardinality -> Cardinality
max :: Cardinality -> Cardinality -> Cardinality
$cmax :: Cardinality -> Cardinality -> Cardinality
>= :: Cardinality -> Cardinality -> Bool
$c>= :: Cardinality -> Cardinality -> Bool
> :: Cardinality -> Cardinality -> Bool
$c> :: Cardinality -> Cardinality -> Bool
<= :: Cardinality -> Cardinality -> Bool
$c<= :: Cardinality -> Cardinality -> Bool
< :: Cardinality -> Cardinality -> Bool
$c< :: Cardinality -> Cardinality -> Bool
compare :: Cardinality -> Cardinality -> Ordering
$ccompare :: Cardinality -> Cardinality -> Ordering
$cp1Ord :: Eq Cardinality
Ord, Int -> Cardinality -> ShowS
[Cardinality] -> ShowS
Cardinality -> String
(Int -> Cardinality -> ShowS)
-> (Cardinality -> String)
-> ([Cardinality] -> ShowS)
-> Show Cardinality
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Cardinality] -> ShowS
$cshowList :: [Cardinality] -> ShowS
show :: Cardinality -> String
$cshow :: Cardinality -> String
showsPrec :: Int -> Cardinality -> ShowS
$cshowsPrec :: Int -> Cardinality -> ShowS
Show, (forall x. Cardinality -> Rep Cardinality x)
-> (forall x. Rep Cardinality x -> Cardinality)
-> Generic Cardinality
forall x. Rep Cardinality x -> Cardinality
forall x. Cardinality -> Rep Cardinality x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Cardinality x -> Cardinality
$cfrom :: forall x. Cardinality -> Rep Cardinality x
Generic, Typeable Cardinality
DataType
Constr
Typeable Cardinality
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Cardinality -> c Cardinality)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Cardinality)
-> (Cardinality -> Constr)
-> (Cardinality -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Cardinality))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Cardinality))
-> ((forall b. Data b => b -> b) -> Cardinality -> Cardinality)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Cardinality -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Cardinality -> r)
-> (forall u. (forall d. Data d => d -> u) -> Cardinality -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Cardinality -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Cardinality -> m Cardinality)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Cardinality -> m Cardinality)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Cardinality -> m Cardinality)
-> Data Cardinality
Cardinality -> DataType
Cardinality -> Constr
(forall b. Data b => b -> b) -> Cardinality -> Cardinality
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Cardinality -> c Cardinality
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Cardinality
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Cardinality -> u
forall u. (forall d. Data d => d -> u) -> Cardinality -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Cardinality -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Cardinality -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Cardinality -> m Cardinality
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Cardinality -> m Cardinality
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Cardinality
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Cardinality -> c Cardinality
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Cardinality)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Cardinality)
$cOne :: Constr
$cMany :: Constr
$tCardinality :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Cardinality -> m Cardinality
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Cardinality -> m Cardinality
gmapMp :: (forall d. Data d => d -> m d) -> Cardinality -> m Cardinality
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Cardinality -> m Cardinality
gmapM :: (forall d. Data d => d -> m d) -> Cardinality -> m Cardinality
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Cardinality -> m Cardinality
gmapQi :: Int -> (forall d. Data d => d -> u) -> Cardinality -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Cardinality -> u
gmapQ :: (forall d. Data d => d -> u) -> Cardinality -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Cardinality -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Cardinality -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Cardinality -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Cardinality -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Cardinality -> r
gmapT :: (forall b. Data b => b -> b) -> Cardinality -> Cardinality
$cgmapT :: (forall b. Data b => b -> b) -> Cardinality -> Cardinality
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Cardinality)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Cardinality)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Cardinality)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Cardinality)
dataTypeOf :: Cardinality -> DataType
$cdataTypeOf :: Cardinality -> DataType
toConstr :: Cardinality -> Constr
$ctoConstr :: Cardinality -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Cardinality
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Cardinality
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Cardinality -> c Cardinality
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Cardinality -> c Cardinality
$cp1Data :: Typeable Cardinality
Data, Cardinality -> Q Exp
Cardinality -> Q (TExp Cardinality)
(Cardinality -> Q Exp)
-> (Cardinality -> Q (TExp Cardinality)) -> Lift Cardinality
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Cardinality -> Q (TExp Cardinality)
$cliftTyped :: Cardinality -> Q (TExp Cardinality)
lift :: Cardinality -> Q Exp
$clift :: Cardinality -> Q Exp
Lift)

instance FromJSON Cardinality

instance Hashable Cardinality

instance Cacheable Cardinality

instance ToJSON Cardinality

instance NFData Cardinality

data AsStruct
  = NoAsStruct
  | AsStruct
  deriving (AsStruct -> AsStruct -> Bool
(AsStruct -> AsStruct -> Bool)
-> (AsStruct -> AsStruct -> Bool) -> Eq AsStruct
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AsStruct -> AsStruct -> Bool
$c/= :: AsStruct -> AsStruct -> Bool
== :: AsStruct -> AsStruct -> Bool
$c== :: AsStruct -> AsStruct -> Bool
Eq, Eq AsStruct
Eq AsStruct
-> (AsStruct -> AsStruct -> Ordering)
-> (AsStruct -> AsStruct -> Bool)
-> (AsStruct -> AsStruct -> Bool)
-> (AsStruct -> AsStruct -> Bool)
-> (AsStruct -> AsStruct -> Bool)
-> (AsStruct -> AsStruct -> AsStruct)
-> (AsStruct -> AsStruct -> AsStruct)
-> Ord AsStruct
AsStruct -> AsStruct -> Bool
AsStruct -> AsStruct -> Ordering
AsStruct -> AsStruct -> AsStruct
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: AsStruct -> AsStruct -> AsStruct
$cmin :: AsStruct -> AsStruct -> AsStruct
max :: AsStruct -> AsStruct -> AsStruct
$cmax :: AsStruct -> AsStruct -> AsStruct
>= :: AsStruct -> AsStruct -> Bool
$c>= :: AsStruct -> AsStruct -> Bool
> :: AsStruct -> AsStruct -> Bool
$c> :: AsStruct -> AsStruct -> Bool
<= :: AsStruct -> AsStruct -> Bool
$c<= :: AsStruct -> AsStruct -> Bool
< :: AsStruct -> AsStruct -> Bool
$c< :: AsStruct -> AsStruct -> Bool
compare :: AsStruct -> AsStruct -> Ordering
$ccompare :: AsStruct -> AsStruct -> Ordering
$cp1Ord :: Eq AsStruct
Ord, Int -> AsStruct -> ShowS
[AsStruct] -> ShowS
AsStruct -> String
(Int -> AsStruct -> ShowS)
-> (AsStruct -> String) -> ([AsStruct] -> ShowS) -> Show AsStruct
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AsStruct] -> ShowS
$cshowList :: [AsStruct] -> ShowS
show :: AsStruct -> String
$cshow :: AsStruct -> String
showsPrec :: Int -> AsStruct -> ShowS
$cshowsPrec :: Int -> AsStruct -> ShowS
Show, (forall x. AsStruct -> Rep AsStruct x)
-> (forall x. Rep AsStruct x -> AsStruct) -> Generic AsStruct
forall x. Rep AsStruct x -> AsStruct
forall x. AsStruct -> Rep AsStruct x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AsStruct x -> AsStruct
$cfrom :: forall x. AsStruct -> Rep AsStruct x
Generic, Typeable AsStruct
DataType
Constr
Typeable AsStruct
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> AsStruct -> c AsStruct)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c AsStruct)
-> (AsStruct -> Constr)
-> (AsStruct -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c AsStruct))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AsStruct))
-> ((forall b. Data b => b -> b) -> AsStruct -> AsStruct)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> AsStruct -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> AsStruct -> r)
-> (forall u. (forall d. Data d => d -> u) -> AsStruct -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> AsStruct -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct)
-> Data AsStruct
AsStruct -> DataType
AsStruct -> Constr
(forall b. Data b => b -> b) -> AsStruct -> AsStruct
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AsStruct -> c AsStruct
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c AsStruct
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> AsStruct -> u
forall u. (forall d. Data d => d -> u) -> AsStruct -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AsStruct -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AsStruct -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> AsStruct -> m AsStruct
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AsStruct -> m AsStruct
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c AsStruct
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AsStruct -> c AsStruct
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c AsStruct)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AsStruct)
$cAsStruct :: Constr
$cNoAsStruct :: Constr
$tAsStruct :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AsStruct -> m AsStruct
gmapMp :: (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AsStruct -> m AsStruct
gmapM :: (forall d. Data d => d -> m d) -> AsStruct -> m AsStruct
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> AsStruct -> m AsStruct
gmapQi :: Int -> (forall d. Data d => d -> u) -> AsStruct -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> AsStruct -> u
gmapQ :: (forall d. Data d => d -> u) -> AsStruct -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> AsStruct -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AsStruct -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AsStruct -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AsStruct -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AsStruct -> r
gmapT :: (forall b. Data b => b -> b) -> AsStruct -> AsStruct
$cgmapT :: (forall b. Data b => b -> b) -> AsStruct -> AsStruct
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AsStruct)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AsStruct)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c AsStruct)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c AsStruct)
dataTypeOf :: AsStruct -> DataType
$cdataTypeOf :: AsStruct -> DataType
toConstr :: AsStruct -> Constr
$ctoConstr :: AsStruct -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c AsStruct
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c AsStruct
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AsStruct -> c AsStruct
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AsStruct -> c AsStruct
$cp1Data :: Typeable AsStruct
Data, AsStruct -> Q Exp
AsStruct -> Q (TExp AsStruct)
(AsStruct -> Q Exp)
-> (AsStruct -> Q (TExp AsStruct)) -> Lift AsStruct
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: AsStruct -> Q (TExp AsStruct)
$cliftTyped :: AsStruct -> Q (TExp AsStruct)
lift :: AsStruct -> Q Exp
$clift :: AsStruct -> Q Exp
Lift)

instance FromJSON AsStruct

instance Hashable AsStruct

instance Cacheable AsStruct

instance ToJSON AsStruct

instance NFData AsStruct

data Top
  = NoTop
  | Top Int.Int64
  deriving (Top -> Top -> Bool
(Top -> Top -> Bool) -> (Top -> Top -> Bool) -> Eq Top
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Top -> Top -> Bool
$c/= :: Top -> Top -> Bool
== :: Top -> Top -> Bool
$c== :: Top -> Top -> Bool
Eq, Eq Top
Eq Top
-> (Top -> Top -> Ordering)
-> (Top -> Top -> Bool)
-> (Top -> Top -> Bool)
-> (Top -> Top -> Bool)
-> (Top -> Top -> Bool)
-> (Top -> Top -> Top)
-> (Top -> Top -> Top)
-> Ord Top
Top -> Top -> Bool
Top -> Top -> Ordering
Top -> Top -> Top
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Top -> Top -> Top
$cmin :: Top -> Top -> Top
max :: Top -> Top -> Top
$cmax :: Top -> Top -> Top
>= :: Top -> Top -> Bool
$c>= :: Top -> Top -> Bool
> :: Top -> Top -> Bool
$c> :: Top -> Top -> Bool
<= :: Top -> Top -> Bool
$c<= :: Top -> Top -> Bool
< :: Top -> Top -> Bool
$c< :: Top -> Top -> Bool
compare :: Top -> Top -> Ordering
$ccompare :: Top -> Top -> Ordering
$cp1Ord :: Eq Top
Ord, Int -> Top -> ShowS
[Top] -> ShowS
Top -> String
(Int -> Top -> ShowS)
-> (Top -> String) -> ([Top] -> ShowS) -> Show Top
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Top] -> ShowS
$cshowList :: [Top] -> ShowS
show :: Top -> String
$cshow :: Top -> String
showsPrec :: Int -> Top -> ShowS
$cshowsPrec :: Int -> Top -> ShowS
Show, (forall x. Top -> Rep Top x)
-> (forall x. Rep Top x -> Top) -> Generic Top
forall x. Rep Top x -> Top
forall x. Top -> Rep Top x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Top x -> Top
$cfrom :: forall x. Top -> Rep Top x
Generic, Typeable Top
DataType
Constr
Typeable Top
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Top -> c Top)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Top)
-> (Top -> Constr)
-> (Top -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Top))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Top))
-> ((forall b. Data b => b -> b) -> Top -> Top)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Top -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Top -> r)
-> (forall u. (forall d. Data d => d -> u) -> Top -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Top -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Top -> m Top)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Top -> m Top)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Top -> m Top)
-> Data Top
Top -> DataType
Top -> Constr
(forall b. Data b => b -> b) -> Top -> Top
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Top -> c Top
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Top
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Top -> u
forall u. (forall d. Data d => d -> u) -> Top -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Top -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Top -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Top -> m Top
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Top -> m Top
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Top
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Top -> c Top
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Top)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Top)
$cTop :: Constr
$cNoTop :: Constr
$tTop :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Top -> m Top
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Top -> m Top
gmapMp :: (forall d. Data d => d -> m d) -> Top -> m Top
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Top -> m Top
gmapM :: (forall d. Data d => d -> m d) -> Top -> m Top
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Top -> m Top
gmapQi :: Int -> (forall d. Data d => d -> u) -> Top -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Top -> u
gmapQ :: (forall d. Data d => d -> u) -> Top -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Top -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Top -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Top -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Top -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Top -> r
gmapT :: (forall b. Data b => b -> b) -> Top -> Top
$cgmapT :: (forall b. Data b => b -> b) -> Top -> Top
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Top)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Top)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Top)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Top)
dataTypeOf :: Top -> DataType
$cdataTypeOf :: Top -> DataType
toConstr :: Top -> Constr
$ctoConstr :: Top -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Top
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Top
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Top -> c Top
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Top -> c Top
$cp1Data :: Typeable Top
Data, Top -> Q Exp
Top -> Q (TExp Top)
(Top -> Q Exp) -> (Top -> Q (TExp Top)) -> Lift Top
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Top -> Q (TExp Top)
$cliftTyped :: Top -> Q (TExp Top)
lift :: Top -> Q Exp
$clift :: Top -> Q Exp
Lift)

instance FromJSON Top

instance Hashable Top

instance Cacheable Top

instance ToJSON Top

instance NFData Top

instance Monoid Top where
  mempty :: Top
mempty = Top
NoTop

instance Semigroup Top where
  (<>) :: Top -> Top -> Top
  <> :: Top -> Top -> Top
(<>) Top
NoTop Top
x = Top
x
  (<>) Top
x Top
NoTop = Top
x
  (<>) (Top Int64
x) (Top Int64
y) = Int64 -> Top
Top (Int64 -> Int64 -> Int64
forall a. Ord a => a -> a -> a
min Int64
x Int64
y)

data Expression
  = ValueExpression Value
  | InExpression Expression Value
  | AndExpression [Expression]
  | OrExpression [Expression]
  | NotExpression Expression
  | ExistsExpression Select
  | SelectExpression Select
  | IsNullExpression Expression
  | IsNotNullExpression Expression
  | ColumnExpression FieldName
  | EqualExpression Expression Expression
  | NotEqualExpression Expression Expression
  | -- | This one acts like a "cast to JSON" and makes SQL Server
    -- behave like it knows your field is JSON and not double-encode
    -- it.
    JsonQueryExpression Expression
  | ToStringExpression Expression
  | -- | This is for getting actual atomic values out of a JSON
    -- string.
    JsonValueExpression Expression JsonPath
  | OpExpression Op Expression Expression
  | ListExpression [Expression]
  | CastExpression Expression ScalarType
  | FunctionExpression FunctionName [Expression]
  | ConditionalProjection Expression FieldName
  | -- | A function input argument expression with argument name
    -- `argument_name` => 'argument_value'
    FunctionNamedArgument Text Expression
  deriving (Expression -> Expression -> Bool
(Expression -> Expression -> Bool)
-> (Expression -> Expression -> Bool) -> Eq Expression
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Expression -> Expression -> Bool
$c/= :: Expression -> Expression -> Bool
== :: Expression -> Expression -> Bool
$c== :: Expression -> Expression -> Bool
Eq, Eq Expression
Eq Expression
-> (Expression -> Expression -> Ordering)
-> (Expression -> Expression -> Bool)
-> (Expression -> Expression -> Bool)
-> (Expression -> Expression -> Bool)
-> (Expression -> Expression -> Bool)
-> (Expression -> Expression -> Expression)
-> (Expression -> Expression -> Expression)
-> Ord Expression
Expression -> Expression -> Bool
Expression -> Expression -> Ordering
Expression -> Expression -> Expression
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Expression -> Expression -> Expression
$cmin :: Expression -> Expression -> Expression
max :: Expression -> Expression -> Expression
$cmax :: Expression -> Expression -> Expression
>= :: Expression -> Expression -> Bool
$c>= :: Expression -> Expression -> Bool
> :: Expression -> Expression -> Bool
$c> :: Expression -> Expression -> Bool
<= :: Expression -> Expression -> Bool
$c<= :: Expression -> Expression -> Bool
< :: Expression -> Expression -> Bool
$c< :: Expression -> Expression -> Bool
compare :: Expression -> Expression -> Ordering
$ccompare :: Expression -> Expression -> Ordering
$cp1Ord :: Eq Expression
Ord, Int -> Expression -> ShowS
[Expression] -> ShowS
Expression -> String
(Int -> Expression -> ShowS)
-> (Expression -> String)
-> ([Expression] -> ShowS)
-> Show Expression
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Expression] -> ShowS
$cshowList :: [Expression] -> ShowS
show :: Expression -> String
$cshow :: Expression -> String
showsPrec :: Int -> Expression -> ShowS
$cshowsPrec :: Int -> Expression -> ShowS
Show, (forall x. Expression -> Rep Expression x)
-> (forall x. Rep Expression x -> Expression) -> Generic Expression
forall x. Rep Expression x -> Expression
forall x. Expression -> Rep Expression x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Expression x -> Expression
$cfrom :: forall x. Expression -> Rep Expression x
Generic, Typeable Expression
DataType
Constr
Typeable Expression
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Expression -> c Expression)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Expression)
-> (Expression -> Constr)
-> (Expression -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Expression))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Expression))
-> ((forall b. Data b => b -> b) -> Expression -> Expression)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Expression -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Expression -> r)
-> (forall u. (forall d. Data d => d -> u) -> Expression -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Expression -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Expression -> m Expression)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Expression -> m Expression)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Expression -> m Expression)
-> Data Expression
Expression -> DataType
Expression -> Constr
(forall b. Data b => b -> b) -> Expression -> Expression
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Expression -> c Expression
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Expression
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Expression -> u
forall u. (forall d. Data d => d -> u) -> Expression -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Expression -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Expression -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Expression -> m Expression
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Expression -> m Expression
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Expression
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Expression -> c Expression
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Expression)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Expression)
$cFunctionNamedArgument :: Constr
$cConditionalProjection :: Constr
$cFunctionExpression :: Constr
$cCastExpression :: Constr
$cListExpression :: Constr
$cOpExpression :: Constr
$cJsonValueExpression :: Constr
$cToStringExpression :: Constr
$cJsonQueryExpression :: Constr
$cNotEqualExpression :: Constr
$cEqualExpression :: Constr
$cColumnExpression :: Constr
$cIsNotNullExpression :: Constr
$cIsNullExpression :: Constr
$cSelectExpression :: Constr
$cExistsExpression :: Constr
$cNotExpression :: Constr
$cOrExpression :: Constr
$cAndExpression :: Constr
$cInExpression :: Constr
$cValueExpression :: Constr
$tExpression :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Expression -> m Expression
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Expression -> m Expression
gmapMp :: (forall d. Data d => d -> m d) -> Expression -> m Expression
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Expression -> m Expression
gmapM :: (forall d. Data d => d -> m d) -> Expression -> m Expression
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Expression -> m Expression
gmapQi :: Int -> (forall d. Data d => d -> u) -> Expression -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Expression -> u
gmapQ :: (forall d. Data d => d -> u) -> Expression -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Expression -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Expression -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Expression -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Expression -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Expression -> r
gmapT :: (forall b. Data b => b -> b) -> Expression -> Expression
$cgmapT :: (forall b. Data b => b -> b) -> Expression -> Expression
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Expression)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Expression)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Expression)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Expression)
dataTypeOf :: Expression -> DataType
$cdataTypeOf :: Expression -> DataType
toConstr :: Expression -> Constr
$ctoConstr :: Expression -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Expression
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Expression
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Expression -> c Expression
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Expression -> c Expression
$cp1Data :: Typeable Expression
Data, Expression -> Q Exp
Expression -> Q (TExp Expression)
(Expression -> Q Exp)
-> (Expression -> Q (TExp Expression)) -> Lift Expression
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Expression -> Q (TExp Expression)
$cliftTyped :: Expression -> Q (TExp Expression)
lift :: Expression -> Q Exp
$clift :: Expression -> Q Exp
Lift)

instance FromJSON Expression

instance Hashable Expression

instance Cacheable Expression

instance NFData Expression

data JsonPath
  = RootPath
  | FieldPath JsonPath Text
  | IndexPath JsonPath Integer
  deriving (JsonPath -> JsonPath -> Bool
(JsonPath -> JsonPath -> Bool)
-> (JsonPath -> JsonPath -> Bool) -> Eq JsonPath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JsonPath -> JsonPath -> Bool
$c/= :: JsonPath -> JsonPath -> Bool
== :: JsonPath -> JsonPath -> Bool
$c== :: JsonPath -> JsonPath -> Bool
Eq, Eq JsonPath
Eq JsonPath
-> (JsonPath -> JsonPath -> Ordering)
-> (JsonPath -> JsonPath -> Bool)
-> (JsonPath -> JsonPath -> Bool)
-> (JsonPath -> JsonPath -> Bool)
-> (JsonPath -> JsonPath -> Bool)
-> (JsonPath -> JsonPath -> JsonPath)
-> (JsonPath -> JsonPath -> JsonPath)
-> Ord JsonPath
JsonPath -> JsonPath -> Bool
JsonPath -> JsonPath -> Ordering
JsonPath -> JsonPath -> JsonPath
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: JsonPath -> JsonPath -> JsonPath
$cmin :: JsonPath -> JsonPath -> JsonPath
max :: JsonPath -> JsonPath -> JsonPath
$cmax :: JsonPath -> JsonPath -> JsonPath
>= :: JsonPath -> JsonPath -> Bool
$c>= :: JsonPath -> JsonPath -> Bool
> :: JsonPath -> JsonPath -> Bool
$c> :: JsonPath -> JsonPath -> Bool
<= :: JsonPath -> JsonPath -> Bool
$c<= :: JsonPath -> JsonPath -> Bool
< :: JsonPath -> JsonPath -> Bool
$c< :: JsonPath -> JsonPath -> Bool
compare :: JsonPath -> JsonPath -> Ordering
$ccompare :: JsonPath -> JsonPath -> Ordering
$cp1Ord :: Eq JsonPath
Ord, Int -> JsonPath -> ShowS
[JsonPath] -> ShowS
JsonPath -> String
(Int -> JsonPath -> ShowS)
-> (JsonPath -> String) -> ([JsonPath] -> ShowS) -> Show JsonPath
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JsonPath] -> ShowS
$cshowList :: [JsonPath] -> ShowS
show :: JsonPath -> String
$cshow :: JsonPath -> String
showsPrec :: Int -> JsonPath -> ShowS
$cshowsPrec :: Int -> JsonPath -> ShowS
Show, (forall x. JsonPath -> Rep JsonPath x)
-> (forall x. Rep JsonPath x -> JsonPath) -> Generic JsonPath
forall x. Rep JsonPath x -> JsonPath
forall x. JsonPath -> Rep JsonPath x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JsonPath x -> JsonPath
$cfrom :: forall x. JsonPath -> Rep JsonPath x
Generic, Typeable JsonPath
DataType
Constr
Typeable JsonPath
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> JsonPath -> c JsonPath)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c JsonPath)
-> (JsonPath -> Constr)
-> (JsonPath -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c JsonPath))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JsonPath))
-> ((forall b. Data b => b -> b) -> JsonPath -> JsonPath)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> JsonPath -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> JsonPath -> r)
-> (forall u. (forall d. Data d => d -> u) -> JsonPath -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> JsonPath -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> JsonPath -> m JsonPath)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> JsonPath -> m JsonPath)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> JsonPath -> m JsonPath)
-> Data JsonPath
JsonPath -> DataType
JsonPath -> Constr
(forall b. Data b => b -> b) -> JsonPath -> JsonPath
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JsonPath -> c JsonPath
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JsonPath
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> JsonPath -> u
forall u. (forall d. Data d => d -> u) -> JsonPath -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JsonPath -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JsonPath -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> JsonPath -> m JsonPath
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JsonPath -> m JsonPath
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JsonPath
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JsonPath -> c JsonPath
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c JsonPath)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JsonPath)
$cIndexPath :: Constr
$cFieldPath :: Constr
$cRootPath :: Constr
$tJsonPath :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> JsonPath -> m JsonPath
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JsonPath -> m JsonPath
gmapMp :: (forall d. Data d => d -> m d) -> JsonPath -> m JsonPath
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JsonPath -> m JsonPath
gmapM :: (forall d. Data d => d -> m d) -> JsonPath -> m JsonPath
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> JsonPath -> m JsonPath
gmapQi :: Int -> (forall d. Data d => d -> u) -> JsonPath -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> JsonPath -> u
gmapQ :: (forall d. Data d => d -> u) -> JsonPath -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> JsonPath -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JsonPath -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JsonPath -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JsonPath -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JsonPath -> r
gmapT :: (forall b. Data b => b -> b) -> JsonPath -> JsonPath
$cgmapT :: (forall b. Data b => b -> b) -> JsonPath -> JsonPath
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JsonPath)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c JsonPath)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c JsonPath)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c JsonPath)
dataTypeOf :: JsonPath -> DataType
$cdataTypeOf :: JsonPath -> DataType
toConstr :: JsonPath -> Constr
$ctoConstr :: JsonPath -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JsonPath
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JsonPath
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JsonPath -> c JsonPath
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JsonPath -> c JsonPath
$cp1Data :: Typeable JsonPath
Data, JsonPath -> Q Exp
JsonPath -> Q (TExp JsonPath)
(JsonPath -> Q Exp)
-> (JsonPath -> Q (TExp JsonPath)) -> Lift JsonPath
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: JsonPath -> Q (TExp JsonPath)
$cliftTyped :: JsonPath -> Q (TExp JsonPath)
lift :: JsonPath -> Q Exp
$clift :: JsonPath -> Q Exp
Lift)

instance FromJSON JsonPath

instance Hashable JsonPath

instance Cacheable JsonPath

instance ToJSON JsonPath

instance NFData JsonPath

data Aggregate
  = CountAggregate (Countable FieldName)
  | OpAggregates Text (NonEmpty (Text, Expression))
  | OpAggregate Text Expression
  | TextAggregate Text
  deriving (Aggregate -> Aggregate -> Bool
(Aggregate -> Aggregate -> Bool)
-> (Aggregate -> Aggregate -> Bool) -> Eq Aggregate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Aggregate -> Aggregate -> Bool
$c/= :: Aggregate -> Aggregate -> Bool
== :: Aggregate -> Aggregate -> Bool
$c== :: Aggregate -> Aggregate -> Bool
Eq, Eq Aggregate
Eq Aggregate
-> (Aggregate -> Aggregate -> Ordering)
-> (Aggregate -> Aggregate -> Bool)
-> (Aggregate -> Aggregate -> Bool)
-> (Aggregate -> Aggregate -> Bool)
-> (Aggregate -> Aggregate -> Bool)
-> (Aggregate -> Aggregate -> Aggregate)
-> (Aggregate -> Aggregate -> Aggregate)
-> Ord Aggregate
Aggregate -> Aggregate -> Bool
Aggregate -> Aggregate -> Ordering
Aggregate -> Aggregate -> Aggregate
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Aggregate -> Aggregate -> Aggregate
$cmin :: Aggregate -> Aggregate -> Aggregate
max :: Aggregate -> Aggregate -> Aggregate
$cmax :: Aggregate -> Aggregate -> Aggregate
>= :: Aggregate -> Aggregate -> Bool
$c>= :: Aggregate -> Aggregate -> Bool
> :: Aggregate -> Aggregate -> Bool
$c> :: Aggregate -> Aggregate -> Bool
<= :: Aggregate -> Aggregate -> Bool
$c<= :: Aggregate -> Aggregate -> Bool
< :: Aggregate -> Aggregate -> Bool
$c< :: Aggregate -> Aggregate -> Bool
compare :: Aggregate -> Aggregate -> Ordering
$ccompare :: Aggregate -> Aggregate -> Ordering
$cp1Ord :: Eq Aggregate
Ord, Int -> Aggregate -> ShowS
[Aggregate] -> ShowS
Aggregate -> String
(Int -> Aggregate -> ShowS)
-> (Aggregate -> String)
-> ([Aggregate] -> ShowS)
-> Show Aggregate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Aggregate] -> ShowS
$cshowList :: [Aggregate] -> ShowS
show :: Aggregate -> String
$cshow :: Aggregate -> String
showsPrec :: Int -> Aggregate -> ShowS
$cshowsPrec :: Int -> Aggregate -> ShowS
Show, (forall x. Aggregate -> Rep Aggregate x)
-> (forall x. Rep Aggregate x -> Aggregate) -> Generic Aggregate
forall x. Rep Aggregate x -> Aggregate
forall x. Aggregate -> Rep Aggregate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Aggregate x -> Aggregate
$cfrom :: forall x. Aggregate -> Rep Aggregate x
Generic, Typeable Aggregate
DataType
Constr
Typeable Aggregate
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Aggregate -> c Aggregate)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Aggregate)
-> (Aggregate -> Constr)
-> (Aggregate -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Aggregate))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Aggregate))
-> ((forall b. Data b => b -> b) -> Aggregate -> Aggregate)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Aggregate -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Aggregate -> r)
-> (forall u. (forall d. Data d => d -> u) -> Aggregate -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Aggregate -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Aggregate -> m Aggregate)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Aggregate -> m Aggregate)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Aggregate -> m Aggregate)
-> Data Aggregate
Aggregate -> DataType
Aggregate -> Constr
(forall b. Data b => b -> b) -> Aggregate -> Aggregate
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aggregate -> c Aggregate
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Aggregate
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Aggregate -> u
forall u. (forall d. Data d => d -> u) -> Aggregate -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Aggregate -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Aggregate -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Aggregate -> m Aggregate
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Aggregate -> m Aggregate
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Aggregate
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aggregate -> c Aggregate
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Aggregate)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Aggregate)
$cTextAggregate :: Constr
$cOpAggregate :: Constr
$cOpAggregates :: Constr
$cCountAggregate :: Constr
$tAggregate :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Aggregate -> m Aggregate
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Aggregate -> m Aggregate
gmapMp :: (forall d. Data d => d -> m d) -> Aggregate -> m Aggregate
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Aggregate -> m Aggregate
gmapM :: (forall d. Data d => d -> m d) -> Aggregate -> m Aggregate
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Aggregate -> m Aggregate
gmapQi :: Int -> (forall d. Data d => d -> u) -> Aggregate -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Aggregate -> u
gmapQ :: (forall d. Data d => d -> u) -> Aggregate -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Aggregate -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Aggregate -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Aggregate -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Aggregate -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Aggregate -> r
gmapT :: (forall b. Data b => b -> b) -> Aggregate -> Aggregate
$cgmapT :: (forall b. Data b => b -> b) -> Aggregate -> Aggregate
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Aggregate)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Aggregate)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Aggregate)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Aggregate)
dataTypeOf :: Aggregate -> DataType
$cdataTypeOf :: Aggregate -> DataType
toConstr :: Aggregate -> Constr
$ctoConstr :: Aggregate -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Aggregate
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Aggregate
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aggregate -> c Aggregate
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aggregate -> c Aggregate
$cp1Data :: Typeable Aggregate
Data, Aggregate -> Q Exp
Aggregate -> Q (TExp Aggregate)
(Aggregate -> Q Exp)
-> (Aggregate -> Q (TExp Aggregate)) -> Lift Aggregate
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Aggregate -> Q (TExp Aggregate)
$cliftTyped :: Aggregate -> Q (TExp Aggregate)
lift :: Aggregate -> Q Exp
$clift :: Aggregate -> Q Exp
Lift)

instance FromJSON Aggregate

instance Hashable Aggregate

instance Cacheable Aggregate

instance NFData Aggregate

data Countable fieldname
  = StarCountable
  | NonNullFieldCountable (NonEmpty fieldname)
  | DistinctCountable (NonEmpty fieldname)
  deriving (Countable fieldname -> Countable fieldname -> Bool
(Countable fieldname -> Countable fieldname -> Bool)
-> (Countable fieldname -> Countable fieldname -> Bool)
-> Eq (Countable fieldname)
forall fieldname.
Eq fieldname =>
Countable fieldname -> Countable fieldname -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Countable fieldname -> Countable fieldname -> Bool
$c/= :: forall fieldname.
Eq fieldname =>
Countable fieldname -> Countable fieldname -> Bool
== :: Countable fieldname -> Countable fieldname -> Bool
$c== :: forall fieldname.
Eq fieldname =>
Countable fieldname -> Countable fieldname -> Bool
Eq, Eq (Countable fieldname)
Eq (Countable fieldname)
-> (Countable fieldname -> Countable fieldname -> Ordering)
-> (Countable fieldname -> Countable fieldname -> Bool)
-> (Countable fieldname -> Countable fieldname -> Bool)
-> (Countable fieldname -> Countable fieldname -> Bool)
-> (Countable fieldname -> Countable fieldname -> Bool)
-> (Countable fieldname
    -> Countable fieldname -> Countable fieldname)
-> (Countable fieldname
    -> Countable fieldname -> Countable fieldname)
-> Ord (Countable fieldname)
Countable fieldname -> Countable fieldname -> Bool
Countable fieldname -> Countable fieldname -> Ordering
Countable fieldname -> Countable fieldname -> Countable fieldname
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall fieldname. Ord fieldname => Eq (Countable fieldname)
forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Bool
forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Ordering
forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Countable fieldname
min :: Countable fieldname -> Countable fieldname -> Countable fieldname
$cmin :: forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Countable fieldname
max :: Countable fieldname -> Countable fieldname -> Countable fieldname
$cmax :: forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Countable fieldname
>= :: Countable fieldname -> Countable fieldname -> Bool
$c>= :: forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Bool
> :: Countable fieldname -> Countable fieldname -> Bool
$c> :: forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Bool
<= :: Countable fieldname -> Countable fieldname -> Bool
$c<= :: forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Bool
< :: Countable fieldname -> Countable fieldname -> Bool
$c< :: forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Bool
compare :: Countable fieldname -> Countable fieldname -> Ordering
$ccompare :: forall fieldname.
Ord fieldname =>
Countable fieldname -> Countable fieldname -> Ordering
$cp1Ord :: forall fieldname. Ord fieldname => Eq (Countable fieldname)
Ord, Int -> Countable fieldname -> ShowS
[Countable fieldname] -> ShowS
Countable fieldname -> String
(Int -> Countable fieldname -> ShowS)
-> (Countable fieldname -> String)
-> ([Countable fieldname] -> ShowS)
-> Show (Countable fieldname)
forall fieldname.
Show fieldname =>
Int -> Countable fieldname -> ShowS
forall fieldname. Show fieldname => [Countable fieldname] -> ShowS
forall fieldname. Show fieldname => Countable fieldname -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Countable fieldname] -> ShowS
$cshowList :: forall fieldname. Show fieldname => [Countable fieldname] -> ShowS
show :: Countable fieldname -> String
$cshow :: forall fieldname. Show fieldname => Countable fieldname -> String
showsPrec :: Int -> Countable fieldname -> ShowS
$cshowsPrec :: forall fieldname.
Show fieldname =>
Int -> Countable fieldname -> ShowS
Show, (forall x. Countable fieldname -> Rep (Countable fieldname) x)
-> (forall x. Rep (Countable fieldname) x -> Countable fieldname)
-> Generic (Countable fieldname)
forall x. Rep (Countable fieldname) x -> Countable fieldname
forall x. Countable fieldname -> Rep (Countable fieldname) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall fieldname x.
Rep (Countable fieldname) x -> Countable fieldname
forall fieldname x.
Countable fieldname -> Rep (Countable fieldname) x
$cto :: forall fieldname x.
Rep (Countable fieldname) x -> Countable fieldname
$cfrom :: forall fieldname x.
Countable fieldname -> Rep (Countable fieldname) x
Generic, Typeable (Countable fieldname)
DataType
Constr
Typeable (Countable fieldname)
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> Countable fieldname
    -> c (Countable fieldname))
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Countable fieldname))
-> (Countable fieldname -> Constr)
-> (Countable fieldname -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Countable fieldname)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Countable fieldname)))
-> ((forall b. Data b => b -> b)
    -> Countable fieldname -> Countable fieldname)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> Countable fieldname -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Countable fieldname -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> Countable fieldname -> m (Countable fieldname))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> Countable fieldname -> m (Countable fieldname))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> Countable fieldname -> m (Countable fieldname))
-> Data (Countable fieldname)
Countable fieldname -> DataType
Countable fieldname -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Countable fieldname))
(forall b. Data b => b -> b)
-> Countable fieldname -> Countable fieldname
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> Countable fieldname
-> c (Countable fieldname)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Countable fieldname)
forall fieldname. Data fieldname => Typeable (Countable fieldname)
forall fieldname. Data fieldname => Countable fieldname -> DataType
forall fieldname. Data fieldname => Countable fieldname -> Constr
forall fieldname.
Data fieldname =>
(forall b. Data b => b -> b)
-> Countable fieldname -> Countable fieldname
forall fieldname u.
Data fieldname =>
Int -> (forall d. Data d => d -> u) -> Countable fieldname -> u
forall fieldname u.
Data fieldname =>
(forall d. Data d => d -> u) -> Countable fieldname -> [u]
forall fieldname r r'.
Data fieldname =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r
forall fieldname r r'.
Data fieldname =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r
forall fieldname (m :: * -> *).
(Data fieldname, Monad m) =>
(forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
forall fieldname (m :: * -> *).
(Data fieldname, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
forall fieldname (c :: * -> *).
Data fieldname =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Countable fieldname)
forall fieldname (c :: * -> *).
Data fieldname =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> Countable fieldname
-> c (Countable fieldname)
forall fieldname (t :: * -> *) (c :: * -> *).
(Data fieldname, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Countable fieldname))
forall fieldname (t :: * -> * -> *) (c :: * -> *).
(Data fieldname, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Countable fieldname))
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> Countable fieldname -> u
forall u.
(forall d. Data d => d -> u) -> Countable fieldname -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Countable fieldname)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> Countable fieldname
-> c (Countable fieldname)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Countable fieldname))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Countable fieldname))
$cDistinctCountable :: Constr
$cNonNullFieldCountable :: Constr
$cStarCountable :: Constr
$tCountable :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
$cgmapMo :: forall fieldname (m :: * -> *).
(Data fieldname, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
gmapMp :: (forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
$cgmapMp :: forall fieldname (m :: * -> *).
(Data fieldname, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
gmapM :: (forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
$cgmapM :: forall fieldname (m :: * -> *).
(Data fieldname, Monad m) =>
(forall d. Data d => d -> m d)
-> Countable fieldname -> m (Countable fieldname)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Countable fieldname -> u
$cgmapQi :: forall fieldname u.
Data fieldname =>
Int -> (forall d. Data d => d -> u) -> Countable fieldname -> u
gmapQ :: (forall d. Data d => d -> u) -> Countable fieldname -> [u]
$cgmapQ :: forall fieldname u.
Data fieldname =>
(forall d. Data d => d -> u) -> Countable fieldname -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r
$cgmapQr :: forall fieldname r r'.
Data fieldname =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r
$cgmapQl :: forall fieldname r r'.
Data fieldname =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Countable fieldname -> r
gmapT :: (forall b. Data b => b -> b)
-> Countable fieldname -> Countable fieldname
$cgmapT :: forall fieldname.
Data fieldname =>
(forall b. Data b => b -> b)
-> Countable fieldname -> Countable fieldname
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Countable fieldname))
$cdataCast2 :: forall fieldname (t :: * -> * -> *) (c :: * -> *).
(Data fieldname, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Countable fieldname))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Countable fieldname))
$cdataCast1 :: forall fieldname (t :: * -> *) (c :: * -> *).
(Data fieldname, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Countable fieldname))
dataTypeOf :: Countable fieldname -> DataType
$cdataTypeOf :: forall fieldname. Data fieldname => Countable fieldname -> DataType
toConstr :: Countable fieldname -> Constr
$ctoConstr :: forall fieldname. Data fieldname => Countable fieldname -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Countable fieldname)
$cgunfold :: forall fieldname (c :: * -> *).
Data fieldname =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Countable fieldname)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> Countable fieldname
-> c (Countable fieldname)
$cgfoldl :: forall fieldname (c :: * -> *).
Data fieldname =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> Countable fieldname
-> c (Countable fieldname)
$cp1Data :: forall fieldname. Data fieldname => Typeable (Countable fieldname)
Data, Countable fieldname -> Q Exp
Countable fieldname -> Q (TExp (Countable fieldname))
(Countable fieldname -> Q Exp)
-> (Countable fieldname -> Q (TExp (Countable fieldname)))
-> Lift (Countable fieldname)
forall fieldname. Lift fieldname => Countable fieldname -> Q Exp
forall fieldname.
Lift fieldname =>
Countable fieldname -> Q (TExp (Countable fieldname))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Countable fieldname -> Q (TExp (Countable fieldname))
$cliftTyped :: forall fieldname.
Lift fieldname =>
Countable fieldname -> Q (TExp (Countable fieldname))
lift :: Countable fieldname -> Q Exp
$clift :: forall fieldname. Lift fieldname => Countable fieldname -> Q Exp
Lift)

instance FromJSON a => FromJSON (Countable a)

instance Hashable a => Hashable (Countable a)

instance Cacheable a => Cacheable (Countable a)

instance ToJSON a => ToJSON (Countable a)

instance NFData a => NFData (Countable a)

data From
  = FromQualifiedTable (Aliased TableName)
  | FromSelect (Aliased Select)
  | FromSelectJson (Aliased SelectJson)
  | FromFunction (Aliased SelectFromFunction)
  deriving (From -> From -> Bool
(From -> From -> Bool) -> (From -> From -> Bool) -> Eq From
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: From -> From -> Bool
$c/= :: From -> From -> Bool
== :: From -> From -> Bool
$c== :: From -> From -> Bool
Eq, Int -> From -> ShowS
[From] -> ShowS
From -> String
(Int -> From -> ShowS)
-> (From -> String) -> ([From] -> ShowS) -> Show From
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [From] -> ShowS
$cshowList :: [From] -> ShowS
show :: From -> String
$cshow :: From -> String
showsPrec :: Int -> From -> ShowS
$cshowsPrec :: Int -> From -> ShowS
Show, (forall x. From -> Rep From x)
-> (forall x. Rep From x -> From) -> Generic From
forall x. Rep From x -> From
forall x. From -> Rep From x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep From x -> From
$cfrom :: forall x. From -> Rep From x
Generic, Typeable From
DataType
Constr
Typeable From
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> From -> c From)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c From)
-> (From -> Constr)
-> (From -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c From))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c From))
-> ((forall b. Data b => b -> b) -> From -> From)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> From -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> From -> r)
-> (forall u. (forall d. Data d => d -> u) -> From -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> From -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> From -> m From)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> From -> m From)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> From -> m From)
-> Data From
From -> DataType
From -> Constr
(forall b. Data b => b -> b) -> From -> From
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> From -> c From
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c From
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> From -> u
forall u. (forall d. Data d => d -> u) -> From -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> From -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> From -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> From -> m From
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> From -> m From
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c From
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> From -> c From
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c From)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c From)
$cFromFunction :: Constr
$cFromSelectJson :: Constr
$cFromSelect :: Constr
$cFromQualifiedTable :: Constr
$tFrom :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> From -> m From
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> From -> m From
gmapMp :: (forall d. Data d => d -> m d) -> From -> m From
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> From -> m From
gmapM :: (forall d. Data d => d -> m d) -> From -> m From
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> From -> m From
gmapQi :: Int -> (forall d. Data d => d -> u) -> From -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> From -> u
gmapQ :: (forall d. Data d => d -> u) -> From -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> From -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> From -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> From -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> From -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> From -> r
gmapT :: (forall b. Data b => b -> b) -> From -> From
$cgmapT :: (forall b. Data b => b -> b) -> From -> From
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c From)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c From)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c From)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c From)
dataTypeOf :: From -> DataType
$cdataTypeOf :: From -> DataType
toConstr :: From -> Constr
$ctoConstr :: From -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c From
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c From
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> From -> c From
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> From -> c From
$cp1Data :: Typeable From
Data, From -> Q Exp
From -> Q (TExp From)
(From -> Q Exp) -> (From -> Q (TExp From)) -> Lift From
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: From -> Q (TExp From)
$cliftTyped :: From -> Q (TExp From)
lift :: From -> Q Exp
$clift :: From -> Q Exp
Lift, Eq From
Eq From
-> (From -> From -> Ordering)
-> (From -> From -> Bool)
-> (From -> From -> Bool)
-> (From -> From -> Bool)
-> (From -> From -> Bool)
-> (From -> From -> From)
-> (From -> From -> From)
-> Ord From
From -> From -> Bool
From -> From -> Ordering
From -> From -> From
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: From -> From -> From
$cmin :: From -> From -> From
max :: From -> From -> From
$cmax :: From -> From -> From
>= :: From -> From -> Bool
$c>= :: From -> From -> Bool
> :: From -> From -> Bool
$c> :: From -> From -> Bool
<= :: From -> From -> Bool
$c<= :: From -> From -> Bool
< :: From -> From -> Bool
$c< :: From -> From -> Bool
compare :: From -> From -> Ordering
$ccompare :: From -> From -> Ordering
$cp1Ord :: Eq From
Ord)

instance FromJSON From

instance Hashable From

instance Cacheable From

instance NFData From

data SelectJson = SelectJson
  { SelectJson -> Expression
selectJsonBody :: Expression,
    SelectJson -> [(ColumnName, ScalarType)]
selectJsonFields :: [(ColumnName, ScalarType)]
  }
  deriving (SelectJson -> SelectJson -> Bool
(SelectJson -> SelectJson -> Bool)
-> (SelectJson -> SelectJson -> Bool) -> Eq SelectJson
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelectJson -> SelectJson -> Bool
$c/= :: SelectJson -> SelectJson -> Bool
== :: SelectJson -> SelectJson -> Bool
$c== :: SelectJson -> SelectJson -> Bool
Eq, Eq SelectJson
Eq SelectJson
-> (SelectJson -> SelectJson -> Ordering)
-> (SelectJson -> SelectJson -> Bool)
-> (SelectJson -> SelectJson -> Bool)
-> (SelectJson -> SelectJson -> Bool)
-> (SelectJson -> SelectJson -> Bool)
-> (SelectJson -> SelectJson -> SelectJson)
-> (SelectJson -> SelectJson -> SelectJson)
-> Ord SelectJson
SelectJson -> SelectJson -> Bool
SelectJson -> SelectJson -> Ordering
SelectJson -> SelectJson -> SelectJson
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SelectJson -> SelectJson -> SelectJson
$cmin :: SelectJson -> SelectJson -> SelectJson
max :: SelectJson -> SelectJson -> SelectJson
$cmax :: SelectJson -> SelectJson -> SelectJson
>= :: SelectJson -> SelectJson -> Bool
$c>= :: SelectJson -> SelectJson -> Bool
> :: SelectJson -> SelectJson -> Bool
$c> :: SelectJson -> SelectJson -> Bool
<= :: SelectJson -> SelectJson -> Bool
$c<= :: SelectJson -> SelectJson -> Bool
< :: SelectJson -> SelectJson -> Bool
$c< :: SelectJson -> SelectJson -> Bool
compare :: SelectJson -> SelectJson -> Ordering
$ccompare :: SelectJson -> SelectJson -> Ordering
$cp1Ord :: Eq SelectJson
Ord, Int -> SelectJson -> ShowS
[SelectJson] -> ShowS
SelectJson -> String
(Int -> SelectJson -> ShowS)
-> (SelectJson -> String)
-> ([SelectJson] -> ShowS)
-> Show SelectJson
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelectJson] -> ShowS
$cshowList :: [SelectJson] -> ShowS
show :: SelectJson -> String
$cshow :: SelectJson -> String
showsPrec :: Int -> SelectJson -> ShowS
$cshowsPrec :: Int -> SelectJson -> ShowS
Show, (forall x. SelectJson -> Rep SelectJson x)
-> (forall x. Rep SelectJson x -> SelectJson) -> Generic SelectJson
forall x. Rep SelectJson x -> SelectJson
forall x. SelectJson -> Rep SelectJson x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SelectJson x -> SelectJson
$cfrom :: forall x. SelectJson -> Rep SelectJson x
Generic, Typeable SelectJson
DataType
Constr
Typeable SelectJson
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SelectJson -> c SelectJson)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SelectJson)
-> (SelectJson -> Constr)
-> (SelectJson -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SelectJson))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SelectJson))
-> ((forall b. Data b => b -> b) -> SelectJson -> SelectJson)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SelectJson -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SelectJson -> r)
-> (forall u. (forall d. Data d => d -> u) -> SelectJson -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> SelectJson -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SelectJson -> m SelectJson)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SelectJson -> m SelectJson)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SelectJson -> m SelectJson)
-> Data SelectJson
SelectJson -> DataType
SelectJson -> Constr
(forall b. Data b => b -> b) -> SelectJson -> SelectJson
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SelectJson -> c SelectJson
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SelectJson
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SelectJson -> u
forall u. (forall d. Data d => d -> u) -> SelectJson -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SelectJson -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SelectJson -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SelectJson -> m SelectJson
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SelectJson -> m SelectJson
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SelectJson
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SelectJson -> c SelectJson
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SelectJson)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SelectJson)
$cSelectJson :: Constr
$tSelectJson :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SelectJson -> m SelectJson
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SelectJson -> m SelectJson
gmapMp :: (forall d. Data d => d -> m d) -> SelectJson -> m SelectJson
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SelectJson -> m SelectJson
gmapM :: (forall d. Data d => d -> m d) -> SelectJson -> m SelectJson
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SelectJson -> m SelectJson
gmapQi :: Int -> (forall d. Data d => d -> u) -> SelectJson -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SelectJson -> u
gmapQ :: (forall d. Data d => d -> u) -> SelectJson -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SelectJson -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SelectJson -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SelectJson -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SelectJson -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SelectJson -> r
gmapT :: (forall b. Data b => b -> b) -> SelectJson -> SelectJson
$cgmapT :: (forall b. Data b => b -> b) -> SelectJson -> SelectJson
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SelectJson)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SelectJson)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SelectJson)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SelectJson)
dataTypeOf :: SelectJson -> DataType
$cdataTypeOf :: SelectJson -> DataType
toConstr :: SelectJson -> Constr
$ctoConstr :: SelectJson -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SelectJson
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SelectJson
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SelectJson -> c SelectJson
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SelectJson -> c SelectJson
$cp1Data :: Typeable SelectJson
Data, SelectJson -> Q Exp
SelectJson -> Q (TExp SelectJson)
(SelectJson -> Q Exp)
-> (SelectJson -> Q (TExp SelectJson)) -> Lift SelectJson
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: SelectJson -> Q (TExp SelectJson)
$cliftTyped :: SelectJson -> Q (TExp SelectJson)
lift :: SelectJson -> Q Exp
$clift :: SelectJson -> Q Exp
Lift)

instance FromJSON SelectJson

instance Hashable SelectJson

instance Cacheable SelectJson

instance NFData SelectJson

data SelectFromFunction = SelectFromFunction
  { SelectFromFunction -> FunctionName
sffFunctionName :: FunctionName,
    SelectFromFunction -> [Expression]
sffArguments :: [Expression]
  }
  deriving (SelectFromFunction -> SelectFromFunction -> Bool
(SelectFromFunction -> SelectFromFunction -> Bool)
-> (SelectFromFunction -> SelectFromFunction -> Bool)
-> Eq SelectFromFunction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelectFromFunction -> SelectFromFunction -> Bool
$c/= :: SelectFromFunction -> SelectFromFunction -> Bool
== :: SelectFromFunction -> SelectFromFunction -> Bool
$c== :: SelectFromFunction -> SelectFromFunction -> Bool
Eq, Int -> SelectFromFunction -> ShowS
[SelectFromFunction] -> ShowS
SelectFromFunction -> String
(Int -> SelectFromFunction -> ShowS)
-> (SelectFromFunction -> String)
-> ([SelectFromFunction] -> ShowS)
-> Show SelectFromFunction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelectFromFunction] -> ShowS
$cshowList :: [SelectFromFunction] -> ShowS
show :: SelectFromFunction -> String
$cshow :: SelectFromFunction -> String
showsPrec :: Int -> SelectFromFunction -> ShowS
$cshowsPrec :: Int -> SelectFromFunction -> ShowS
Show, (forall x. SelectFromFunction -> Rep SelectFromFunction x)
-> (forall x. Rep SelectFromFunction x -> SelectFromFunction)
-> Generic SelectFromFunction
forall x. Rep SelectFromFunction x -> SelectFromFunction
forall x. SelectFromFunction -> Rep SelectFromFunction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SelectFromFunction x -> SelectFromFunction
$cfrom :: forall x. SelectFromFunction -> Rep SelectFromFunction x
Generic, Typeable SelectFromFunction
DataType
Constr
Typeable SelectFromFunction
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> SelectFromFunction
    -> c SelectFromFunction)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SelectFromFunction)
-> (SelectFromFunction -> Constr)
-> (SelectFromFunction -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SelectFromFunction))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SelectFromFunction))
-> ((forall b. Data b => b -> b)
    -> SelectFromFunction -> SelectFromFunction)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SelectFromFunction -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SelectFromFunction -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> SelectFromFunction -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> SelectFromFunction -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> SelectFromFunction -> m SelectFromFunction)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SelectFromFunction -> m SelectFromFunction)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> SelectFromFunction -> m SelectFromFunction)
-> Data SelectFromFunction
SelectFromFunction -> DataType
SelectFromFunction -> Constr
(forall b. Data b => b -> b)
-> SelectFromFunction -> SelectFromFunction
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SelectFromFunction
-> c SelectFromFunction
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SelectFromFunction
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> SelectFromFunction -> u
forall u. (forall d. Data d => d -> u) -> SelectFromFunction -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SelectFromFunction -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SelectFromFunction -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SelectFromFunction -> m SelectFromFunction
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SelectFromFunction -> m SelectFromFunction
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SelectFromFunction
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SelectFromFunction
-> c SelectFromFunction
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SelectFromFunction)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SelectFromFunction)
$cSelectFromFunction :: Constr
$tSelectFromFunction :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> SelectFromFunction -> m SelectFromFunction
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SelectFromFunction -> m SelectFromFunction
gmapMp :: (forall d. Data d => d -> m d)
-> SelectFromFunction -> m SelectFromFunction
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SelectFromFunction -> m SelectFromFunction
gmapM :: (forall d. Data d => d -> m d)
-> SelectFromFunction -> m SelectFromFunction
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SelectFromFunction -> m SelectFromFunction
gmapQi :: Int -> (forall d. Data d => d -> u) -> SelectFromFunction -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SelectFromFunction -> u
gmapQ :: (forall d. Data d => d -> u) -> SelectFromFunction -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SelectFromFunction -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SelectFromFunction -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SelectFromFunction -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SelectFromFunction -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SelectFromFunction -> r
gmapT :: (forall b. Data b => b -> b)
-> SelectFromFunction -> SelectFromFunction
$cgmapT :: (forall b. Data b => b -> b)
-> SelectFromFunction -> SelectFromFunction
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SelectFromFunction)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SelectFromFunction)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SelectFromFunction)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SelectFromFunction)
dataTypeOf :: SelectFromFunction -> DataType
$cdataTypeOf :: SelectFromFunction -> DataType
toConstr :: SelectFromFunction -> Constr
$ctoConstr :: SelectFromFunction -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SelectFromFunction
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SelectFromFunction
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SelectFromFunction
-> c SelectFromFunction
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> SelectFromFunction
-> c SelectFromFunction
$cp1Data :: Typeable SelectFromFunction
Data, SelectFromFunction -> Q Exp
SelectFromFunction -> Q (TExp SelectFromFunction)
(SelectFromFunction -> Q Exp)
-> (SelectFromFunction -> Q (TExp SelectFromFunction))
-> Lift SelectFromFunction
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: SelectFromFunction -> Q (TExp SelectFromFunction)
$cliftTyped :: SelectFromFunction -> Q (TExp SelectFromFunction)
lift :: SelectFromFunction -> Q Exp
$clift :: SelectFromFunction -> Q Exp
Lift, Eq SelectFromFunction
Eq SelectFromFunction
-> (SelectFromFunction -> SelectFromFunction -> Ordering)
-> (SelectFromFunction -> SelectFromFunction -> Bool)
-> (SelectFromFunction -> SelectFromFunction -> Bool)
-> (SelectFromFunction -> SelectFromFunction -> Bool)
-> (SelectFromFunction -> SelectFromFunction -> Bool)
-> (SelectFromFunction -> SelectFromFunction -> SelectFromFunction)
-> (SelectFromFunction -> SelectFromFunction -> SelectFromFunction)
-> Ord SelectFromFunction
SelectFromFunction -> SelectFromFunction -> Bool
SelectFromFunction -> SelectFromFunction -> Ordering
SelectFromFunction -> SelectFromFunction -> SelectFromFunction
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SelectFromFunction -> SelectFromFunction -> SelectFromFunction
$cmin :: SelectFromFunction -> SelectFromFunction -> SelectFromFunction
max :: SelectFromFunction -> SelectFromFunction -> SelectFromFunction
$cmax :: SelectFromFunction -> SelectFromFunction -> SelectFromFunction
>= :: SelectFromFunction -> SelectFromFunction -> Bool
$c>= :: SelectFromFunction -> SelectFromFunction -> Bool
> :: SelectFromFunction -> SelectFromFunction -> Bool
$c> :: SelectFromFunction -> SelectFromFunction -> Bool
<= :: SelectFromFunction -> SelectFromFunction -> Bool
$c<= :: SelectFromFunction -> SelectFromFunction -> Bool
< :: SelectFromFunction -> SelectFromFunction -> Bool
$c< :: SelectFromFunction -> SelectFromFunction -> Bool
compare :: SelectFromFunction -> SelectFromFunction -> Ordering
$ccompare :: SelectFromFunction -> SelectFromFunction -> Ordering
$cp1Ord :: Eq SelectFromFunction
Ord)

instance FromJSON SelectFromFunction

instance Hashable SelectFromFunction

instance Cacheable SelectFromFunction

instance NFData SelectFromFunction

data OpenJson = OpenJson
  { OpenJson -> Expression
openJsonExpression :: Expression,
    OpenJson -> NonEmpty JsonFieldSpec
openJsonWith :: NonEmpty JsonFieldSpec
  }
  deriving (OpenJson -> OpenJson -> Bool
(OpenJson -> OpenJson -> Bool)
-> (OpenJson -> OpenJson -> Bool) -> Eq OpenJson
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpenJson -> OpenJson -> Bool
$c/= :: OpenJson -> OpenJson -> Bool
== :: OpenJson -> OpenJson -> Bool
$c== :: OpenJson -> OpenJson -> Bool
Eq, Eq OpenJson
Eq OpenJson
-> (OpenJson -> OpenJson -> Ordering)
-> (OpenJson -> OpenJson -> Bool)
-> (OpenJson -> OpenJson -> Bool)
-> (OpenJson -> OpenJson -> Bool)
-> (OpenJson -> OpenJson -> Bool)
-> (OpenJson -> OpenJson -> OpenJson)
-> (OpenJson -> OpenJson -> OpenJson)
-> Ord OpenJson
OpenJson -> OpenJson -> Bool
OpenJson -> OpenJson -> Ordering
OpenJson -> OpenJson -> OpenJson
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OpenJson -> OpenJson -> OpenJson
$cmin :: OpenJson -> OpenJson -> OpenJson
max :: OpenJson -> OpenJson -> OpenJson
$cmax :: OpenJson -> OpenJson -> OpenJson
>= :: OpenJson -> OpenJson -> Bool
$c>= :: OpenJson -> OpenJson -> Bool
> :: OpenJson -> OpenJson -> Bool
$c> :: OpenJson -> OpenJson -> Bool
<= :: OpenJson -> OpenJson -> Bool
$c<= :: OpenJson -> OpenJson -> Bool
< :: OpenJson -> OpenJson -> Bool
$c< :: OpenJson -> OpenJson -> Bool
compare :: OpenJson -> OpenJson -> Ordering
$ccompare :: OpenJson -> OpenJson -> Ordering
$cp1Ord :: Eq OpenJson
Ord, Int -> OpenJson -> ShowS
[OpenJson] -> ShowS
OpenJson -> String
(Int -> OpenJson -> ShowS)
-> (OpenJson -> String) -> ([OpenJson] -> ShowS) -> Show OpenJson
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpenJson] -> ShowS
$cshowList :: [OpenJson] -> ShowS
show :: OpenJson -> String
$cshow :: OpenJson -> String
showsPrec :: Int -> OpenJson -> ShowS
$cshowsPrec :: Int -> OpenJson -> ShowS
Show, (forall x. OpenJson -> Rep OpenJson x)
-> (forall x. Rep OpenJson x -> OpenJson) -> Generic OpenJson
forall x. Rep OpenJson x -> OpenJson
forall x. OpenJson -> Rep OpenJson x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OpenJson x -> OpenJson
$cfrom :: forall x. OpenJson -> Rep OpenJson x
Generic, Typeable OpenJson
DataType
Constr
Typeable OpenJson
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> OpenJson -> c OpenJson)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c OpenJson)
-> (OpenJson -> Constr)
-> (OpenJson -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c OpenJson))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpenJson))
-> ((forall b. Data b => b -> b) -> OpenJson -> OpenJson)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> OpenJson -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> OpenJson -> r)
-> (forall u. (forall d. Data d => d -> u) -> OpenJson -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> OpenJson -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> OpenJson -> m OpenJson)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OpenJson -> m OpenJson)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OpenJson -> m OpenJson)
-> Data OpenJson
OpenJson -> DataType
OpenJson -> Constr
(forall b. Data b => b -> b) -> OpenJson -> OpenJson
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpenJson -> c OpenJson
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpenJson
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> OpenJson -> u
forall u. (forall d. Data d => d -> u) -> OpenJson -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OpenJson -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OpenJson -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OpenJson -> m OpenJson
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpenJson -> m OpenJson
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpenJson
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpenJson -> c OpenJson
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OpenJson)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpenJson)
$cOpenJson :: Constr
$tOpenJson :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> OpenJson -> m OpenJson
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpenJson -> m OpenJson
gmapMp :: (forall d. Data d => d -> m d) -> OpenJson -> m OpenJson
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpenJson -> m OpenJson
gmapM :: (forall d. Data d => d -> m d) -> OpenJson -> m OpenJson
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OpenJson -> m OpenJson
gmapQi :: Int -> (forall d. Data d => d -> u) -> OpenJson -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OpenJson -> u
gmapQ :: (forall d. Data d => d -> u) -> OpenJson -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OpenJson -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OpenJson -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OpenJson -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OpenJson -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OpenJson -> r
gmapT :: (forall b. Data b => b -> b) -> OpenJson -> OpenJson
$cgmapT :: (forall b. Data b => b -> b) -> OpenJson -> OpenJson
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpenJson)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpenJson)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c OpenJson)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OpenJson)
dataTypeOf :: OpenJson -> DataType
$cdataTypeOf :: OpenJson -> DataType
toConstr :: OpenJson -> Constr
$ctoConstr :: OpenJson -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpenJson
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpenJson
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpenJson -> c OpenJson
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpenJson -> c OpenJson
$cp1Data :: Typeable OpenJson
Data, OpenJson -> Q Exp
OpenJson -> Q (TExp OpenJson)
(OpenJson -> Q Exp)
-> (OpenJson -> Q (TExp OpenJson)) -> Lift OpenJson
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: OpenJson -> Q (TExp OpenJson)
$cliftTyped :: OpenJson -> Q (TExp OpenJson)
lift :: OpenJson -> Q Exp
$clift :: OpenJson -> Q Exp
Lift)

instance FromJSON OpenJson

instance Hashable OpenJson

instance Cacheable OpenJson

instance NFData OpenJson

data JsonFieldSpec
  = IntField Text
  | JsonField Text
  deriving (JsonFieldSpec -> JsonFieldSpec -> Bool
(JsonFieldSpec -> JsonFieldSpec -> Bool)
-> (JsonFieldSpec -> JsonFieldSpec -> Bool) -> Eq JsonFieldSpec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JsonFieldSpec -> JsonFieldSpec -> Bool
$c/= :: JsonFieldSpec -> JsonFieldSpec -> Bool
== :: JsonFieldSpec -> JsonFieldSpec -> Bool
$c== :: JsonFieldSpec -> JsonFieldSpec -> Bool
Eq, Eq JsonFieldSpec
Eq JsonFieldSpec
-> (JsonFieldSpec -> JsonFieldSpec -> Ordering)
-> (JsonFieldSpec -> JsonFieldSpec -> Bool)
-> (JsonFieldSpec -> JsonFieldSpec -> Bool)
-> (JsonFieldSpec -> JsonFieldSpec -> Bool)
-> (JsonFieldSpec -> JsonFieldSpec -> Bool)
-> (JsonFieldSpec -> JsonFieldSpec -> JsonFieldSpec)
-> (JsonFieldSpec -> JsonFieldSpec -> JsonFieldSpec)
-> Ord JsonFieldSpec
JsonFieldSpec -> JsonFieldSpec -> Bool
JsonFieldSpec -> JsonFieldSpec -> Ordering
JsonFieldSpec -> JsonFieldSpec -> JsonFieldSpec
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: JsonFieldSpec -> JsonFieldSpec -> JsonFieldSpec
$cmin :: JsonFieldSpec -> JsonFieldSpec -> JsonFieldSpec
max :: JsonFieldSpec -> JsonFieldSpec -> JsonFieldSpec
$cmax :: JsonFieldSpec -> JsonFieldSpec -> JsonFieldSpec
>= :: JsonFieldSpec -> JsonFieldSpec -> Bool
$c>= :: JsonFieldSpec -> JsonFieldSpec -> Bool
> :: JsonFieldSpec -> JsonFieldSpec -> Bool
$c> :: JsonFieldSpec -> JsonFieldSpec -> Bool
<= :: JsonFieldSpec -> JsonFieldSpec -> Bool
$c<= :: JsonFieldSpec -> JsonFieldSpec -> Bool
< :: JsonFieldSpec -> JsonFieldSpec -> Bool
$c< :: JsonFieldSpec -> JsonFieldSpec -> Bool
compare :: JsonFieldSpec -> JsonFieldSpec -> Ordering
$ccompare :: JsonFieldSpec -> JsonFieldSpec -> Ordering
$cp1Ord :: Eq JsonFieldSpec
Ord, Int -> JsonFieldSpec -> ShowS
[JsonFieldSpec] -> ShowS
JsonFieldSpec -> String
(Int -> JsonFieldSpec -> ShowS)
-> (JsonFieldSpec -> String)
-> ([JsonFieldSpec] -> ShowS)
-> Show JsonFieldSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JsonFieldSpec] -> ShowS
$cshowList :: [JsonFieldSpec] -> ShowS
show :: JsonFieldSpec -> String
$cshow :: JsonFieldSpec -> String
showsPrec :: Int -> JsonFieldSpec -> ShowS
$cshowsPrec :: Int -> JsonFieldSpec -> ShowS
Show, (forall x. JsonFieldSpec -> Rep JsonFieldSpec x)
-> (forall x. Rep JsonFieldSpec x -> JsonFieldSpec)
-> Generic JsonFieldSpec
forall x. Rep JsonFieldSpec x -> JsonFieldSpec
forall x. JsonFieldSpec -> Rep JsonFieldSpec x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JsonFieldSpec x -> JsonFieldSpec
$cfrom :: forall x. JsonFieldSpec -> Rep JsonFieldSpec x
Generic, Typeable JsonFieldSpec
DataType
Constr
Typeable JsonFieldSpec
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> JsonFieldSpec -> c JsonFieldSpec)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c JsonFieldSpec)
-> (JsonFieldSpec -> Constr)
-> (JsonFieldSpec -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c JsonFieldSpec))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c JsonFieldSpec))
-> ((forall b. Data b => b -> b) -> JsonFieldSpec -> JsonFieldSpec)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> JsonFieldSpec -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> JsonFieldSpec -> r)
-> (forall u. (forall d. Data d => d -> u) -> JsonFieldSpec -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> JsonFieldSpec -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec)
-> Data JsonFieldSpec
JsonFieldSpec -> DataType
JsonFieldSpec -> Constr
(forall b. Data b => b -> b) -> JsonFieldSpec -> JsonFieldSpec
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JsonFieldSpec -> c JsonFieldSpec
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JsonFieldSpec
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> JsonFieldSpec -> u
forall u. (forall d. Data d => d -> u) -> JsonFieldSpec -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JsonFieldSpec -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JsonFieldSpec -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JsonFieldSpec
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JsonFieldSpec -> c JsonFieldSpec
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c JsonFieldSpec)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c JsonFieldSpec)
$cJsonField :: Constr
$cIntField :: Constr
$tJsonFieldSpec :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec
gmapMp :: (forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec
gmapM :: (forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> JsonFieldSpec -> m JsonFieldSpec
gmapQi :: Int -> (forall d. Data d => d -> u) -> JsonFieldSpec -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> JsonFieldSpec -> u
gmapQ :: (forall d. Data d => d -> u) -> JsonFieldSpec -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> JsonFieldSpec -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JsonFieldSpec -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> JsonFieldSpec -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JsonFieldSpec -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> JsonFieldSpec -> r
gmapT :: (forall b. Data b => b -> b) -> JsonFieldSpec -> JsonFieldSpec
$cgmapT :: (forall b. Data b => b -> b) -> JsonFieldSpec -> JsonFieldSpec
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c JsonFieldSpec)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c JsonFieldSpec)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c JsonFieldSpec)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c JsonFieldSpec)
dataTypeOf :: JsonFieldSpec -> DataType
$cdataTypeOf :: JsonFieldSpec -> DataType
toConstr :: JsonFieldSpec -> Constr
$ctoConstr :: JsonFieldSpec -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JsonFieldSpec
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c JsonFieldSpec
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JsonFieldSpec -> c JsonFieldSpec
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> JsonFieldSpec -> c JsonFieldSpec
$cp1Data :: Typeable JsonFieldSpec
Data, JsonFieldSpec -> Q Exp
JsonFieldSpec -> Q (TExp JsonFieldSpec)
(JsonFieldSpec -> Q Exp)
-> (JsonFieldSpec -> Q (TExp JsonFieldSpec)) -> Lift JsonFieldSpec
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: JsonFieldSpec -> Q (TExp JsonFieldSpec)
$cliftTyped :: JsonFieldSpec -> Q (TExp JsonFieldSpec)
lift :: JsonFieldSpec -> Q Exp
$clift :: JsonFieldSpec -> Q Exp
Lift)

instance FromJSON JsonFieldSpec

instance Hashable JsonFieldSpec

instance Cacheable JsonFieldSpec

instance ToJSON JsonFieldSpec

instance NFData JsonFieldSpec

data Aliased a = Aliased
  { Aliased a -> a
aliasedThing :: a,
    Aliased a -> Text
aliasedAlias :: Text
  }
  deriving (Aliased a -> Aliased a -> Bool
(Aliased a -> Aliased a -> Bool)
-> (Aliased a -> Aliased a -> Bool) -> Eq (Aliased a)
forall a. Eq a => Aliased a -> Aliased a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Aliased a -> Aliased a -> Bool
$c/= :: forall a. Eq a => Aliased a -> Aliased a -> Bool
== :: Aliased a -> Aliased a -> Bool
$c== :: forall a. Eq a => Aliased a -> Aliased a -> Bool
Eq, Int -> Aliased a -> ShowS
[Aliased a] -> ShowS
Aliased a -> String
(Int -> Aliased a -> ShowS)
-> (Aliased a -> String)
-> ([Aliased a] -> ShowS)
-> Show (Aliased a)
forall a. Show a => Int -> Aliased a -> ShowS
forall a. Show a => [Aliased a] -> ShowS
forall a. Show a => Aliased a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Aliased a] -> ShowS
$cshowList :: forall a. Show a => [Aliased a] -> ShowS
show :: Aliased a -> String
$cshow :: forall a. Show a => Aliased a -> String
showsPrec :: Int -> Aliased a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Aliased a -> ShowS
Show, (forall x. Aliased a -> Rep (Aliased a) x)
-> (forall x. Rep (Aliased a) x -> Aliased a)
-> Generic (Aliased a)
forall x. Rep (Aliased a) x -> Aliased a
forall x. Aliased a -> Rep (Aliased a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (Aliased a) x -> Aliased a
forall a x. Aliased a -> Rep (Aliased a) x
$cto :: forall a x. Rep (Aliased a) x -> Aliased a
$cfrom :: forall a x. Aliased a -> Rep (Aliased a) x
Generic, Typeable (Aliased a)
DataType
Constr
Typeable (Aliased a)
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Aliased a -> c (Aliased a))
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Aliased a))
-> (Aliased a -> Constr)
-> (Aliased a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Aliased a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Aliased a)))
-> ((forall b. Data b => b -> b) -> Aliased a -> Aliased a)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Aliased a -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Aliased a -> r)
-> (forall u. (forall d. Data d => d -> u) -> Aliased a -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Aliased a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a))
-> Data (Aliased a)
Aliased a -> DataType
Aliased a -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Aliased a))
(forall b. Data b => b -> b) -> Aliased a -> Aliased a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aliased a -> c (Aliased a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Aliased a)
forall a. Data a => Typeable (Aliased a)
forall a. Data a => Aliased a -> DataType
forall a. Data a => Aliased a -> Constr
forall a.
Data a =>
(forall b. Data b => b -> b) -> Aliased a -> Aliased a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Aliased a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> Aliased a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Aliased a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Aliased a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Aliased a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aliased a -> c (Aliased a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Aliased a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Aliased a))
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Aliased a -> u
forall u. (forall d. Data d => d -> u) -> Aliased a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Aliased a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Aliased a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Aliased a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aliased a -> c (Aliased a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Aliased a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Aliased a))
$cAliased :: Constr
$tAliased :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
gmapMp :: (forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
gmapM :: (forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Aliased a -> m (Aliased a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Aliased a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Aliased a -> u
gmapQ :: (forall d. Data d => d -> u) -> Aliased a -> [u]
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> Aliased a -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Aliased a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Aliased a -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Aliased a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Aliased a -> r
gmapT :: (forall b. Data b => b -> b) -> Aliased a -> Aliased a
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> Aliased a -> Aliased a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Aliased a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Aliased a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Aliased a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Aliased a))
dataTypeOf :: Aliased a -> DataType
$cdataTypeOf :: forall a. Data a => Aliased a -> DataType
toConstr :: Aliased a -> Constr
$ctoConstr :: forall a. Data a => Aliased a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Aliased a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Aliased a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aliased a -> c (Aliased a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Aliased a -> c (Aliased a)
$cp1Data :: forall a. Data a => Typeable (Aliased a)
Data, Aliased a -> Q Exp
Aliased a -> Q (TExp (Aliased a))
(Aliased a -> Q Exp)
-> (Aliased a -> Q (TExp (Aliased a))) -> Lift (Aliased a)
forall a. Lift a => Aliased a -> Q Exp
forall a. Lift a => Aliased a -> Q (TExp (Aliased a))
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Aliased a -> Q (TExp (Aliased a))
$cliftTyped :: forall a. Lift a => Aliased a -> Q (TExp (Aliased a))
lift :: Aliased a -> Q Exp
$clift :: forall a. Lift a => Aliased a -> Q Exp
Lift, a -> Aliased b -> Aliased a
(a -> b) -> Aliased a -> Aliased b
(forall a b. (a -> b) -> Aliased a -> Aliased b)
-> (forall a b. a -> Aliased b -> Aliased a) -> Functor Aliased
forall a b. a -> Aliased b -> Aliased a
forall a b. (a -> b) -> Aliased a -> Aliased b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Aliased b -> Aliased a
$c<$ :: forall a b. a -> Aliased b -> Aliased a
fmap :: (a -> b) -> Aliased a -> Aliased b
$cfmap :: forall a b. (a -> b) -> Aliased a -> Aliased b
Functor)

instance FromJSON a => FromJSON (Aliased a)

instance Hashable a => Hashable (Aliased a)

instance Cacheable a => Cacheable (Aliased a)

instance ToJSON a => ToJSON (Aliased a)

instance NFData a => NFData (Aliased a)

deriving instance Ord a => Ord (Aliased a)

newtype SchemaName = SchemaName
  { SchemaName -> [Text]
schemaNameParts :: [Text]
  }
  deriving (SchemaName -> ()
(SchemaName -> ()) -> NFData SchemaName
forall a. (a -> ()) -> NFData a
rnf :: SchemaName -> ()
$crnf :: SchemaName -> ()
NFData, SchemaName -> SchemaName -> Bool
(SchemaName -> SchemaName -> Bool)
-> (SchemaName -> SchemaName -> Bool) -> Eq SchemaName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SchemaName -> SchemaName -> Bool
$c/= :: SchemaName -> SchemaName -> Bool
== :: SchemaName -> SchemaName -> Bool
$c== :: SchemaName -> SchemaName -> Bool
Eq, Eq SchemaName
Eq SchemaName
-> (SchemaName -> SchemaName -> Ordering)
-> (SchemaName -> SchemaName -> Bool)
-> (SchemaName -> SchemaName -> Bool)
-> (SchemaName -> SchemaName -> Bool)
-> (SchemaName -> SchemaName -> Bool)
-> (SchemaName -> SchemaName -> SchemaName)
-> (SchemaName -> SchemaName -> SchemaName)
-> Ord SchemaName
SchemaName -> SchemaName -> Bool
SchemaName -> SchemaName -> Ordering
SchemaName -> SchemaName -> SchemaName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SchemaName -> SchemaName -> SchemaName
$cmin :: SchemaName -> SchemaName -> SchemaName
max :: SchemaName -> SchemaName -> SchemaName
$cmax :: SchemaName -> SchemaName -> SchemaName
>= :: SchemaName -> SchemaName -> Bool
$c>= :: SchemaName -> SchemaName -> Bool
> :: SchemaName -> SchemaName -> Bool
$c> :: SchemaName -> SchemaName -> Bool
<= :: SchemaName -> SchemaName -> Bool
$c<= :: SchemaName -> SchemaName -> Bool
< :: SchemaName -> SchemaName -> Bool
$c< :: SchemaName -> SchemaName -> Bool
compare :: SchemaName -> SchemaName -> Ordering
$ccompare :: SchemaName -> SchemaName -> Ordering
$cp1Ord :: Eq SchemaName
Ord, Int -> SchemaName -> ShowS
[SchemaName] -> ShowS
SchemaName -> String
(Int -> SchemaName -> ShowS)
-> (SchemaName -> String)
-> ([SchemaName] -> ShowS)
-> Show SchemaName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SchemaName] -> ShowS
$cshowList :: [SchemaName] -> ShowS
show :: SchemaName -> String
$cshow :: SchemaName -> String
showsPrec :: Int -> SchemaName -> ShowS
$cshowsPrec :: Int -> SchemaName -> ShowS
Show, (forall x. SchemaName -> Rep SchemaName x)
-> (forall x. Rep SchemaName x -> SchemaName) -> Generic SchemaName
forall x. Rep SchemaName x -> SchemaName
forall x. SchemaName -> Rep SchemaName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SchemaName x -> SchemaName
$cfrom :: forall x. SchemaName -> Rep SchemaName x
Generic, Typeable SchemaName
DataType
Constr
Typeable SchemaName
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SchemaName -> c SchemaName)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SchemaName)
-> (SchemaName -> Constr)
-> (SchemaName -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SchemaName))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SchemaName))
-> ((forall b. Data b => b -> b) -> SchemaName -> SchemaName)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SchemaName -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SchemaName -> r)
-> (forall u. (forall d. Data d => d -> u) -> SchemaName -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> SchemaName -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SchemaName -> m SchemaName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SchemaName -> m SchemaName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SchemaName -> m SchemaName)
-> Data SchemaName
SchemaName -> DataType
SchemaName -> Constr
(forall b. Data b => b -> b) -> SchemaName -> SchemaName
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SchemaName -> c SchemaName
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SchemaName
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SchemaName -> u
forall u. (forall d. Data d => d -> u) -> SchemaName -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SchemaName -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SchemaName -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SchemaName -> m SchemaName
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SchemaName -> m SchemaName
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SchemaName
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SchemaName -> c SchemaName
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SchemaName)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SchemaName)
$cSchemaName :: Constr
$tSchemaName :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SchemaName -> m SchemaName
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SchemaName -> m SchemaName
gmapMp :: (forall d. Data d => d -> m d) -> SchemaName -> m SchemaName
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SchemaName -> m SchemaName
gmapM :: (forall d. Data d => d -> m d) -> SchemaName -> m SchemaName
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SchemaName -> m SchemaName
gmapQi :: Int -> (forall d. Data d => d -> u) -> SchemaName -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SchemaName -> u
gmapQ :: (forall d. Data d => d -> u) -> SchemaName -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SchemaName -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SchemaName -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SchemaName -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SchemaName -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SchemaName -> r
gmapT :: (forall b. Data b => b -> b) -> SchemaName -> SchemaName
$cgmapT :: (forall b. Data b => b -> b) -> SchemaName -> SchemaName
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SchemaName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SchemaName)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SchemaName)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SchemaName)
dataTypeOf :: SchemaName -> DataType
$cdataTypeOf :: SchemaName -> DataType
toConstr :: SchemaName -> Constr
$ctoConstr :: SchemaName -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SchemaName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SchemaName
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SchemaName -> c SchemaName
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SchemaName -> c SchemaName
$cp1Data :: Typeable SchemaName
Data, SchemaName -> Q Exp
SchemaName -> Q (TExp SchemaName)
(SchemaName -> Q Exp)
-> (SchemaName -> Q (TExp SchemaName)) -> Lift SchemaName
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: SchemaName -> Q (TExp SchemaName)
$cliftTyped :: SchemaName -> Q (TExp SchemaName)
lift :: SchemaName -> Q Exp
$clift :: SchemaName -> Q Exp
Lift, Value -> Parser [SchemaName]
Value -> Parser SchemaName
(Value -> Parser SchemaName)
-> (Value -> Parser [SchemaName]) -> FromJSON SchemaName
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [SchemaName]
$cparseJSONList :: Value -> Parser [SchemaName]
parseJSON :: Value -> Parser SchemaName
$cparseJSON :: Value -> Parser SchemaName
FromJSON, [SchemaName] -> Value
[SchemaName] -> Encoding
SchemaName -> Value
SchemaName -> Encoding
(SchemaName -> Value)
-> (SchemaName -> Encoding)
-> ([SchemaName] -> Value)
-> ([SchemaName] -> Encoding)
-> ToJSON SchemaName
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [SchemaName] -> Encoding
$ctoEncodingList :: [SchemaName] -> Encoding
toJSONList :: [SchemaName] -> Value
$ctoJSONList :: [SchemaName] -> Value
toEncoding :: SchemaName -> Encoding
$ctoEncoding :: SchemaName -> Encoding
toJSON :: SchemaName -> Value
$ctoJSON :: SchemaName -> Value
ToJSON, Int -> SchemaName -> Int
SchemaName -> Int
(Int -> SchemaName -> Int)
-> (SchemaName -> Int) -> Hashable SchemaName
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: SchemaName -> Int
$chash :: SchemaName -> Int
hashWithSalt :: Int -> SchemaName -> Int
$chashWithSalt :: Int -> SchemaName -> Int
Hashable, Eq SchemaName
Eq SchemaName
-> (Accesses -> SchemaName -> SchemaName -> Bool)
-> Cacheable SchemaName
Accesses -> SchemaName -> SchemaName -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> SchemaName -> SchemaName -> Bool
$cunchanged :: Accesses -> SchemaName -> SchemaName -> Bool
$cp1Cacheable :: Eq SchemaName
Cacheable)

data TableName = TableName
  { TableName -> Text
tableName :: Text,
    TableName -> Text
tableNameSchema :: Text
  }
  deriving (TableName -> TableName -> Bool
(TableName -> TableName -> Bool)
-> (TableName -> TableName -> Bool) -> Eq TableName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableName -> TableName -> Bool
$c/= :: TableName -> TableName -> Bool
== :: TableName -> TableName -> Bool
$c== :: TableName -> TableName -> Bool
Eq, Int -> TableName -> ShowS
[TableName] -> ShowS
TableName -> String
(Int -> TableName -> ShowS)
-> (TableName -> String)
-> ([TableName] -> ShowS)
-> Show TableName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TableName] -> ShowS
$cshowList :: [TableName] -> ShowS
show :: TableName -> String
$cshow :: TableName -> String
showsPrec :: Int -> TableName -> ShowS
$cshowsPrec :: Int -> TableName -> ShowS
Show, (forall x. TableName -> Rep TableName x)
-> (forall x. Rep TableName x -> TableName) -> Generic TableName
forall x. Rep TableName x -> TableName
forall x. TableName -> Rep TableName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TableName x -> TableName
$cfrom :: forall x. TableName -> Rep TableName x
Generic, Typeable TableName
DataType
Constr
Typeable TableName
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> TableName -> c TableName)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TableName)
-> (TableName -> Constr)
-> (TableName -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TableName))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TableName))
-> ((forall b. Data b => b -> b) -> TableName -> TableName)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TableName -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TableName -> r)
-> (forall u. (forall d. Data d => d -> u) -> TableName -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> TableName -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TableName -> m TableName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TableName -> m TableName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TableName -> m TableName)
-> Data TableName
TableName -> DataType
TableName -> Constr
(forall b. Data b => b -> b) -> TableName -> TableName
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TableName -> c TableName
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TableName
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TableName -> u
forall u. (forall d. Data d => d -> u) -> TableName -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TableName -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TableName -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TableName -> m TableName
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TableName -> m TableName
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TableName
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TableName -> c TableName
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TableName)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TableName)
$cTableName :: Constr
$tTableName :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> TableName -> m TableName
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TableName -> m TableName
gmapMp :: (forall d. Data d => d -> m d) -> TableName -> m TableName
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TableName -> m TableName
gmapM :: (forall d. Data d => d -> m d) -> TableName -> m TableName
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TableName -> m TableName
gmapQi :: Int -> (forall d. Data d => d -> u) -> TableName -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TableName -> u
gmapQ :: (forall d. Data d => d -> u) -> TableName -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TableName -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TableName -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TableName -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TableName -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TableName -> r
gmapT :: (forall b. Data b => b -> b) -> TableName -> TableName
$cgmapT :: (forall b. Data b => b -> b) -> TableName -> TableName
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TableName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TableName)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TableName)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TableName)
dataTypeOf :: TableName -> DataType
$cdataTypeOf :: TableName -> DataType
toConstr :: TableName -> Constr
$ctoConstr :: TableName -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TableName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TableName
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TableName -> c TableName
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TableName -> c TableName
$cp1Data :: Typeable TableName
Data, TableName -> Q Exp
TableName -> Q (TExp TableName)
(TableName -> Q Exp)
-> (TableName -> Q (TExp TableName)) -> Lift TableName
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: TableName -> Q (TExp TableName)
$cliftTyped :: TableName -> Q (TExp TableName)
lift :: TableName -> Q Exp
$clift :: TableName -> Q Exp
Lift, Eq TableName
Eq TableName
-> (TableName -> TableName -> Ordering)
-> (TableName -> TableName -> Bool)
-> (TableName -> TableName -> Bool)
-> (TableName -> TableName -> Bool)
-> (TableName -> TableName -> Bool)
-> (TableName -> TableName -> TableName)
-> (TableName -> TableName -> TableName)
-> Ord TableName
TableName -> TableName -> Bool
TableName -> TableName -> Ordering
TableName -> TableName -> TableName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: TableName -> TableName -> TableName
$cmin :: TableName -> TableName -> TableName
max :: TableName -> TableName -> TableName
$cmax :: TableName -> TableName -> TableName
>= :: TableName -> TableName -> Bool
$c>= :: TableName -> TableName -> Bool
> :: TableName -> TableName -> Bool
$c> :: TableName -> TableName -> Bool
<= :: TableName -> TableName -> Bool
$c<= :: TableName -> TableName -> Bool
< :: TableName -> TableName -> Bool
$c< :: TableName -> TableName -> Bool
compare :: TableName -> TableName -> Ordering
$ccompare :: TableName -> TableName -> Ordering
$cp1Ord :: Eq TableName
Ord)

instance FromJSON TableName where
  parseJSON :: Value -> Parser TableName
parseJSON =
    String -> (Object -> Parser TableName) -> Value -> Parser TableName
forall a. String -> (Object -> Parser a) -> Value -> Parser a
J.withObject
      String
"TableName"
      (\Object
o -> Text -> Text -> TableName
TableName (Text -> Text -> TableName)
-> Parser Text -> Parser (Text -> TableName)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
J..: Key
"name" Parser (Text -> TableName) -> Parser Text -> Parser TableName
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
J..: Key
"dataset")

instance ToJSON TableName where
  toJSON :: TableName -> Value
toJSON TableName {Text
tableNameSchema :: Text
tableName :: Text
$sel:tableNameSchema:TableName :: TableName -> Text
$sel:tableName:TableName :: TableName -> Text
..} = [Pair] -> Value
J.object [Key
"name" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
J..= Text
tableName, Key
"dataset" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
J..= Text
tableNameSchema]

instance Hashable TableName

instance Cacheable TableName

instance ToJSONKey TableName

instance NFData TableName

instance ToTxt TableName where
  toTxt :: TableName -> Text
toTxt TableName {Text
tableNameSchema :: Text
tableName :: Text
$sel:tableNameSchema:TableName :: TableName -> Text
$sel:tableName:TableName :: TableName -> Text
..} = Text
tableNameSchema Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
"." Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
tableName

instance ToErrorValue TableName where
  toErrorValue :: TableName -> ErrorMessage
toErrorValue = Text -> ErrorMessage
ErrorValue.squote (Text -> ErrorMessage)
-> (TableName -> Text) -> TableName -> ErrorMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TableName -> Text
forall a. ToTxt a => a -> Text
toTxt

data FieldName = FieldName
  { FieldName -> Text
fieldName :: Text,
    FieldName -> Text
fieldNameEntity :: Text
  }
  deriving (FieldName -> FieldName -> Bool
(FieldName -> FieldName -> Bool)
-> (FieldName -> FieldName -> Bool) -> Eq FieldName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FieldName -> FieldName -> Bool
$c/= :: FieldName -> FieldName -> Bool
== :: FieldName -> FieldName -> Bool
$c== :: FieldName -> FieldName -> Bool
Eq, Eq FieldName
Eq FieldName
-> (FieldName -> FieldName -> Ordering)
-> (FieldName -> FieldName -> Bool)
-> (FieldName -> FieldName -> Bool)
-> (FieldName -> FieldName -> Bool)
-> (FieldName -> FieldName -> Bool)
-> (FieldName -> FieldName -> FieldName)
-> (FieldName -> FieldName -> FieldName)
-> Ord FieldName
FieldName -> FieldName -> Bool
FieldName -> FieldName -> Ordering
FieldName -> FieldName -> FieldName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: FieldName -> FieldName -> FieldName
$cmin :: FieldName -> FieldName -> FieldName
max :: FieldName -> FieldName -> FieldName
$cmax :: FieldName -> FieldName -> FieldName
>= :: FieldName -> FieldName -> Bool
$c>= :: FieldName -> FieldName -> Bool
> :: FieldName -> FieldName -> Bool
$c> :: FieldName -> FieldName -> Bool
<= :: FieldName -> FieldName -> Bool
$c<= :: FieldName -> FieldName -> Bool
< :: FieldName -> FieldName -> Bool
$c< :: FieldName -> FieldName -> Bool
compare :: FieldName -> FieldName -> Ordering
$ccompare :: FieldName -> FieldName -> Ordering
$cp1Ord :: Eq FieldName
Ord, Int -> FieldName -> ShowS
[FieldName] -> ShowS
FieldName -> String
(Int -> FieldName -> ShowS)
-> (FieldName -> String)
-> ([FieldName] -> ShowS)
-> Show FieldName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FieldName] -> ShowS
$cshowList :: [FieldName] -> ShowS
show :: FieldName -> String
$cshow :: FieldName -> String
showsPrec :: Int -> FieldName -> ShowS
$cshowsPrec :: Int -> FieldName -> ShowS
Show, (forall x. FieldName -> Rep FieldName x)
-> (forall x. Rep FieldName x -> FieldName) -> Generic FieldName
forall x. Rep FieldName x -> FieldName
forall x. FieldName -> Rep FieldName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FieldName x -> FieldName
$cfrom :: forall x. FieldName -> Rep FieldName x
Generic, Typeable FieldName
DataType
Constr
Typeable FieldName
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> FieldName -> c FieldName)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c FieldName)
-> (FieldName -> Constr)
-> (FieldName -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c FieldName))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldName))
-> ((forall b. Data b => b -> b) -> FieldName -> FieldName)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldName -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FieldName -> r)
-> (forall u. (forall d. Data d => d -> u) -> FieldName -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> FieldName -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> FieldName -> m FieldName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> FieldName -> m FieldName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> FieldName -> m FieldName)
-> Data FieldName
FieldName -> DataType
FieldName -> Constr
(forall b. Data b => b -> b) -> FieldName -> FieldName
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldName -> c FieldName
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FieldName
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> FieldName -> u
forall u. (forall d. Data d => d -> u) -> FieldName -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FieldName -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FieldName -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FieldName -> m FieldName
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FieldName -> m FieldName
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FieldName
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldName -> c FieldName
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FieldName)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldName)
$cFieldName :: Constr
$tFieldName :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> FieldName -> m FieldName
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FieldName -> m FieldName
gmapMp :: (forall d. Data d => d -> m d) -> FieldName -> m FieldName
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FieldName -> m FieldName
gmapM :: (forall d. Data d => d -> m d) -> FieldName -> m FieldName
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FieldName -> m FieldName
gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldName -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FieldName -> u
gmapQ :: (forall d. Data d => d -> u) -> FieldName -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> FieldName -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FieldName -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FieldName -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FieldName -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FieldName -> r
gmapT :: (forall b. Data b => b -> b) -> FieldName -> FieldName
$cgmapT :: (forall b. Data b => b -> b) -> FieldName -> FieldName
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldName)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c FieldName)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FieldName)
dataTypeOf :: FieldName -> DataType
$cdataTypeOf :: FieldName -> DataType
toConstr :: FieldName -> Constr
$ctoConstr :: FieldName -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FieldName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FieldName
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldName -> c FieldName
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FieldName -> c FieldName
$cp1Data :: Typeable FieldName
Data, FieldName -> Q Exp
FieldName -> Q (TExp FieldName)
(FieldName -> Q Exp)
-> (FieldName -> Q (TExp FieldName)) -> Lift FieldName
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: FieldName -> Q (TExp FieldName)
$cliftTyped :: FieldName -> Q (TExp FieldName)
lift :: FieldName -> Q Exp
$clift :: FieldName -> Q Exp
Lift)

instance FromJSON FieldName

instance Hashable FieldName

instance Cacheable FieldName

instance ToJSON FieldName

instance NFData FieldName

newtype ColumnName = ColumnName
  { ColumnName -> Text
columnName :: Text
  }
  deriving (ColumnName -> ColumnName -> Bool
(ColumnName -> ColumnName -> Bool)
-> (ColumnName -> ColumnName -> Bool) -> Eq ColumnName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColumnName -> ColumnName -> Bool
$c/= :: ColumnName -> ColumnName -> Bool
== :: ColumnName -> ColumnName -> Bool
$c== :: ColumnName -> ColumnName -> Bool
Eq, Eq ColumnName
Eq ColumnName
-> (ColumnName -> ColumnName -> Ordering)
-> (ColumnName -> ColumnName -> Bool)
-> (ColumnName -> ColumnName -> Bool)
-> (ColumnName -> ColumnName -> Bool)
-> (ColumnName -> ColumnName -> Bool)
-> (ColumnName -> ColumnName -> ColumnName)
-> (ColumnName -> ColumnName -> ColumnName)
-> Ord ColumnName
ColumnName -> ColumnName -> Bool
ColumnName -> ColumnName -> Ordering
ColumnName -> ColumnName -> ColumnName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ColumnName -> ColumnName -> ColumnName
$cmin :: ColumnName -> ColumnName -> ColumnName
max :: ColumnName -> ColumnName -> ColumnName
$cmax :: ColumnName -> ColumnName -> ColumnName
>= :: ColumnName -> ColumnName -> Bool
$c>= :: ColumnName -> ColumnName -> Bool
> :: ColumnName -> ColumnName -> Bool
$c> :: ColumnName -> ColumnName -> Bool
<= :: ColumnName -> ColumnName -> Bool
$c<= :: ColumnName -> ColumnName -> Bool
< :: ColumnName -> ColumnName -> Bool
$c< :: ColumnName -> ColumnName -> Bool
compare :: ColumnName -> ColumnName -> Ordering
$ccompare :: ColumnName -> ColumnName -> Ordering
$cp1Ord :: Eq ColumnName
Ord, Int -> ColumnName -> ShowS
[ColumnName] -> ShowS
ColumnName -> String
(Int -> ColumnName -> ShowS)
-> (ColumnName -> String)
-> ([ColumnName] -> ShowS)
-> Show ColumnName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ColumnName] -> ShowS
$cshowList :: [ColumnName] -> ShowS
show :: ColumnName -> String
$cshow :: ColumnName -> String
showsPrec :: Int -> ColumnName -> ShowS
$cshowsPrec :: Int -> ColumnName -> ShowS
Show, (forall x. ColumnName -> Rep ColumnName x)
-> (forall x. Rep ColumnName x -> ColumnName) -> Generic ColumnName
forall x. Rep ColumnName x -> ColumnName
forall x. ColumnName -> Rep ColumnName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ColumnName x -> ColumnName
$cfrom :: forall x. ColumnName -> Rep ColumnName x
Generic, Typeable ColumnName
DataType
Constr
Typeable ColumnName
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ColumnName -> c ColumnName)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ColumnName)
-> (ColumnName -> Constr)
-> (ColumnName -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ColumnName))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ColumnName))
-> ((forall b. Data b => b -> b) -> ColumnName -> ColumnName)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ColumnName -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ColumnName -> r)
-> (forall u. (forall d. Data d => d -> u) -> ColumnName -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ColumnName -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ColumnName -> m ColumnName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ColumnName -> m ColumnName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ColumnName -> m ColumnName)
-> Data ColumnName
ColumnName -> DataType
ColumnName -> Constr
(forall b. Data b => b -> b) -> ColumnName -> ColumnName
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ColumnName -> c ColumnName
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ColumnName
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ColumnName -> u
forall u. (forall d. Data d => d -> u) -> ColumnName -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ColumnName -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ColumnName -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ColumnName -> m ColumnName
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ColumnName -> m ColumnName
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ColumnName
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ColumnName -> c ColumnName
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ColumnName)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ColumnName)
$cColumnName :: Constr
$tColumnName :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ColumnName -> m ColumnName
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ColumnName -> m ColumnName
gmapMp :: (forall d. Data d => d -> m d) -> ColumnName -> m ColumnName
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ColumnName -> m ColumnName
gmapM :: (forall d. Data d => d -> m d) -> ColumnName -> m ColumnName
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ColumnName -> m ColumnName
gmapQi :: Int -> (forall d. Data d => d -> u) -> ColumnName -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ColumnName -> u
gmapQ :: (forall d. Data d => d -> u) -> ColumnName -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ColumnName -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ColumnName -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ColumnName -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ColumnName -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ColumnName -> r
gmapT :: (forall b. Data b => b -> b) -> ColumnName -> ColumnName
$cgmapT :: (forall b. Data b => b -> b) -> ColumnName -> ColumnName
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ColumnName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ColumnName)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ColumnName)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ColumnName)
dataTypeOf :: ColumnName -> DataType
$cdataTypeOf :: ColumnName -> DataType
toConstr :: ColumnName -> Constr
$ctoConstr :: ColumnName -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ColumnName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ColumnName
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ColumnName -> c ColumnName
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ColumnName -> c ColumnName
$cp1Data :: Typeable ColumnName
Data, ColumnName -> Q Exp
ColumnName -> Q (TExp ColumnName)
(ColumnName -> Q Exp)
-> (ColumnName -> Q (TExp ColumnName)) -> Lift ColumnName
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: ColumnName -> Q (TExp ColumnName)
$cliftTyped :: ColumnName -> Q (TExp ColumnName)
lift :: ColumnName -> Q Exp
$clift :: ColumnName -> Q Exp
Lift, Value -> Parser [ColumnName]
Value -> Parser ColumnName
(Value -> Parser ColumnName)
-> (Value -> Parser [ColumnName]) -> FromJSON ColumnName
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [ColumnName]
$cparseJSONList :: Value -> Parser [ColumnName]
parseJSON :: Value -> Parser ColumnName
$cparseJSON :: Value -> Parser ColumnName
FromJSON, [ColumnName] -> Value
[ColumnName] -> Encoding
ColumnName -> Value
ColumnName -> Encoding
(ColumnName -> Value)
-> (ColumnName -> Encoding)
-> ([ColumnName] -> Value)
-> ([ColumnName] -> Encoding)
-> ToJSON ColumnName
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ColumnName] -> Encoding
$ctoEncodingList :: [ColumnName] -> Encoding
toJSONList :: [ColumnName] -> Value
$ctoJSONList :: [ColumnName] -> Value
toEncoding :: ColumnName -> Encoding
$ctoEncoding :: ColumnName -> Encoding
toJSON :: ColumnName -> Value
$ctoJSON :: ColumnName -> Value
ToJSON, ToJSONKeyFunction [ColumnName]
ToJSONKeyFunction ColumnName
ToJSONKeyFunction ColumnName
-> ToJSONKeyFunction [ColumnName] -> ToJSONKey ColumnName
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ColumnName]
$ctoJSONKeyList :: ToJSONKeyFunction [ColumnName]
toJSONKey :: ToJSONKeyFunction ColumnName
$ctoJSONKey :: ToJSONKeyFunction ColumnName
ToJSONKey, FromJSONKeyFunction [ColumnName]
FromJSONKeyFunction ColumnName
FromJSONKeyFunction ColumnName
-> FromJSONKeyFunction [ColumnName] -> FromJSONKey ColumnName
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ColumnName]
$cfromJSONKeyList :: FromJSONKeyFunction [ColumnName]
fromJSONKey :: FromJSONKeyFunction ColumnName
$cfromJSONKey :: FromJSONKeyFunction ColumnName
FromJSONKey, Int -> ColumnName -> Int
ColumnName -> Int
(Int -> ColumnName -> Int)
-> (ColumnName -> Int) -> Hashable ColumnName
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ColumnName -> Int
$chash :: ColumnName -> Int
hashWithSalt :: Int -> ColumnName -> Int
$chashWithSalt :: Int -> ColumnName -> Int
Hashable, Eq ColumnName
Eq ColumnName
-> (Accesses -> ColumnName -> ColumnName -> Bool)
-> Cacheable ColumnName
Accesses -> ColumnName -> ColumnName -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> ColumnName -> ColumnName -> Bool
$cunchanged :: Accesses -> ColumnName -> ColumnName -> Bool
$cp1Cacheable :: Eq ColumnName
Cacheable, ColumnName -> ()
(ColumnName -> ()) -> NFData ColumnName
forall a. (a -> ()) -> NFData a
rnf :: ColumnName -> ()
$crnf :: ColumnName -> ()
NFData, ColumnName -> Text
(ColumnName -> Text) -> ToTxt ColumnName
forall a. (a -> Text) -> ToTxt a
toTxt :: ColumnName -> Text
$ctoTxt :: ColumnName -> Text
ToTxt)

instance ToErrorValue ColumnName where
  toErrorValue :: ColumnName -> ErrorMessage
toErrorValue = Text -> ErrorMessage
ErrorValue.squote (Text -> ErrorMessage)
-> (ColumnName -> Text) -> ColumnName -> ErrorMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ColumnName -> Text
columnName

data Comment = DueToPermission | RequestedSingleObject
  deriving (Comment -> Comment -> Bool
(Comment -> Comment -> Bool)
-> (Comment -> Comment -> Bool) -> Eq Comment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Comment -> Comment -> Bool
$c/= :: Comment -> Comment -> Bool
== :: Comment -> Comment -> Bool
$c== :: Comment -> Comment -> Bool
Eq, Eq Comment
Eq Comment
-> (Comment -> Comment -> Ordering)
-> (Comment -> Comment -> Bool)
-> (Comment -> Comment -> Bool)
-> (Comment -> Comment -> Bool)
-> (Comment -> Comment -> Bool)
-> (Comment -> Comment -> Comment)
-> (Comment -> Comment -> Comment)
-> Ord Comment
Comment -> Comment -> Bool
Comment -> Comment -> Ordering
Comment -> Comment -> Comment
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Comment -> Comment -> Comment
$cmin :: Comment -> Comment -> Comment
max :: Comment -> Comment -> Comment
$cmax :: Comment -> Comment -> Comment
>= :: Comment -> Comment -> Bool
$c>= :: Comment -> Comment -> Bool
> :: Comment -> Comment -> Bool
$c> :: Comment -> Comment -> Bool
<= :: Comment -> Comment -> Bool
$c<= :: Comment -> Comment -> Bool
< :: Comment -> Comment -> Bool
$c< :: Comment -> Comment -> Bool
compare :: Comment -> Comment -> Ordering
$ccompare :: Comment -> Comment -> Ordering
$cp1Ord :: Eq Comment
Ord, Int -> Comment -> ShowS
[Comment] -> ShowS
Comment -> String
(Int -> Comment -> ShowS)
-> (Comment -> String) -> ([Comment] -> ShowS) -> Show Comment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Comment] -> ShowS
$cshowList :: [Comment] -> ShowS
show :: Comment -> String
$cshow :: Comment -> String
showsPrec :: Int -> Comment -> ShowS
$cshowsPrec :: Int -> Comment -> ShowS
Show, (forall x. Comment -> Rep Comment x)
-> (forall x. Rep Comment x -> Comment) -> Generic Comment
forall x. Rep Comment x -> Comment
forall x. Comment -> Rep Comment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Comment x -> Comment
$cfrom :: forall x. Comment -> Rep Comment x
Generic, Typeable Comment
DataType
Constr
Typeable Comment
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Comment -> c Comment)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Comment)
-> (Comment -> Constr)
-> (Comment -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Comment))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Comment))
-> ((forall b. Data b => b -> b) -> Comment -> Comment)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Comment -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Comment -> r)
-> (forall u. (forall d. Data d => d -> u) -> Comment -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Comment -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Comment -> m Comment)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Comment -> m Comment)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Comment -> m Comment)
-> Data Comment
Comment -> DataType
Comment -> Constr
(forall b. Data b => b -> b) -> Comment -> Comment
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Comment -> c Comment
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Comment
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Comment -> u
forall u. (forall d. Data d => d -> u) -> Comment -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Comment -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Comment -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Comment -> m Comment
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Comment -> m Comment
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Comment
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Comment -> c Comment
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Comment)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Comment)
$cRequestedSingleObject :: Constr
$cDueToPermission :: Constr
$tComment :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Comment -> m Comment
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Comment -> m Comment
gmapMp :: (forall d. Data d => d -> m d) -> Comment -> m Comment
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Comment -> m Comment
gmapM :: (forall d. Data d => d -> m d) -> Comment -> m Comment
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Comment -> m Comment
gmapQi :: Int -> (forall d. Data d => d -> u) -> Comment -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Comment -> u
gmapQ :: (forall d. Data d => d -> u) -> Comment -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Comment -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Comment -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Comment -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Comment -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Comment -> r
gmapT :: (forall b. Data b => b -> b) -> Comment -> Comment
$cgmapT :: (forall b. Data b => b -> b) -> Comment -> Comment
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Comment)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Comment)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Comment)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Comment)
dataTypeOf :: Comment -> DataType
$cdataTypeOf :: Comment -> DataType
toConstr :: Comment -> Constr
$ctoConstr :: Comment -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Comment
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Comment
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Comment -> c Comment
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Comment -> c Comment
$cp1Data :: Typeable Comment
Data, Comment -> Q Exp
Comment -> Q (TExp Comment)
(Comment -> Q Exp) -> (Comment -> Q (TExp Comment)) -> Lift Comment
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Comment -> Q (TExp Comment)
$cliftTyped :: Comment -> Q (TExp Comment)
lift :: Comment -> Q Exp
$clift :: Comment -> Q Exp
Lift)

instance FromJSON Comment

instance Hashable Comment

instance Cacheable Comment

instance ToJSON Comment

instance NFData Comment

newtype EntityAlias = EntityAlias
  { EntityAlias -> Text
entityAliasText :: Text
  }
  deriving (EntityAlias -> ()
(EntityAlias -> ()) -> NFData EntityAlias
forall a. (a -> ()) -> NFData a
rnf :: EntityAlias -> ()
$crnf :: EntityAlias -> ()
NFData, EntityAlias -> EntityAlias -> Bool
(EntityAlias -> EntityAlias -> Bool)
-> (EntityAlias -> EntityAlias -> Bool) -> Eq EntityAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntityAlias -> EntityAlias -> Bool
$c/= :: EntityAlias -> EntityAlias -> Bool
== :: EntityAlias -> EntityAlias -> Bool
$c== :: EntityAlias -> EntityAlias -> Bool
Eq, Eq EntityAlias
Eq EntityAlias
-> (EntityAlias -> EntityAlias -> Ordering)
-> (EntityAlias -> EntityAlias -> Bool)
-> (EntityAlias -> EntityAlias -> Bool)
-> (EntityAlias -> EntityAlias -> Bool)
-> (EntityAlias -> EntityAlias -> Bool)
-> (EntityAlias -> EntityAlias -> EntityAlias)
-> (EntityAlias -> EntityAlias -> EntityAlias)
-> Ord EntityAlias
EntityAlias -> EntityAlias -> Bool
EntityAlias -> EntityAlias -> Ordering
EntityAlias -> EntityAlias -> EntityAlias
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: EntityAlias -> EntityAlias -> EntityAlias
$cmin :: EntityAlias -> EntityAlias -> EntityAlias
max :: EntityAlias -> EntityAlias -> EntityAlias
$cmax :: EntityAlias -> EntityAlias -> EntityAlias
>= :: EntityAlias -> EntityAlias -> Bool
$c>= :: EntityAlias -> EntityAlias -> Bool
> :: EntityAlias -> EntityAlias -> Bool
$c> :: EntityAlias -> EntityAlias -> Bool
<= :: EntityAlias -> EntityAlias -> Bool
$c<= :: EntityAlias -> EntityAlias -> Bool
< :: EntityAlias -> EntityAlias -> Bool
$c< :: EntityAlias -> EntityAlias -> Bool
compare :: EntityAlias -> EntityAlias -> Ordering
$ccompare :: EntityAlias -> EntityAlias -> Ordering
$cp1Ord :: Eq EntityAlias
Ord, Int -> EntityAlias -> ShowS
[EntityAlias] -> ShowS
EntityAlias -> String
(Int -> EntityAlias -> ShowS)
-> (EntityAlias -> String)
-> ([EntityAlias] -> ShowS)
-> Show EntityAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EntityAlias] -> ShowS
$cshowList :: [EntityAlias] -> ShowS
show :: EntityAlias -> String
$cshow :: EntityAlias -> String
showsPrec :: Int -> EntityAlias -> ShowS
$cshowsPrec :: Int -> EntityAlias -> ShowS
Show, (forall x. EntityAlias -> Rep EntityAlias x)
-> (forall x. Rep EntityAlias x -> EntityAlias)
-> Generic EntityAlias
forall x. Rep EntityAlias x -> EntityAlias
forall x. EntityAlias -> Rep EntityAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EntityAlias x -> EntityAlias
$cfrom :: forall x. EntityAlias -> Rep EntityAlias x
Generic, Typeable EntityAlias
DataType
Constr
Typeable EntityAlias
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> EntityAlias -> c EntityAlias)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EntityAlias)
-> (EntityAlias -> Constr)
-> (EntityAlias -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EntityAlias))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c EntityAlias))
-> ((forall b. Data b => b -> b) -> EntityAlias -> EntityAlias)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EntityAlias -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EntityAlias -> r)
-> (forall u. (forall d. Data d => d -> u) -> EntityAlias -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> EntityAlias -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias)
-> Data EntityAlias
EntityAlias -> DataType
EntityAlias -> Constr
(forall b. Data b => b -> b) -> EntityAlias -> EntityAlias
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EntityAlias -> c EntityAlias
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EntityAlias
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> EntityAlias -> u
forall u. (forall d. Data d => d -> u) -> EntityAlias -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EntityAlias -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EntityAlias -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EntityAlias
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EntityAlias -> c EntityAlias
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EntityAlias)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EntityAlias)
$cEntityAlias :: Constr
$tEntityAlias :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias
gmapMp :: (forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias
gmapM :: (forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> EntityAlias -> m EntityAlias
gmapQi :: Int -> (forall d. Data d => d -> u) -> EntityAlias -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> EntityAlias -> u
gmapQ :: (forall d. Data d => d -> u) -> EntityAlias -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> EntityAlias -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EntityAlias -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EntityAlias -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EntityAlias -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EntityAlias -> r
gmapT :: (forall b. Data b => b -> b) -> EntityAlias -> EntityAlias
$cgmapT :: (forall b. Data b => b -> b) -> EntityAlias -> EntityAlias
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EntityAlias)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EntityAlias)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c EntityAlias)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EntityAlias)
dataTypeOf :: EntityAlias -> DataType
$cdataTypeOf :: EntityAlias -> DataType
toConstr :: EntityAlias -> Constr
$ctoConstr :: EntityAlias -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EntityAlias
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EntityAlias
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EntityAlias -> c EntityAlias
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> EntityAlias -> c EntityAlias
$cp1Data :: Typeable EntityAlias
Data, EntityAlias -> Q Exp
EntityAlias -> Q (TExp EntityAlias)
(EntityAlias -> Q Exp)
-> (EntityAlias -> Q (TExp EntityAlias)) -> Lift EntityAlias
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: EntityAlias -> Q (TExp EntityAlias)
$cliftTyped :: EntityAlias -> Q (TExp EntityAlias)
lift :: EntityAlias -> Q Exp
$clift :: EntityAlias -> Q Exp
Lift, Value -> Parser [EntityAlias]
Value -> Parser EntityAlias
(Value -> Parser EntityAlias)
-> (Value -> Parser [EntityAlias]) -> FromJSON EntityAlias
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [EntityAlias]
$cparseJSONList :: Value -> Parser [EntityAlias]
parseJSON :: Value -> Parser EntityAlias
$cparseJSON :: Value -> Parser EntityAlias
FromJSON, [EntityAlias] -> Value
[EntityAlias] -> Encoding
EntityAlias -> Value
EntityAlias -> Encoding
(EntityAlias -> Value)
-> (EntityAlias -> Encoding)
-> ([EntityAlias] -> Value)
-> ([EntityAlias] -> Encoding)
-> ToJSON EntityAlias
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [EntityAlias] -> Encoding
$ctoEncodingList :: [EntityAlias] -> Encoding
toJSONList :: [EntityAlias] -> Value
$ctoJSONList :: [EntityAlias] -> Value
toEncoding :: EntityAlias -> Encoding
$ctoEncoding :: EntityAlias -> Encoding
toJSON :: EntityAlias -> Value
$ctoJSON :: EntityAlias -> Value
ToJSON, Int -> EntityAlias -> Int
EntityAlias -> Int
(Int -> EntityAlias -> Int)
-> (EntityAlias -> Int) -> Hashable EntityAlias
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: EntityAlias -> Int
$chash :: EntityAlias -> Int
hashWithSalt :: Int -> EntityAlias -> Int
$chashWithSalt :: Int -> EntityAlias -> Int
Hashable, Eq EntityAlias
Eq EntityAlias
-> (Accesses -> EntityAlias -> EntityAlias -> Bool)
-> Cacheable EntityAlias
Accesses -> EntityAlias -> EntityAlias -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> EntityAlias -> EntityAlias -> Bool
$cunchanged :: Accesses -> EntityAlias -> EntityAlias -> Bool
$cp1Cacheable :: Eq EntityAlias
Cacheable)

columnToFieldName :: EntityAlias -> ColumnName -> FieldName
columnToFieldName :: EntityAlias -> ColumnName -> FieldName
columnToFieldName EntityAlias {Text
entityAliasText :: Text
$sel:entityAliasText:EntityAlias :: EntityAlias -> Text
..} ColumnName {Text
columnName :: Text
$sel:columnName:ColumnName :: ColumnName -> Text
..} =
  Text -> Text -> FieldName
FieldName Text
columnName Text
entityAliasText

data Op
  = LessOp
  | LessOrEqualOp
  | MoreOp
  | MoreOrEqualOp
  | InOp
  | NotInOp
  | LikeOp
  | NotLikeOp
  --  | SNE
  --  | SILIKE
  --  | SNILIKE
  --  | SSIMILAR
  --  | SNSIMILAR
  --  | SGTE
  --  | SLTE
  --  | SContains
  --  | SContainedIn
  --  | SHasKey
  --  | SHasKeysAny
  --  | SHasKeysAll
  deriving (Op -> Op -> Bool
(Op -> Op -> Bool) -> (Op -> Op -> Bool) -> Eq Op
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Op -> Op -> Bool
$c/= :: Op -> Op -> Bool
== :: Op -> Op -> Bool
$c== :: Op -> Op -> Bool
Eq, Eq Op
Eq Op
-> (Op -> Op -> Ordering)
-> (Op -> Op -> Bool)
-> (Op -> Op -> Bool)
-> (Op -> Op -> Bool)
-> (Op -> Op -> Bool)
-> (Op -> Op -> Op)
-> (Op -> Op -> Op)
-> Ord Op
Op -> Op -> Bool
Op -> Op -> Ordering
Op -> Op -> Op
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Op -> Op -> Op
$cmin :: Op -> Op -> Op
max :: Op -> Op -> Op
$cmax :: Op -> Op -> Op
>= :: Op -> Op -> Bool
$c>= :: Op -> Op -> Bool
> :: Op -> Op -> Bool
$c> :: Op -> Op -> Bool
<= :: Op -> Op -> Bool
$c<= :: Op -> Op -> Bool
< :: Op -> Op -> Bool
$c< :: Op -> Op -> Bool
compare :: Op -> Op -> Ordering
$ccompare :: Op -> Op -> Ordering
$cp1Ord :: Eq Op
Ord, Int -> Op -> ShowS
[Op] -> ShowS
Op -> String
(Int -> Op -> ShowS)
-> (Op -> String) -> ([Op] -> ShowS) -> Show Op
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Op] -> ShowS
$cshowList :: [Op] -> ShowS
show :: Op -> String
$cshow :: Op -> String
showsPrec :: Int -> Op -> ShowS
$cshowsPrec :: Int -> Op -> ShowS
Show, (forall x. Op -> Rep Op x)
-> (forall x. Rep Op x -> Op) -> Generic Op
forall x. Rep Op x -> Op
forall x. Op -> Rep Op x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Op x -> Op
$cfrom :: forall x. Op -> Rep Op x
Generic, Typeable Op
DataType
Constr
Typeable Op
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Op -> c Op)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Op)
-> (Op -> Constr)
-> (Op -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Op))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Op))
-> ((forall b. Data b => b -> b) -> Op -> Op)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r)
-> (forall u. (forall d. Data d => d -> u) -> Op -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Op -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Op -> m Op)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Op -> m Op)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Op -> m Op)
-> Data Op
Op -> DataType
Op -> Constr
(forall b. Data b => b -> b) -> Op -> Op
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Op -> c Op
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Op
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Op -> u
forall u. (forall d. Data d => d -> u) -> Op -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Op -> m Op
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Op -> m Op
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Op
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Op -> c Op
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Op)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Op)
$cNotLikeOp :: Constr
$cLikeOp :: Constr
$cNotInOp :: Constr
$cInOp :: Constr
$cMoreOrEqualOp :: Constr
$cMoreOp :: Constr
$cLessOrEqualOp :: Constr
$cLessOp :: Constr
$tOp :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Op -> m Op
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Op -> m Op
gmapMp :: (forall d. Data d => d -> m d) -> Op -> m Op
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Op -> m Op
gmapM :: (forall d. Data d => d -> m d) -> Op -> m Op
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Op -> m Op
gmapQi :: Int -> (forall d. Data d => d -> u) -> Op -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Op -> u
gmapQ :: (forall d. Data d => d -> u) -> Op -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Op -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Op -> r
gmapT :: (forall b. Data b => b -> b) -> Op -> Op
$cgmapT :: (forall b. Data b => b -> b) -> Op -> Op
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Op)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Op)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Op)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Op)
dataTypeOf :: Op -> DataType
$cdataTypeOf :: Op -> DataType
toConstr :: Op -> Constr
$ctoConstr :: Op -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Op
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Op
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Op -> c Op
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Op -> c Op
$cp1Data :: Typeable Op
Data, Op -> Q Exp
Op -> Q (TExp Op)
(Op -> Q Exp) -> (Op -> Q (TExp Op)) -> Lift Op
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Op -> Q (TExp Op)
$cliftTyped :: Op -> Q (TExp Op)
lift :: Op -> Q Exp
$clift :: Op -> Q Exp
Lift)

instance FromJSON Op

instance Hashable Op

instance Cacheable Op

instance ToJSON Op

instance NFData Op

-- | Source for this represenation type:
--
-- https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value
--
-- BigQuery results come in via the REST API as one of these simply types.
--
-- TODO: This omits StructValue -- do we need it?
data Value
  = NullValue
  | -- | 64-bit <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#integer_type>
    IntegerValue Int64
  | -- | Fixed precision <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#decimal_types>
    DecimalValue Decimal
  | -- | Fixed precision <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#decimal_types>
    BigDecimalValue BigDecimal
  | -- | Floating point <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#floating_point_types>
    FloatValue Float64
  | GeographyValue Geography
  | StringValue Text
  | BytesValue Base64
  | BoolValue Bool
  | ArrayValue (Vector Value)
  | TimestampValue Timestamp
  | DateValue Date
  | TimeValue Time
  | DatetimeValue Datetime
  deriving (Int -> Value -> ShowS
[Value] -> ShowS
Value -> String
(Int -> Value -> ShowS)
-> (Value -> String) -> ([Value] -> ShowS) -> Show Value
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Value] -> ShowS
$cshowList :: [Value] -> ShowS
show :: Value -> String
$cshow :: Value -> String
showsPrec :: Int -> Value -> ShowS
$cshowsPrec :: Int -> Value -> ShowS
Show, Value -> Value -> Bool
(Value -> Value -> Bool) -> (Value -> Value -> Bool) -> Eq Value
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Value -> Value -> Bool
$c/= :: Value -> Value -> Bool
== :: Value -> Value -> Bool
$c== :: Value -> Value -> Bool
Eq, Eq Value
Eq Value
-> (Value -> Value -> Ordering)
-> (Value -> Value -> Bool)
-> (Value -> Value -> Bool)
-> (Value -> Value -> Bool)
-> (Value -> Value -> Bool)
-> (Value -> Value -> Value)
-> (Value -> Value -> Value)
-> Ord Value
Value -> Value -> Bool
Value -> Value -> Ordering
Value -> Value -> Value
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Value -> Value -> Value
$cmin :: Value -> Value -> Value
max :: Value -> Value -> Value
$cmax :: Value -> Value -> Value
>= :: Value -> Value -> Bool
$c>= :: Value -> Value -> Bool
> :: Value -> Value -> Bool
$c> :: Value -> Value -> Bool
<= :: Value -> Value -> Bool
$c<= :: Value -> Value -> Bool
< :: Value -> Value -> Bool
$c< :: Value -> Value -> Bool
compare :: Value -> Value -> Ordering
$ccompare :: Value -> Value -> Ordering
$cp1Ord :: Eq Value
Ord, (forall x. Value -> Rep Value x)
-> (forall x. Rep Value x -> Value) -> Generic Value
forall x. Rep Value x -> Value
forall x. Value -> Rep Value x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Value x -> Value
$cfrom :: forall x. Value -> Rep Value x
Generic, Typeable Value
DataType
Constr
Typeable Value
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Value -> c Value)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Value)
-> (Value -> Constr)
-> (Value -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Value))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value))
-> ((forall b. Data b => b -> b) -> Value -> Value)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r)
-> (forall u. (forall d. Data d => d -> u) -> Value -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Value -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Value -> m Value)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Value -> m Value)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Value -> m Value)
-> Data Value
Value -> DataType
Value -> Constr
(forall b. Data b => b -> b) -> Value -> Value
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Value -> c Value
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Value
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Value -> u
forall u. (forall d. Data d => d -> u) -> Value -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Value -> m Value
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Value -> m Value
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Value
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Value -> c Value
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Value)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value)
$cDatetimeValue :: Constr
$cTimeValue :: Constr
$cDateValue :: Constr
$cTimestampValue :: Constr
$cArrayValue :: Constr
$cBoolValue :: Constr
$cBytesValue :: Constr
$cStringValue :: Constr
$cGeographyValue :: Constr
$cFloatValue :: Constr
$cBigDecimalValue :: Constr
$cDecimalValue :: Constr
$cIntegerValue :: Constr
$cNullValue :: Constr
$tValue :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Value -> m Value
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Value -> m Value
gmapMp :: (forall d. Data d => d -> m d) -> Value -> m Value
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Value -> m Value
gmapM :: (forall d. Data d => d -> m d) -> Value -> m Value
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Value -> m Value
gmapQi :: Int -> (forall d. Data d => d -> u) -> Value -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Value -> u
gmapQ :: (forall d. Data d => d -> u) -> Value -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Value -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Value -> r
gmapT :: (forall b. Data b => b -> b) -> Value -> Value
$cgmapT :: (forall b. Data b => b -> b) -> Value -> Value
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Value)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Value)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Value)
dataTypeOf :: Value -> DataType
$cdataTypeOf :: Value -> DataType
toConstr :: Value -> Constr
$ctoConstr :: Value -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Value
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Value
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Value -> c Value
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Value -> c Value
$cp1Data :: Typeable Value
Data, Value -> Q Exp
Value -> Q (TExp Value)
(Value -> Q Exp) -> (Value -> Q (TExp Value)) -> Lift Value
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Value -> Q (TExp Value)
$cliftTyped :: Value -> Q (TExp Value)
lift :: Value -> Q Exp
$clift :: Value -> Q Exp
Lift)

instance FromJSON Value

instance Cacheable Value

instance ToJSON Value

instance NFData Value

instance Hashable Value

-- | BigQuery's conception of a timestamp.
newtype Timestamp = Timestamp Text
  deriving (Int -> Timestamp -> ShowS
[Timestamp] -> ShowS
Timestamp -> String
(Int -> Timestamp -> ShowS)
-> (Timestamp -> String)
-> ([Timestamp] -> ShowS)
-> Show Timestamp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Timestamp] -> ShowS
$cshowList :: [Timestamp] -> ShowS
show :: Timestamp -> String
$cshow :: Timestamp -> String
showsPrec :: Int -> Timestamp -> ShowS
$cshowsPrec :: Int -> Timestamp -> ShowS
Show, Timestamp -> Timestamp -> Bool
(Timestamp -> Timestamp -> Bool)
-> (Timestamp -> Timestamp -> Bool) -> Eq Timestamp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Timestamp -> Timestamp -> Bool
$c/= :: Timestamp -> Timestamp -> Bool
== :: Timestamp -> Timestamp -> Bool
$c== :: Timestamp -> Timestamp -> Bool
Eq, Eq Timestamp
Eq Timestamp
-> (Timestamp -> Timestamp -> Ordering)
-> (Timestamp -> Timestamp -> Bool)
-> (Timestamp -> Timestamp -> Bool)
-> (Timestamp -> Timestamp -> Bool)
-> (Timestamp -> Timestamp -> Bool)
-> (Timestamp -> Timestamp -> Timestamp)
-> (Timestamp -> Timestamp -> Timestamp)
-> Ord Timestamp
Timestamp -> Timestamp -> Bool
Timestamp -> Timestamp -> Ordering
Timestamp -> Timestamp -> Timestamp
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Timestamp -> Timestamp -> Timestamp
$cmin :: Timestamp -> Timestamp -> Timestamp
max :: Timestamp -> Timestamp -> Timestamp
$cmax :: Timestamp -> Timestamp -> Timestamp
>= :: Timestamp -> Timestamp -> Bool
$c>= :: Timestamp -> Timestamp -> Bool
> :: Timestamp -> Timestamp -> Bool
$c> :: Timestamp -> Timestamp -> Bool
<= :: Timestamp -> Timestamp -> Bool
$c<= :: Timestamp -> Timestamp -> Bool
< :: Timestamp -> Timestamp -> Bool
$c< :: Timestamp -> Timestamp -> Bool
compare :: Timestamp -> Timestamp -> Ordering
$ccompare :: Timestamp -> Timestamp -> Ordering
$cp1Ord :: Eq Timestamp
Ord, (forall x. Timestamp -> Rep Timestamp x)
-> (forall x. Rep Timestamp x -> Timestamp) -> Generic Timestamp
forall x. Rep Timestamp x -> Timestamp
forall x. Timestamp -> Rep Timestamp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Timestamp x -> Timestamp
$cfrom :: forall x. Timestamp -> Rep Timestamp x
Generic, Typeable Timestamp
DataType
Constr
Typeable Timestamp
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Timestamp -> c Timestamp)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Timestamp)
-> (Timestamp -> Constr)
-> (Timestamp -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Timestamp))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Timestamp))
-> ((forall b. Data b => b -> b) -> Timestamp -> Timestamp)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Timestamp -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Timestamp -> r)
-> (forall u. (forall d. Data d => d -> u) -> Timestamp -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Timestamp -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Timestamp -> m Timestamp)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Timestamp -> m Timestamp)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Timestamp -> m Timestamp)
-> Data Timestamp
Timestamp -> DataType
Timestamp -> Constr
(forall b. Data b => b -> b) -> Timestamp -> Timestamp
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Timestamp -> c Timestamp
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Timestamp
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Timestamp -> u
forall u. (forall d. Data d => d -> u) -> Timestamp -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Timestamp -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Timestamp -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Timestamp -> m Timestamp
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Timestamp -> m Timestamp
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Timestamp
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Timestamp -> c Timestamp
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Timestamp)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Timestamp)
$cTimestamp :: Constr
$tTimestamp :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Timestamp -> m Timestamp
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Timestamp -> m Timestamp
gmapMp :: (forall d. Data d => d -> m d) -> Timestamp -> m Timestamp
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Timestamp -> m Timestamp
gmapM :: (forall d. Data d => d -> m d) -> Timestamp -> m Timestamp
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Timestamp -> m Timestamp
gmapQi :: Int -> (forall d. Data d => d -> u) -> Timestamp -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Timestamp -> u
gmapQ :: (forall d. Data d => d -> u) -> Timestamp -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Timestamp -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Timestamp -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Timestamp -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Timestamp -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Timestamp -> r
gmapT :: (forall b. Data b => b -> b) -> Timestamp -> Timestamp
$cgmapT :: (forall b. Data b => b -> b) -> Timestamp -> Timestamp
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Timestamp)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Timestamp)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Timestamp)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Timestamp)
dataTypeOf :: Timestamp -> DataType
$cdataTypeOf :: Timestamp -> DataType
toConstr :: Timestamp -> Constr
$ctoConstr :: Timestamp -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Timestamp
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Timestamp
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Timestamp -> c Timestamp
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Timestamp -> c Timestamp
$cp1Data :: Typeable Timestamp
Data, Timestamp -> Q Exp
Timestamp -> Q (TExp Timestamp)
(Timestamp -> Q Exp)
-> (Timestamp -> Q (TExp Timestamp)) -> Lift Timestamp
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Timestamp -> Q (TExp Timestamp)
$cliftTyped :: Timestamp -> Q (TExp Timestamp)
lift :: Timestamp -> Q Exp
$clift :: Timestamp -> Q Exp
Lift, [Timestamp] -> Value
[Timestamp] -> Encoding
Timestamp -> Value
Timestamp -> Encoding
(Timestamp -> Value)
-> (Timestamp -> Encoding)
-> ([Timestamp] -> Value)
-> ([Timestamp] -> Encoding)
-> ToJSON Timestamp
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Timestamp] -> Encoding
$ctoEncodingList :: [Timestamp] -> Encoding
toJSONList :: [Timestamp] -> Value
$ctoJSONList :: [Timestamp] -> Value
toEncoding :: Timestamp -> Encoding
$ctoEncoding :: Timestamp -> Encoding
toJSON :: Timestamp -> Value
$ctoJSON :: Timestamp -> Value
ToJSON, Value -> Parser [Timestamp]
Value -> Parser Timestamp
(Value -> Parser Timestamp)
-> (Value -> Parser [Timestamp]) -> FromJSON Timestamp
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Timestamp]
$cparseJSONList :: Value -> Parser [Timestamp]
parseJSON :: Value -> Parser Timestamp
$cparseJSON :: Value -> Parser Timestamp
FromJSON, Eq Timestamp
Eq Timestamp
-> (Accesses -> Timestamp -> Timestamp -> Bool)
-> Cacheable Timestamp
Accesses -> Timestamp -> Timestamp -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> Timestamp -> Timestamp -> Bool
$cunchanged :: Accesses -> Timestamp -> Timestamp -> Bool
$cp1Cacheable :: Eq Timestamp
Cacheable, Timestamp -> ()
(Timestamp -> ()) -> NFData Timestamp
forall a. (a -> ()) -> NFData a
rnf :: Timestamp -> ()
$crnf :: Timestamp -> ()
NFData, Int -> Timestamp -> Int
Timestamp -> Int
(Int -> Timestamp -> Int)
-> (Timestamp -> Int) -> Hashable Timestamp
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Timestamp -> Int
$chash :: Timestamp -> Int
hashWithSalt :: Int -> Timestamp -> Int
$chashWithSalt :: Int -> Timestamp -> Int
Hashable)

-- | BigQuery's conception of a date.
newtype Date = Date Text
  deriving (Int -> Date -> ShowS
[Date] -> ShowS
Date -> String
(Int -> Date -> ShowS)
-> (Date -> String) -> ([Date] -> ShowS) -> Show Date
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Date] -> ShowS
$cshowList :: [Date] -> ShowS
show :: Date -> String
$cshow :: Date -> String
showsPrec :: Int -> Date -> ShowS
$cshowsPrec :: Int -> Date -> ShowS
Show, Date -> Date -> Bool
(Date -> Date -> Bool) -> (Date -> Date -> Bool) -> Eq Date
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Date -> Date -> Bool
$c/= :: Date -> Date -> Bool
== :: Date -> Date -> Bool
$c== :: Date -> Date -> Bool
Eq, Eq Date
Eq Date
-> (Date -> Date -> Ordering)
-> (Date -> Date -> Bool)
-> (Date -> Date -> Bool)
-> (Date -> Date -> Bool)
-> (Date -> Date -> Bool)
-> (Date -> Date -> Date)
-> (Date -> Date -> Date)
-> Ord Date
Date -> Date -> Bool
Date -> Date -> Ordering
Date -> Date -> Date
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Date -> Date -> Date
$cmin :: Date -> Date -> Date
max :: Date -> Date -> Date
$cmax :: Date -> Date -> Date
>= :: Date -> Date -> Bool
$c>= :: Date -> Date -> Bool
> :: Date -> Date -> Bool
$c> :: Date -> Date -> Bool
<= :: Date -> Date -> Bool
$c<= :: Date -> Date -> Bool
< :: Date -> Date -> Bool
$c< :: Date -> Date -> Bool
compare :: Date -> Date -> Ordering
$ccompare :: Date -> Date -> Ordering
$cp1Ord :: Eq Date
Ord, (forall x. Date -> Rep Date x)
-> (forall x. Rep Date x -> Date) -> Generic Date
forall x. Rep Date x -> Date
forall x. Date -> Rep Date x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Date x -> Date
$cfrom :: forall x. Date -> Rep Date x
Generic, Typeable Date
DataType
Constr
Typeable Date
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Date -> c Date)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Date)
-> (Date -> Constr)
-> (Date -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Date))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date))
-> ((forall b. Data b => b -> b) -> Date -> Date)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r)
-> (forall u. (forall d. Data d => d -> u) -> Date -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Date -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Date -> m Date)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Date -> m Date)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Date -> m Date)
-> Data Date
Date -> DataType
Date -> Constr
(forall b. Data b => b -> b) -> Date -> Date
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Date -> u
forall u. (forall d. Data d => d -> u) -> Date -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Date -> m Date
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Date -> m Date
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Date)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date)
$cDate :: Constr
$tDate :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Date -> m Date
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Date -> m Date
gmapMp :: (forall d. Data d => d -> m d) -> Date -> m Date
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Date -> m Date
gmapM :: (forall d. Data d => d -> m d) -> Date -> m Date
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Date -> m Date
gmapQi :: Int -> (forall d. Data d => d -> u) -> Date -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Date -> u
gmapQ :: (forall d. Data d => d -> u) -> Date -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Date -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r
gmapT :: (forall b. Data b => b -> b) -> Date -> Date
$cgmapT :: (forall b. Data b => b -> b) -> Date -> Date
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Date)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Date)
dataTypeOf :: Date -> DataType
$cdataTypeOf :: Date -> DataType
toConstr :: Date -> Constr
$ctoConstr :: Date -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Date
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Date -> c Date
$cp1Data :: Typeable Date
Data, Date -> Q Exp
Date -> Q (TExp Date)
(Date -> Q Exp) -> (Date -> Q (TExp Date)) -> Lift Date
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Date -> Q (TExp Date)
$cliftTyped :: Date -> Q (TExp Date)
lift :: Date -> Q Exp
$clift :: Date -> Q Exp
Lift, [Date] -> Value
[Date] -> Encoding
Date -> Value
Date -> Encoding
(Date -> Value)
-> (Date -> Encoding)
-> ([Date] -> Value)
-> ([Date] -> Encoding)
-> ToJSON Date
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Date] -> Encoding
$ctoEncodingList :: [Date] -> Encoding
toJSONList :: [Date] -> Value
$ctoJSONList :: [Date] -> Value
toEncoding :: Date -> Encoding
$ctoEncoding :: Date -> Encoding
toJSON :: Date -> Value
$ctoJSON :: Date -> Value
ToJSON, Value -> Parser [Date]
Value -> Parser Date
(Value -> Parser Date) -> (Value -> Parser [Date]) -> FromJSON Date
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Date]
$cparseJSONList :: Value -> Parser [Date]
parseJSON :: Value -> Parser Date
$cparseJSON :: Value -> Parser Date
FromJSON, Eq Date
Eq Date -> (Accesses -> Date -> Date -> Bool) -> Cacheable Date
Accesses -> Date -> Date -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> Date -> Date -> Bool
$cunchanged :: Accesses -> Date -> Date -> Bool
$cp1Cacheable :: Eq Date
Cacheable, Date -> ()
(Date -> ()) -> NFData Date
forall a. (a -> ()) -> NFData a
rnf :: Date -> ()
$crnf :: Date -> ()
NFData, Int -> Date -> Int
Date -> Int
(Int -> Date -> Int) -> (Date -> Int) -> Hashable Date
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Date -> Int
$chash :: Date -> Int
hashWithSalt :: Int -> Date -> Int
$chashWithSalt :: Int -> Date -> Int
Hashable)

-- | BigQuery's conception of a time.
newtype Time = Time Text
  deriving (Int -> Time -> ShowS
[Time] -> ShowS
Time -> String
(Int -> Time -> ShowS)
-> (Time -> String) -> ([Time] -> ShowS) -> Show Time
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Time] -> ShowS
$cshowList :: [Time] -> ShowS
show :: Time -> String
$cshow :: Time -> String
showsPrec :: Int -> Time -> ShowS
$cshowsPrec :: Int -> Time -> ShowS
Show, Time -> Time -> Bool
(Time -> Time -> Bool) -> (Time -> Time -> Bool) -> Eq Time
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Time -> Time -> Bool
$c/= :: Time -> Time -> Bool
== :: Time -> Time -> Bool
$c== :: Time -> Time -> Bool
Eq, Eq Time
Eq Time
-> (Time -> Time -> Ordering)
-> (Time -> Time -> Bool)
-> (Time -> Time -> Bool)
-> (Time -> Time -> Bool)
-> (Time -> Time -> Bool)
-> (Time -> Time -> Time)
-> (Time -> Time -> Time)
-> Ord Time
Time -> Time -> Bool
Time -> Time -> Ordering
Time -> Time -> Time
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Time -> Time -> Time
$cmin :: Time -> Time -> Time
max :: Time -> Time -> Time
$cmax :: Time -> Time -> Time
>= :: Time -> Time -> Bool
$c>= :: Time -> Time -> Bool
> :: Time -> Time -> Bool
$c> :: Time -> Time -> Bool
<= :: Time -> Time -> Bool
$c<= :: Time -> Time -> Bool
< :: Time -> Time -> Bool
$c< :: Time -> Time -> Bool
compare :: Time -> Time -> Ordering
$ccompare :: Time -> Time -> Ordering
$cp1Ord :: Eq Time
Ord, (forall x. Time -> Rep Time x)
-> (forall x. Rep Time x -> Time) -> Generic Time
forall x. Rep Time x -> Time
forall x. Time -> Rep Time x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Time x -> Time
$cfrom :: forall x. Time -> Rep Time x
Generic, Typeable Time
DataType
Constr
Typeable Time
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Time -> c Time)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Time)
-> (Time -> Constr)
-> (Time -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Time))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Time))
-> ((forall b. Data b => b -> b) -> Time -> Time)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Time -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Time -> r)
-> (forall u. (forall d. Data d => d -> u) -> Time -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Time -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Time -> m Time)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Time -> m Time)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Time -> m Time)
-> Data Time
Time -> DataType
Time -> Constr
(forall b. Data b => b -> b) -> Time -> Time
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Time -> c Time
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Time
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Time -> u
forall u. (forall d. Data d => d -> u) -> Time -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Time -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Time -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Time -> m Time
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Time -> m Time
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Time
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Time -> c Time
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Time)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Time)
$cTime :: Constr
$tTime :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Time -> m Time
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Time -> m Time
gmapMp :: (forall d. Data d => d -> m d) -> Time -> m Time
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Time -> m Time
gmapM :: (forall d. Data d => d -> m d) -> Time -> m Time
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Time -> m Time
gmapQi :: Int -> (forall d. Data d => d -> u) -> Time -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Time -> u
gmapQ :: (forall d. Data d => d -> u) -> Time -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Time -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Time -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Time -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Time -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Time -> r
gmapT :: (forall b. Data b => b -> b) -> Time -> Time
$cgmapT :: (forall b. Data b => b -> b) -> Time -> Time
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Time)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Time)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Time)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Time)
dataTypeOf :: Time -> DataType
$cdataTypeOf :: Time -> DataType
toConstr :: Time -> Constr
$ctoConstr :: Time -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Time
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Time
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Time -> c Time
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Time -> c Time
$cp1Data :: Typeable Time
Data, Time -> Q Exp
Time -> Q (TExp Time)
(Time -> Q Exp) -> (Time -> Q (TExp Time)) -> Lift Time
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Time -> Q (TExp Time)
$cliftTyped :: Time -> Q (TExp Time)
lift :: Time -> Q Exp
$clift :: Time -> Q Exp
Lift, [Time] -> Value
[Time] -> Encoding
Time -> Value
Time -> Encoding
(Time -> Value)
-> (Time -> Encoding)
-> ([Time] -> Value)
-> ([Time] -> Encoding)
-> ToJSON Time
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Time] -> Encoding
$ctoEncodingList :: [Time] -> Encoding
toJSONList :: [Time] -> Value
$ctoJSONList :: [Time] -> Value
toEncoding :: Time -> Encoding
$ctoEncoding :: Time -> Encoding
toJSON :: Time -> Value
$ctoJSON :: Time -> Value
ToJSON, Value -> Parser [Time]
Value -> Parser Time
(Value -> Parser Time) -> (Value -> Parser [Time]) -> FromJSON Time
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Time]
$cparseJSONList :: Value -> Parser [Time]
parseJSON :: Value -> Parser Time
$cparseJSON :: Value -> Parser Time
FromJSON, Eq Time
Eq Time -> (Accesses -> Time -> Time -> Bool) -> Cacheable Time
Accesses -> Time -> Time -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> Time -> Time -> Bool
$cunchanged :: Accesses -> Time -> Time -> Bool
$cp1Cacheable :: Eq Time
Cacheable, Time -> ()
(Time -> ()) -> NFData Time
forall a. (a -> ()) -> NFData a
rnf :: Time -> ()
$crnf :: Time -> ()
NFData, Int -> Time -> Int
Time -> Int
(Int -> Time -> Int) -> (Time -> Int) -> Hashable Time
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Time -> Int
$chash :: Time -> Int
hashWithSalt :: Int -> Time -> Int
$chashWithSalt :: Int -> Time -> Int
Hashable)

-- | BigQuery's conception of a datetime.
newtype Datetime = Datetime Text
  deriving (Int -> Datetime -> ShowS
[Datetime] -> ShowS
Datetime -> String
(Int -> Datetime -> ShowS)
-> (Datetime -> String) -> ([Datetime] -> ShowS) -> Show Datetime
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Datetime] -> ShowS
$cshowList :: [Datetime] -> ShowS
show :: Datetime -> String
$cshow :: Datetime -> String
showsPrec :: Int -> Datetime -> ShowS
$cshowsPrec :: Int -> Datetime -> ShowS
Show, Datetime -> Datetime -> Bool
(Datetime -> Datetime -> Bool)
-> (Datetime -> Datetime -> Bool) -> Eq Datetime
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Datetime -> Datetime -> Bool
$c/= :: Datetime -> Datetime -> Bool
== :: Datetime -> Datetime -> Bool
$c== :: Datetime -> Datetime -> Bool
Eq, Eq Datetime
Eq Datetime
-> (Datetime -> Datetime -> Ordering)
-> (Datetime -> Datetime -> Bool)
-> (Datetime -> Datetime -> Bool)
-> (Datetime -> Datetime -> Bool)
-> (Datetime -> Datetime -> Bool)
-> (Datetime -> Datetime -> Datetime)
-> (Datetime -> Datetime -> Datetime)
-> Ord Datetime
Datetime -> Datetime -> Bool
Datetime -> Datetime -> Ordering
Datetime -> Datetime -> Datetime
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Datetime -> Datetime -> Datetime
$cmin :: Datetime -> Datetime -> Datetime
max :: Datetime -> Datetime -> Datetime
$cmax :: Datetime -> Datetime -> Datetime
>= :: Datetime -> Datetime -> Bool
$c>= :: Datetime -> Datetime -> Bool
> :: Datetime -> Datetime -> Bool
$c> :: Datetime -> Datetime -> Bool
<= :: Datetime -> Datetime -> Bool
$c<= :: Datetime -> Datetime -> Bool
< :: Datetime -> Datetime -> Bool
$c< :: Datetime -> Datetime -> Bool
compare :: Datetime -> Datetime -> Ordering
$ccompare :: Datetime -> Datetime -> Ordering
$cp1Ord :: Eq Datetime
Ord, (forall x. Datetime -> Rep Datetime x)
-> (forall x. Rep Datetime x -> Datetime) -> Generic Datetime
forall x. Rep Datetime x -> Datetime
forall x. Datetime -> Rep Datetime x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Datetime x -> Datetime
$cfrom :: forall x. Datetime -> Rep Datetime x
Generic, Typeable Datetime
DataType
Constr
Typeable Datetime
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Datetime -> c Datetime)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Datetime)
-> (Datetime -> Constr)
-> (Datetime -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Datetime))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Datetime))
-> ((forall b. Data b => b -> b) -> Datetime -> Datetime)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Datetime -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Datetime -> r)
-> (forall u. (forall d. Data d => d -> u) -> Datetime -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Datetime -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Datetime -> m Datetime)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Datetime -> m Datetime)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Datetime -> m Datetime)
-> Data Datetime
Datetime -> DataType
Datetime -> Constr
(forall b. Data b => b -> b) -> Datetime -> Datetime
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Datetime -> c Datetime
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Datetime
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Datetime -> u
forall u. (forall d. Data d => d -> u) -> Datetime -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Datetime -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Datetime -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Datetime -> m Datetime
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Datetime -> m Datetime
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Datetime
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Datetime -> c Datetime
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Datetime)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Datetime)
$cDatetime :: Constr
$tDatetime :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Datetime -> m Datetime
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Datetime -> m Datetime
gmapMp :: (forall d. Data d => d -> m d) -> Datetime -> m Datetime
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Datetime -> m Datetime
gmapM :: (forall d. Data d => d -> m d) -> Datetime -> m Datetime
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Datetime -> m Datetime
gmapQi :: Int -> (forall d. Data d => d -> u) -> Datetime -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Datetime -> u
gmapQ :: (forall d. Data d => d -> u) -> Datetime -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Datetime -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Datetime -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Datetime -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Datetime -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Datetime -> r
gmapT :: (forall b. Data b => b -> b) -> Datetime -> Datetime
$cgmapT :: (forall b. Data b => b -> b) -> Datetime -> Datetime
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Datetime)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Datetime)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Datetime)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Datetime)
dataTypeOf :: Datetime -> DataType
$cdataTypeOf :: Datetime -> DataType
toConstr :: Datetime -> Constr
$ctoConstr :: Datetime -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Datetime
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Datetime
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Datetime -> c Datetime
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Datetime -> c Datetime
$cp1Data :: Typeable Datetime
Data, Datetime -> Q Exp
Datetime -> Q (TExp Datetime)
(Datetime -> Q Exp)
-> (Datetime -> Q (TExp Datetime)) -> Lift Datetime
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Datetime -> Q (TExp Datetime)
$cliftTyped :: Datetime -> Q (TExp Datetime)
lift :: Datetime -> Q Exp
$clift :: Datetime -> Q Exp
Lift, [Datetime] -> Value
[Datetime] -> Encoding
Datetime -> Value
Datetime -> Encoding
(Datetime -> Value)
-> (Datetime -> Encoding)
-> ([Datetime] -> Value)
-> ([Datetime] -> Encoding)
-> ToJSON Datetime
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Datetime] -> Encoding
$ctoEncodingList :: [Datetime] -> Encoding
toJSONList :: [Datetime] -> Value
$ctoJSONList :: [Datetime] -> Value
toEncoding :: Datetime -> Encoding
$ctoEncoding :: Datetime -> Encoding
toJSON :: Datetime -> Value
$ctoJSON :: Datetime -> Value
ToJSON, Value -> Parser [Datetime]
Value -> Parser Datetime
(Value -> Parser Datetime)
-> (Value -> Parser [Datetime]) -> FromJSON Datetime
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Datetime]
$cparseJSONList :: Value -> Parser [Datetime]
parseJSON :: Value -> Parser Datetime
$cparseJSON :: Value -> Parser Datetime
FromJSON, Eq Datetime
Eq Datetime
-> (Accesses -> Datetime -> Datetime -> Bool) -> Cacheable Datetime
Accesses -> Datetime -> Datetime -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> Datetime -> Datetime -> Bool
$cunchanged :: Accesses -> Datetime -> Datetime -> Bool
$cp1Cacheable :: Eq Datetime
Cacheable, Datetime -> ()
(Datetime -> ()) -> NFData Datetime
forall a. (a -> ()) -> NFData a
rnf :: Datetime -> ()
$crnf :: Datetime -> ()
NFData, Int -> Datetime -> Int
Datetime -> Int
(Int -> Datetime -> Int) -> (Datetime -> Int) -> Hashable Datetime
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Datetime -> Int
$chash :: Datetime -> Int
hashWithSalt :: Int -> Datetime -> Int
$chashWithSalt :: Int -> Datetime -> Int
Hashable)

-- | BigQuery's conception of an INTEGER/INT64 (they are the same).
newtype Int64 = Int64 Text
  deriving (Int -> Int64 -> ShowS
[Int64] -> ShowS
Int64 -> String
(Int -> Int64 -> ShowS)
-> (Int64 -> String) -> ([Int64] -> ShowS) -> Show Int64
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Int64] -> ShowS
$cshowList :: [Int64] -> ShowS
show :: Int64 -> String
$cshow :: Int64 -> String
showsPrec :: Int -> Int64 -> ShowS
$cshowsPrec :: Int -> Int64 -> ShowS
Show, Int64 -> Int64 -> Bool
(Int64 -> Int64 -> Bool) -> (Int64 -> Int64 -> Bool) -> Eq Int64
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Int64 -> Int64 -> Bool
$c/= :: Int64 -> Int64 -> Bool
== :: Int64 -> Int64 -> Bool
$c== :: Int64 -> Int64 -> Bool
Eq, Eq Int64
Eq Int64
-> (Int64 -> Int64 -> Ordering)
-> (Int64 -> Int64 -> Bool)
-> (Int64 -> Int64 -> Bool)
-> (Int64 -> Int64 -> Bool)
-> (Int64 -> Int64 -> Bool)
-> (Int64 -> Int64 -> Int64)
-> (Int64 -> Int64 -> Int64)
-> Ord Int64
Int64 -> Int64 -> Bool
Int64 -> Int64 -> Ordering
Int64 -> Int64 -> Int64
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Int64 -> Int64 -> Int64
$cmin :: Int64 -> Int64 -> Int64
max :: Int64 -> Int64 -> Int64
$cmax :: Int64 -> Int64 -> Int64
>= :: Int64 -> Int64 -> Bool
$c>= :: Int64 -> Int64 -> Bool
> :: Int64 -> Int64 -> Bool
$c> :: Int64 -> Int64 -> Bool
<= :: Int64 -> Int64 -> Bool
$c<= :: Int64 -> Int64 -> Bool
< :: Int64 -> Int64 -> Bool
$c< :: Int64 -> Int64 -> Bool
compare :: Int64 -> Int64 -> Ordering
$ccompare :: Int64 -> Int64 -> Ordering
$cp1Ord :: Eq Int64
Ord, (forall x. Int64 -> Rep Int64 x)
-> (forall x. Rep Int64 x -> Int64) -> Generic Int64
forall x. Rep Int64 x -> Int64
forall x. Int64 -> Rep Int64 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Int64 x -> Int64
$cfrom :: forall x. Int64 -> Rep Int64 x
Generic, Typeable Int64
DataType
Constr
Typeable Int64
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Int64 -> c Int64)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Int64)
-> (Int64 -> Constr)
-> (Int64 -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Int64))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64))
-> ((forall b. Data b => b -> b) -> Int64 -> Int64)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r)
-> (forall u. (forall d. Data d => d -> u) -> Int64 -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Int64 -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Int64 -> m Int64)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Int64 -> m Int64)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Int64 -> m Int64)
-> Data Int64
Int64 -> DataType
Int64 -> Constr
(forall b. Data b => b -> b) -> Int64 -> Int64
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Int64 -> c Int64
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Int64
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Int64 -> u
forall u. (forall d. Data d => d -> u) -> Int64 -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Int64 -> m Int64
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Int64 -> m Int64
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Int64
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Int64 -> c Int64
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Int64)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64)
$cInt64 :: Constr
$tInt64 :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Int64 -> m Int64
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Int64 -> m Int64
gmapMp :: (forall d. Data d => d -> m d) -> Int64 -> m Int64
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Int64 -> m Int64
gmapM :: (forall d. Data d => d -> m d) -> Int64 -> m Int64
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Int64 -> m Int64
gmapQi :: Int -> (forall d. Data d => d -> u) -> Int64 -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Int64 -> u
gmapQ :: (forall d. Data d => d -> u) -> Int64 -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Int64 -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r
gmapT :: (forall b. Data b => b -> b) -> Int64 -> Int64
$cgmapT :: (forall b. Data b => b -> b) -> Int64 -> Int64
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Int64)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Int64)
dataTypeOf :: Int64 -> DataType
$cdataTypeOf :: Int64 -> DataType
toConstr :: Int64 -> Constr
$ctoConstr :: Int64 -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Int64
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Int64
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Int64 -> c Int64
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Int64 -> c Int64
$cp1Data :: Typeable Int64
Data, Int64 -> Q Exp
Int64 -> Q (TExp Int64)
(Int64 -> Q Exp) -> (Int64 -> Q (TExp Int64)) -> Lift Int64
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Int64 -> Q (TExp Int64)
$cliftTyped :: Int64 -> Q (TExp Int64)
lift :: Int64 -> Q Exp
$clift :: Int64 -> Q Exp
Lift, Eq Int64
Eq Int64 -> (Accesses -> Int64 -> Int64 -> Bool) -> Cacheable Int64
Accesses -> Int64 -> Int64 -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> Int64 -> Int64 -> Bool
$cunchanged :: Accesses -> Int64 -> Int64 -> Bool
$cp1Cacheable :: Eq Int64
Cacheable, Int64 -> ()
(Int64 -> ()) -> NFData Int64
forall a. (a -> ()) -> NFData a
rnf :: Int64 -> ()
$crnf :: Int64 -> ()
NFData, Int -> Int64 -> Int
Int64 -> Int
(Int -> Int64 -> Int) -> (Int64 -> Int) -> Hashable Int64
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Int64 -> Int
$chash :: Int64 -> Int
hashWithSalt :: Int -> Int64 -> Int
$chashWithSalt :: Int -> Int64 -> Int
Hashable)

instance FromJSON Int64 where parseJSON :: Value -> Parser Int64
parseJSON = (Text -> Int64) -> Value -> Parser Int64
forall a. (Text -> a) -> Value -> Parser a
liberalInt64Parser Text -> Int64
Int64

instance ToJSON Int64 where toJSON :: Int64 -> Value
toJSON = Int64 -> Value
forall a. Coercible Text a => a -> Value
liberalIntegralPrinter

intToInt64 :: Int.Int64 -> Int64
intToInt64 :: Int64 -> Int64
intToInt64 = Text -> Int64
Int64 (Text -> Int64) -> (Int64 -> Text) -> Int64 -> Int64
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int64 -> Text
forall a. Show a => a -> Text
tshow

int64Expr :: Int.Int64 -> Expression
int64Expr :: Int64 -> Expression
int64Expr = Value -> Expression
ValueExpression (Value -> Expression) -> (Int64 -> Value) -> Int64 -> Expression
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int64 -> Value
IntegerValue (Int64 -> Value) -> (Int64 -> Int64) -> Int64 -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int64 -> Int64
intToInt64

-- | BigQuery's conception of a fixed precision decimal.
newtype Decimal = Decimal Text
  deriving (Int -> Decimal -> ShowS
[Decimal] -> ShowS
Decimal -> String
(Int -> Decimal -> ShowS)
-> (Decimal -> String) -> ([Decimal] -> ShowS) -> Show Decimal
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Decimal] -> ShowS
$cshowList :: [Decimal] -> ShowS
show :: Decimal -> String
$cshow :: Decimal -> String
showsPrec :: Int -> Decimal -> ShowS
$cshowsPrec :: Int -> Decimal -> ShowS
Show, Decimal -> Decimal -> Bool
(Decimal -> Decimal -> Bool)
-> (Decimal -> Decimal -> Bool) -> Eq Decimal
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Decimal -> Decimal -> Bool
$c/= :: Decimal -> Decimal -> Bool
== :: Decimal -> Decimal -> Bool
$c== :: Decimal -> Decimal -> Bool
Eq, Eq Decimal
Eq Decimal
-> (Decimal -> Decimal -> Ordering)
-> (Decimal -> Decimal -> Bool)
-> (Decimal -> Decimal -> Bool)
-> (Decimal -> Decimal -> Bool)
-> (Decimal -> Decimal -> Bool)
-> (Decimal -> Decimal -> Decimal)
-> (Decimal -> Decimal -> Decimal)
-> Ord Decimal
Decimal -> Decimal -> Bool
Decimal -> Decimal -> Ordering
Decimal -> Decimal -> Decimal
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Decimal -> Decimal -> Decimal
$cmin :: Decimal -> Decimal -> Decimal
max :: Decimal -> Decimal -> Decimal
$cmax :: Decimal -> Decimal -> Decimal
>= :: Decimal -> Decimal -> Bool
$c>= :: Decimal -> Decimal -> Bool
> :: Decimal -> Decimal -> Bool
$c> :: Decimal -> Decimal -> Bool
<= :: Decimal -> Decimal -> Bool
$c<= :: Decimal -> Decimal -> Bool
< :: Decimal -> Decimal -> Bool
$c< :: Decimal -> Decimal -> Bool
compare :: Decimal -> Decimal -> Ordering
$ccompare :: Decimal -> Decimal -> Ordering
$cp1Ord :: Eq Decimal
Ord, (forall x. Decimal -> Rep Decimal x)
-> (forall x. Rep Decimal x -> Decimal) -> Generic Decimal
forall x. Rep Decimal x -> Decimal
forall x. Decimal -> Rep Decimal x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Decimal x -> Decimal
$cfrom :: forall x. Decimal -> Rep Decimal x
Generic, Typeable Decimal
DataType
Constr
Typeable Decimal
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Decimal -> c Decimal)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Decimal)
-> (Decimal -> Constr)
-> (Decimal -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Decimal))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Decimal))
-> ((forall b. Data b => b -> b) -> Decimal -> Decimal)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Decimal -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Decimal -> r)
-> (forall u. (forall d. Data d => d -> u) -> Decimal -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Decimal -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Decimal -> m Decimal)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Decimal -> m Decimal)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Decimal -> m Decimal)
-> Data Decimal
Decimal -> DataType
Decimal -> Constr
(forall b. Data b => b -> b) -> Decimal -> Decimal
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Decimal -> c Decimal
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Decimal
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Decimal -> u
forall u. (forall d. Data d => d -> u) -> Decimal -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Decimal -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Decimal -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Decimal -> m Decimal
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decimal -> m Decimal
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Decimal
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Decimal -> c Decimal
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Decimal)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Decimal)
$cDecimal :: Constr
$tDecimal :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Decimal -> m Decimal
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decimal -> m Decimal
gmapMp :: (forall d. Data d => d -> m d) -> Decimal -> m Decimal
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Decimal -> m Decimal
gmapM :: (forall d. Data d => d -> m d) -> Decimal -> m Decimal
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Decimal -> m Decimal
gmapQi :: Int -> (forall d. Data d => d -> u) -> Decimal -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Decimal -> u
gmapQ :: (forall d. Data d => d -> u) -> Decimal -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Decimal -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Decimal -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Decimal -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Decimal -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Decimal -> r
gmapT :: (forall b. Data b => b -> b) -> Decimal -> Decimal
$cgmapT :: (forall b. Data b => b -> b) -> Decimal -> Decimal
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Decimal)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Decimal)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Decimal)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Decimal)
dataTypeOf :: Decimal -> DataType
$cdataTypeOf :: Decimal -> DataType
toConstr :: Decimal -> Constr
$ctoConstr :: Decimal -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Decimal
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Decimal
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Decimal -> c Decimal
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Decimal -> c Decimal
$cp1Data :: Typeable Decimal
Data, Eq Decimal
Eq Decimal
-> (Accesses -> Decimal -> Decimal -> Bool) -> Cacheable Decimal
Accesses -> Decimal -> Decimal -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> Decimal -> Decimal -> Bool
$cunchanged :: Accesses -> Decimal -> Decimal -> Bool
$cp1Cacheable :: Eq Decimal
Cacheable, Decimal -> ()
(Decimal -> ()) -> NFData Decimal
forall a. (a -> ()) -> NFData a
rnf :: Decimal -> ()
$crnf :: Decimal -> ()
NFData, Int -> Decimal -> Int
Decimal -> Int
(Int -> Decimal -> Int) -> (Decimal -> Int) -> Hashable Decimal
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Decimal -> Int
$chash :: Decimal -> Int
hashWithSalt :: Int -> Decimal -> Int
$chashWithSalt :: Int -> Decimal -> Int
Hashable, Decimal -> Q Exp
Decimal -> Q (TExp Decimal)
(Decimal -> Q Exp) -> (Decimal -> Q (TExp Decimal)) -> Lift Decimal
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Decimal -> Q (TExp Decimal)
$cliftTyped :: Decimal -> Q (TExp Decimal)
lift :: Decimal -> Q Exp
$clift :: Decimal -> Q Exp
Lift)

instance FromJSON Decimal where
  parseJSON :: Value -> Parser Decimal
parseJSON (J.Number Scientific
num) = Decimal -> Parser Decimal
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Decimal -> Parser Decimal) -> Decimal -> Parser Decimal
forall a b. (a -> b) -> a -> b
$ Text -> Decimal
Decimal (Text -> Decimal) -> Text -> Decimal
forall a b. (a -> b) -> a -> b
$ Scientific -> Text
scientificToText Scientific
num
  parseJSON (J.String Text
num) = Decimal -> Parser Decimal
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Decimal -> Parser Decimal) -> Decimal -> Parser Decimal
forall a b. (a -> b) -> a -> b
$ Text -> Decimal
Decimal Text
num
  parseJSON Value
_ = String -> Parser Decimal
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"parseJSON: FromJSON Decimal failure"

instance ToJSON Decimal where
  toJSON :: Decimal -> Value
toJSON (Decimal Text
x) = Text -> Value
forall a. ToJSON a => a -> Value
J.toJSON Text
x

-- | Convert 'Scientific' to 'Text'
scientificToText :: Scientific -> Text
scientificToText :: Scientific -> Text
scientificToText Scientific
num = Text -> Text
toStrict (Text -> Text) -> Text -> Text
forall a b. (a -> b) -> a -> b
$ Builder -> Text
toLazyText (Builder -> Text) -> Builder -> Text
forall a b. (a -> b) -> a -> b
$ FPFormat -> Maybe Int -> Scientific -> Builder
formatScientificBuilder FPFormat
Fixed Maybe Int
forall a. Maybe a
Nothing Scientific
num

-- | BigQuery's conception of a \"big\" fixed precision decimal.
newtype BigDecimal = BigDecimal Text
  deriving (Int -> BigDecimal -> ShowS
[BigDecimal] -> ShowS
BigDecimal -> String
(Int -> BigDecimal -> ShowS)
-> (BigDecimal -> String)
-> ([BigDecimal] -> ShowS)
-> Show BigDecimal
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BigDecimal] -> ShowS
$cshowList :: [BigDecimal] -> ShowS
show :: BigDecimal -> String
$cshow :: BigDecimal -> String
showsPrec :: Int -> BigDecimal -> ShowS
$cshowsPrec :: Int -> BigDecimal -> ShowS
Show, BigDecimal -> BigDecimal -> Bool
(BigDecimal -> BigDecimal -> Bool)
-> (BigDecimal -> BigDecimal -> Bool) -> Eq BigDecimal
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BigDecimal -> BigDecimal -> Bool
$c/= :: BigDecimal -> BigDecimal -> Bool
== :: BigDecimal -> BigDecimal -> Bool
$c== :: BigDecimal -> BigDecimal -> Bool
Eq, Eq BigDecimal
Eq BigDecimal
-> (BigDecimal -> BigDecimal -> Ordering)
-> (BigDecimal -> BigDecimal -> Bool)
-> (BigDecimal -> BigDecimal -> Bool)
-> (BigDecimal -> BigDecimal -> Bool)
-> (BigDecimal -> BigDecimal -> Bool)
-> (BigDecimal -> BigDecimal -> BigDecimal)
-> (BigDecimal -> BigDecimal -> BigDecimal)
-> Ord BigDecimal
BigDecimal -> BigDecimal -> Bool
BigDecimal -> BigDecimal -> Ordering
BigDecimal -> BigDecimal -> BigDecimal
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: BigDecimal -> BigDecimal -> BigDecimal
$cmin :: BigDecimal -> BigDecimal -> BigDecimal
max :: BigDecimal -> BigDecimal -> BigDecimal
$cmax :: BigDecimal -> BigDecimal -> BigDecimal
>= :: BigDecimal -> BigDecimal -> Bool
$c>= :: BigDecimal -> BigDecimal -> Bool
> :: BigDecimal -> BigDecimal -> Bool
$c> :: BigDecimal -> BigDecimal -> Bool
<= :: BigDecimal -> BigDecimal -> Bool
$c<= :: BigDecimal -> BigDecimal -> Bool
< :: BigDecimal -> BigDecimal -> Bool
$c< :: BigDecimal -> BigDecimal -> Bool
compare :: BigDecimal -> BigDecimal -> Ordering
$ccompare :: BigDecimal -> BigDecimal -> Ordering
$cp1Ord :: Eq BigDecimal
Ord, (forall x. BigDecimal -> Rep BigDecimal x)
-> (forall x. Rep BigDecimal x -> BigDecimal) -> Generic BigDecimal
forall x. Rep BigDecimal x -> BigDecimal
forall x. BigDecimal -> Rep BigDecimal x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BigDecimal x -> BigDecimal
$cfrom :: forall x. BigDecimal -> Rep BigDecimal x
Generic, Typeable BigDecimal
DataType
Constr
Typeable BigDecimal
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BigDecimal -> c BigDecimal)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BigDecimal)
-> (BigDecimal -> Constr)
-> (BigDecimal -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BigDecimal))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c BigDecimal))
-> ((forall b. Data b => b -> b) -> BigDecimal -> BigDecimal)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BigDecimal -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BigDecimal -> r)
-> (forall u. (forall d. Data d => d -> u) -> BigDecimal -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> BigDecimal -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal)
-> Data BigDecimal
BigDecimal -> DataType
BigDecimal -> Constr
(forall b. Data b => b -> b) -> BigDecimal -> BigDecimal
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BigDecimal -> c BigDecimal
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BigDecimal
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> BigDecimal -> u
forall u. (forall d. Data d => d -> u) -> BigDecimal -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BigDecimal -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BigDecimal -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BigDecimal
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BigDecimal -> c BigDecimal
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BigDecimal)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BigDecimal)
$cBigDecimal :: Constr
$tBigDecimal :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal
gmapMp :: (forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal
gmapM :: (forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BigDecimal -> m BigDecimal
gmapQi :: Int -> (forall d. Data d => d -> u) -> BigDecimal -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BigDecimal -> u
gmapQ :: (forall d. Data d => d -> u) -> BigDecimal -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> BigDecimal -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BigDecimal -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BigDecimal -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BigDecimal -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BigDecimal -> r
gmapT :: (forall b. Data b => b -> b) -> BigDecimal -> BigDecimal
$cgmapT :: (forall b. Data b => b -> b) -> BigDecimal -> BigDecimal
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BigDecimal)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BigDecimal)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c BigDecimal)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BigDecimal)
dataTypeOf :: BigDecimal -> DataType
$cdataTypeOf :: BigDecimal -> DataType
toConstr :: BigDecimal -> Constr
$ctoConstr :: BigDecimal -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BigDecimal
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BigDecimal
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BigDecimal -> c BigDecimal
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BigDecimal -> c BigDecimal
$cp1Data :: Typeable BigDecimal
Data, Eq BigDecimal
Eq BigDecimal
-> (Accesses -> BigDecimal -> BigDecimal -> Bool)
-> Cacheable BigDecimal
Accesses -> BigDecimal -> BigDecimal -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> BigDecimal -> BigDecimal -> Bool
$cunchanged :: Accesses -> BigDecimal -> BigDecimal -> Bool
$cp1Cacheable :: Eq BigDecimal
Cacheable, BigDecimal -> ()
(BigDecimal -> ()) -> NFData BigDecimal
forall a. (a -> ()) -> NFData a
rnf :: BigDecimal -> ()
$crnf :: BigDecimal -> ()
NFData, Int -> BigDecimal -> Int
BigDecimal -> Int
(Int -> BigDecimal -> Int)
-> (BigDecimal -> Int) -> Hashable BigDecimal
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: BigDecimal -> Int
$chash :: BigDecimal -> Int
hashWithSalt :: Int -> BigDecimal -> Int
$chashWithSalt :: Int -> BigDecimal -> Int
Hashable, BigDecimal -> Q Exp
BigDecimal -> Q (TExp BigDecimal)
(BigDecimal -> Q Exp)
-> (BigDecimal -> Q (TExp BigDecimal)) -> Lift BigDecimal
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: BigDecimal -> Q (TExp BigDecimal)
$cliftTyped :: BigDecimal -> Q (TExp BigDecimal)
lift :: BigDecimal -> Q Exp
$clift :: BigDecimal -> Q Exp
Lift)

instance FromJSON BigDecimal where
  parseJSON :: Value -> Parser BigDecimal
parseJSON (J.Number Scientific
num) = BigDecimal -> Parser BigDecimal
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BigDecimal -> Parser BigDecimal)
-> BigDecimal -> Parser BigDecimal
forall a b. (a -> b) -> a -> b
$ Text -> BigDecimal
BigDecimal (Text -> BigDecimal) -> Text -> BigDecimal
forall a b. (a -> b) -> a -> b
$ Scientific -> Text
scientificToText Scientific
num
  parseJSON (J.String Text
num) = BigDecimal -> Parser BigDecimal
forall (f :: * -> *) a. Applicative f => a -> f a
pure (BigDecimal -> Parser BigDecimal)
-> BigDecimal -> Parser BigDecimal
forall a b. (a -> b) -> a -> b
$ Text -> BigDecimal
BigDecimal Text
num
  parseJSON Value
_ = String -> Parser BigDecimal
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"parseJSON: FromJSON BigDecimal failure"

instance ToJSON BigDecimal where
  toJSON :: BigDecimal -> Value
toJSON (BigDecimal Text
x) = Text -> Value
forall a. ToJSON a => a -> Value
J.toJSON Text
x

doubleToBigDecimal :: Double -> BigDecimal
doubleToBigDecimal :: Double -> BigDecimal
doubleToBigDecimal = Text -> BigDecimal
BigDecimal (Text -> BigDecimal) -> (Double -> Text) -> Double -> BigDecimal
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Text
T.decodeUtf8 (ByteString -> Text) -> (Double -> ByteString) -> Double -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
L.toStrict (ByteString -> ByteString)
-> (Double -> ByteString) -> Double -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Double -> ByteString
forall a. ToJSON a => a -> ByteString
J.encode

-- | BigQuery's conception of a fixed precision decimal.
newtype Float64 = Float64 Text
  deriving (Int -> Float64 -> ShowS
[Float64] -> ShowS
Float64 -> String
(Int -> Float64 -> ShowS)
-> (Float64 -> String) -> ([Float64] -> ShowS) -> Show Float64
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Float64] -> ShowS
$cshowList :: [Float64] -> ShowS
show :: Float64 -> String
$cshow :: Float64 -> String
showsPrec :: Int -> Float64 -> ShowS
$cshowsPrec :: Int -> Float64 -> ShowS
Show, Float64 -> Float64 -> Bool
(Float64 -> Float64 -> Bool)
-> (Float64 -> Float64 -> Bool) -> Eq Float64
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Float64 -> Float64 -> Bool
$c/= :: Float64 -> Float64 -> Bool
== :: Float64 -> Float64 -> Bool
$c== :: Float64 -> Float64 -> Bool
Eq, Eq Float64
Eq Float64
-> (Float64 -> Float64 -> Ordering)
-> (Float64 -> Float64 -> Bool)
-> (Float64 -> Float64 -> Bool)
-> (Float64 -> Float64 -> Bool)
-> (Float64 -> Float64 -> Bool)
-> (Float64 -> Float64 -> Float64)
-> (Float64 -> Float64 -> Float64)
-> Ord Float64
Float64 -> Float64 -> Bool
Float64 -> Float64 -> Ordering
Float64 -> Float64 -> Float64
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Float64 -> Float64 -> Float64
$cmin :: Float64 -> Float64 -> Float64
max :: Float64 -> Float64 -> Float64
$cmax :: Float64 -> Float64 -> Float64
>= :: Float64 -> Float64 -> Bool
$c>= :: Float64 -> Float64 -> Bool
> :: Float64 -> Float64 -> Bool
$c> :: Float64 -> Float64 -> Bool
<= :: Float64 -> Float64 -> Bool
$c<= :: Float64 -> Float64 -> Bool
< :: Float64 -> Float64 -> Bool
$c< :: Float64 -> Float64 -> Bool
compare :: Float64 -> Float64 -> Ordering
$ccompare :: Float64 -> Float64 -> Ordering
$cp1Ord :: Eq Float64
Ord, (forall x. Float64 -> Rep Float64 x)
-> (forall x. Rep Float64 x -> Float64) -> Generic Float64
forall x. Rep Float64 x -> Float64
forall x. Float64 -> Rep Float64 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Float64 x -> Float64
$cfrom :: forall x. Float64 -> Rep Float64 x
Generic, Typeable Float64
DataType
Constr
Typeable Float64
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Float64 -> c Float64)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Float64)
-> (Float64 -> Constr)
-> (Float64 -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Float64))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float64))
-> ((forall b. Data b => b -> b) -> Float64 -> Float64)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Float64 -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Float64 -> r)
-> (forall u. (forall d. Data d => d -> u) -> Float64 -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Float64 -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Float64 -> m Float64)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Float64 -> m Float64)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Float64 -> m Float64)
-> Data Float64
Float64 -> DataType
Float64 -> Constr
(forall b. Data b => b -> b) -> Float64 -> Float64
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Float64 -> c Float64
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Float64
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Float64 -> u
forall u. (forall d. Data d => d -> u) -> Float64 -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Float64 -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Float64 -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Float64 -> m Float64
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Float64 -> m Float64
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Float64
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Float64 -> c Float64
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Float64)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float64)
$cFloat64 :: Constr
$tFloat64 :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Float64 -> m Float64
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Float64 -> m Float64
gmapMp :: (forall d. Data d => d -> m d) -> Float64 -> m Float64
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Float64 -> m Float64
gmapM :: (forall d. Data d => d -> m d) -> Float64 -> m Float64
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Float64 -> m Float64
gmapQi :: Int -> (forall d. Data d => d -> u) -> Float64 -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Float64 -> u
gmapQ :: (forall d. Data d => d -> u) -> Float64 -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Float64 -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Float64 -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Float64 -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Float64 -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Float64 -> r
gmapT :: (forall b. Data b => b -> b) -> Float64 -> Float64
$cgmapT :: (forall b. Data b => b -> b) -> Float64 -> Float64
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float64)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float64)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Float64)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Float64)
dataTypeOf :: Float64 -> DataType
$cdataTypeOf :: Float64 -> DataType
toConstr :: Float64 -> Constr
$ctoConstr :: Float64 -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Float64
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Float64
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Float64 -> c Float64
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Float64 -> c Float64
$cp1Data :: Typeable Float64
Data, Eq Float64
Eq Float64
-> (Accesses -> Float64 -> Float64 -> Bool) -> Cacheable Float64
Accesses -> Float64 -> Float64 -> Bool
forall a. Eq a -> (Accesses -> a -> a -> Bool) -> Cacheable a
unchanged :: Accesses -> Float64 -> Float64 -> Bool
$cunchanged :: Accesses -> Float64 -> Float64 -> Bool
$cp1Cacheable :: Eq Float64
Cacheable, Float64 -> ()
(Float64 -> ()) -> NFData Float64
forall a. (a -> ()) -> NFData a
rnf :: Float64 -> ()
$crnf :: Float64 -> ()
NFData, Int -> Float64 -> Int
Float64 -> Int
(Int -> Float64 -> Int) -> (Float64 -> Int) -> Hashable Float64
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Float64 -> Int
$chash :: Float64 -> Int
hashWithSalt :: Int -> Float64 -> Int
$chashWithSalt :: Int -> Float64 -> Int
Hashable, Float64 -> Q Exp
Float64 -> Q (TExp Float64)
(Float64 -> Q Exp) -> (Float64 -> Q (TExp Float64)) -> Lift Float64
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Float64 -> Q (TExp Float64)
$cliftTyped :: Float64 -> Q (TExp Float64)
lift :: Float64 -> Q Exp
$clift :: Float64 -> Q Exp
Lift)

instance FromJSON Float64 where parseJSON :: Value -> Parser Float64
parseJSON = (Text -> Float64) -> Value -> Parser Float64
forall a. (Text -> a) -> Value -> Parser a
liberalDecimalParser Text -> Float64
Float64

instance ToJSON Float64 where toJSON :: Float64 -> Value
toJSON = Float64 -> Value
forall a. Coercible a Text => a -> Value
liberalDecimalPrinter

doubleToFloat64 :: Double -> Float64
doubleToFloat64 :: Double -> Float64
doubleToFloat64 = Text -> Float64
Float64 (Text -> Float64) -> (Double -> Text) -> Double -> Float64
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Text
T.decodeUtf8 (ByteString -> Text) -> (Double -> ByteString) -> Double -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
L.toStrict (ByteString -> ByteString)
-> (Double -> ByteString) -> Double -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Double -> ByteString
forall a. ToJSON a => a -> ByteString
J.encode

-- | A base-64 encoded binary string.
newtype Base64 = Base64
  { Base64 -> ByteString
unBase64 :: ByteString
  }
  deriving (Int -> Base64 -> ShowS
[Base64] -> ShowS
Base64 -> String
(Int -> Base64 -> ShowS)
-> (Base64 -> String) -> ([Base64] -> ShowS) -> Show Base64
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Base64] -> ShowS
$cshowList :: [Base64] -> ShowS
show :: Base64 -> String
$cshow :: Base64 -> String
showsPrec :: Int -> Base64 -> ShowS
$cshowsPrec :: Int -> Base64 -> ShowS
Show, Base64 -> Base64 -> Bool
(Base64 -> Base64 -> Bool)
-> (Base64 -> Base64 -> Bool) -> Eq Base64
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Base64 -> Base64 -> Bool
$c/= :: Base64 -> Base64 -> Bool
== :: Base64 -> Base64 -> Bool
$c== :: Base64 -> Base64 -> Bool
Eq, Eq Base64
Eq Base64
-> (Base64 -> Base64 -> Ordering)
-> (Base64 -> Base64 -> Bool)
-> (Base64 -> Base64 -> Bool)
-> (Base64 -> Base64 -> Bool)
-> (Base64 -> Base64 -> Bool)
-> (Base64 -> Base64 -> Base64)
-> (Base64 -> Base64 -> Base64)
-> Ord Base64
Base64 -> Base64 -> Bool
Base64 -> Base64 -> Ordering
Base64 -> Base64 -> Base64
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Base64 -> Base64 -> Base64
$cmin :: Base64 -> Base64 -> Base64
max :: Base64 -> Base64 -> Base64
$cmax :: Base64 -> Base64 -> Base64
>= :: Base64 -> Base64 -> Bool
$c>= :: Base64 -> Base64 -> Bool
> :: Base64 -> Base64 -> Bool
$c> :: Base64 -> Base64 -> Bool
<= :: Base64 -> Base64 -> Bool
$c<= :: Base64 -> Base64 -> Bool
< :: Base64 -> Base64 -> Bool
$c< :: Base64 -> Base64 -> Bool
compare :: Base64 -> Base64 -> Ordering
$ccompare :: Base64 -> Base64 -> Ordering
$cp1Ord :: Eq Base64
Ord, (forall x. Base64 -> Rep Base64 x)
-> (forall x. Rep Base64 x -> Base64) -> Generic Base64
forall x. Rep Base64 x -> Base64
forall x. Base64 -> Rep Base64 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Base64 x -> Base64
$cfrom :: forall x. Base64 -> Rep Base64 x
Generic, Typeable Base64
DataType
Constr
Typeable Base64
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Base64 -> c Base64)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Base64)
-> (Base64 -> Constr)
-> (Base64 -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Base64))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Base64))
-> ((forall b. Data b => b -> b) -> Base64 -> Base64)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Base64 -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Base64 -> r)
-> (forall u. (forall d. Data d => d -> u) -> Base64 -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Base64 -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Base64 -> m Base64)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Base64 -> m Base64)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Base64 -> m Base64)
-> Data Base64
Base64 -> DataType
Base64 -> Constr
(forall b. Data b => b -> b) -> Base64 -> Base64
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Base64 -> c Base64
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Base64
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Base64 -> u
forall u. (forall d. Data d => d -> u) -> Base64 -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Base64 -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Base64 -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Base64 -> m Base64
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Base64 -> m Base64
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Base64
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Base64 -> c Base64
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Base64)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Base64)
$cBase64 :: Constr
$tBase64 :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Base64 -> m Base64
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Base64 -> m Base64
gmapMp :: (forall d. Data d => d -> m d) -> Base64 -> m Base64
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Base64 -> m Base64
gmapM :: (forall d. Data d => d -> m d) -> Base64 -> m Base64
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Base64 -> m Base64
gmapQi :: Int -> (forall d. Data d => d -> u) -> Base64 -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Base64 -> u
gmapQ :: (forall d. Data d => d -> u) -> Base64 -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Base64 -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Base64 -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Base64 -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Base64 -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Base64 -> r
gmapT :: (forall b. Data b => b -> b) -> Base64 -> Base64
$cgmapT :: (forall b. Data b => b -> b) -> Base64 -> Base64
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Base64)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Base64)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Base64)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Base64)
dataTypeOf :: Base64 -> DataType
$cdataTypeOf :: Base64 -> DataType
toConstr :: Base64 -> Constr
$ctoConstr :: Base64 -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Base64
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Base64
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Base64 -> c Base64
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Base64 -> c Base64
$cp1Data :: Typeable Base64
Data, Base64 -> Q Exp
Base64 -> Q (TExp Base64)
(Base64 -> Q Exp) -> (Base64 -> Q (TExp Base64)) -> Lift Base64
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Base64 -> Q (TExp Base64)
$cliftTyped :: Base64 -> Q (TExp Base64)
lift :: Base64 -> Q Exp
$clift :: Base64 -> Q Exp
Lift)

instance FromJSON Base64 where parseJSON :: Value -> Parser Base64
parseJSON = (Text -> Base64) -> Parser Text -> Parser Base64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (ByteString -> Base64
Base64 (ByteString -> Base64) -> (Text -> ByteString) -> Text -> Base64
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
L.toStrict (ByteString -> ByteString)
-> (Text -> ByteString) -> Text -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ByteString
base64Decode) (Parser Text -> Parser Base64)
-> (Value -> Parser Text) -> Value -> Parser Base64
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Value -> Parser Text
forall a. FromJSON a => Value -> Parser a
J.parseJSON

instance ToJSON Base64 where toJSON :: Base64 -> Value
toJSON = Text -> Value
forall a. ToJSON a => a -> Value
J.toJSON (Text -> Value) -> (Base64 -> Text) -> Base64 -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Text
T.decodeUtf8 (ByteString -> Text) -> (Base64 -> ByteString) -> Base64 -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> ByteString
Base64.encode (ByteString -> ByteString)
-> (Base64 -> ByteString) -> Base64 -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Base64 -> ByteString
unBase64

instance Cacheable Base64

instance NFData Base64

instance Hashable Base64

newtype Geography = Geography
  { Geography -> Text
unGeography :: Text
  }
  deriving (Int -> Geography -> ShowS
[Geography] -> ShowS
Geography -> String
(Int -> Geography -> ShowS)
-> (Geography -> String)
-> ([Geography] -> ShowS)
-> Show Geography
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Geography] -> ShowS
$cshowList :: [Geography] -> ShowS
show :: Geography -> String
$cshow :: Geography -> String
showsPrec :: Int -> Geography -> ShowS
$cshowsPrec :: Int -> Geography -> ShowS
Show, Geography -> Geography -> Bool
(Geography -> Geography -> Bool)
-> (Geography -> Geography -> Bool) -> Eq Geography
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Geography -> Geography -> Bool
$c/= :: Geography -> Geography -> Bool
== :: Geography -> Geography -> Bool
$c== :: Geography -> Geography -> Bool
Eq, Eq Geography
Eq Geography
-> (Geography -> Geography -> Ordering)
-> (Geography -> Geography -> Bool)
-> (Geography -> Geography -> Bool)
-> (Geography -> Geography -> Bool)
-> (Geography -> Geography -> Bool)
-> (Geography -> Geography -> Geography)
-> (Geography -> Geography -> Geography)
-> Ord Geography
Geography -> Geography -> Bool
Geography -> Geography -> Ordering
Geography -> Geography -> Geography
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Geography -> Geography -> Geography
$cmin :: Geography -> Geography -> Geography
max :: Geography -> Geography -> Geography
$cmax :: Geography -> Geography -> Geography
>= :: Geography -> Geography -> Bool
$c>= :: Geography -> Geography -> Bool
> :: Geography -> Geography -> Bool
$c> :: Geography -> Geography -> Bool
<= :: Geography -> Geography -> Bool
$c<= :: Geography -> Geography -> Bool
< :: Geography -> Geography -> Bool
$c< :: Geography -> Geography -> Bool
compare :: Geography -> Geography -> Ordering
$ccompare :: Geography -> Geography -> Ordering
$cp1Ord :: Eq Geography
Ord, (forall x. Geography -> Rep Geography x)
-> (forall x. Rep Geography x -> Geography) -> Generic Geography
forall x. Rep Geography x -> Geography
forall x. Geography -> Rep Geography x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Geography x -> Geography
$cfrom :: forall x. Geography -> Rep Geography x
Generic, Typeable Geography
DataType
Constr
Typeable Geography
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Geography -> c Geography)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Geography)
-> (Geography -> Constr)
-> (Geography -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Geography))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Geography))
-> ((forall b. Data b => b -> b) -> Geography -> Geography)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Geography -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Geography -> r)
-> (forall u. (forall d. Data d => d -> u) -> Geography -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Geography -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Geography -> m Geography)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Geography -> m Geography)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Geography -> m Geography)
-> Data Geography
Geography -> DataType
Geography -> Constr
(forall b. Data b => b -> b) -> Geography -> Geography
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Geography -> c Geography
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Geography
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Geography -> u
forall u. (forall d. Data d => d -> u) -> Geography -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Geography -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Geography -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Geography -> m Geography
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Geography -> m Geography
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Geography
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Geography -> c Geography
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Geography)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Geography)
$cGeography :: Constr
$tGeography :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Geography -> m Geography
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Geography -> m Geography
gmapMp :: (forall d. Data d => d -> m d) -> Geography -> m Geography
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Geography -> m Geography
gmapM :: (forall d. Data d => d -> m d) -> Geography -> m Geography
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Geography -> m Geography
gmapQi :: Int -> (forall d. Data d => d -> u) -> Geography -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Geography -> u
gmapQ :: (forall d. Data d => d -> u) -> Geography -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Geography -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Geography -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Geography -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Geography -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Geography -> r
gmapT :: (forall b. Data b => b -> b) -> Geography -> Geography
$cgmapT :: (forall b. Data b => b -> b) -> Geography -> Geography
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Geography)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Geography)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Geography)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Geography)
dataTypeOf :: Geography -> DataType
$cdataTypeOf :: Geography -> DataType
toConstr :: Geography -> Constr
$ctoConstr :: Geography -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Geography
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Geography
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Geography -> c Geography
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Geography -> c Geography
$cp1Data :: Typeable Geography
Data, Geography -> Q Exp
Geography -> Q (TExp Geography)
(Geography -> Q Exp)
-> (Geography -> Q (TExp Geography)) -> Lift Geography
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: Geography -> Q (TExp Geography)
$cliftTyped :: Geography -> Q (TExp Geography)
lift :: Geography -> Q Exp
$clift :: Geography -> Q Exp
Lift, Value -> Parser [Geography]
Value -> Parser Geography
(Value -> Parser Geography)
-> (Value -> Parser [Geography]) -> FromJSON Geography
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Geography]
$cparseJSONList :: Value -> Parser [Geography]
parseJSON :: Value -> Parser Geography
$cparseJSON :: Value -> Parser Geography
FromJSON, [Geography] -> Value
[Geography] -> Encoding
Geography -> Value
Geography -> Encoding
(Geography -> Value)
-> (Geography -> Encoding)
-> ([Geography] -> Value)
-> ([Geography] -> Encoding)
-> ToJSON Geography
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Geography] -> Encoding
$ctoEncodingList :: [Geography] -> Encoding
toJSONList :: [Geography] -> Value
$ctoJSONList :: [Geography] -> Value
toEncoding :: Geography -> Encoding
$ctoEncoding :: Geography -> Encoding
toJSON :: Geography -> Value
$ctoJSON :: Geography -> Value
ToJSON)

instance Cacheable Geography

instance NFData Geography

instance Hashable Geography

data ScalarType
  = StringScalarType
  | BytesScalarType
  | IntegerScalarType
  | FloatScalarType
  | BoolScalarType
  | TimestampScalarType
  | DateScalarType
  | TimeScalarType
  | DatetimeScalarType
  | GeographyScalarType
  | DecimalScalarType
  | BigDecimalScalarType
  | StructScalarType
  deriving (Int -> ScalarType -> ShowS
[ScalarType] -> ShowS
ScalarType -> String
(Int -> ScalarType -> ShowS)
-> (ScalarType -> String)
-> ([ScalarType] -> ShowS)
-> Show ScalarType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScalarType] -> ShowS
$cshowList :: [ScalarType] -> ShowS
show :: ScalarType -> String
$cshow :: ScalarType -> String
showsPrec :: Int -> ScalarType -> ShowS
$cshowsPrec :: Int -> ScalarType -> ShowS
Show, ScalarType -> ScalarType -> Bool
(ScalarType -> ScalarType -> Bool)
-> (ScalarType -> ScalarType -> Bool) -> Eq ScalarType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScalarType -> ScalarType -> Bool
$c/= :: ScalarType -> ScalarType -> Bool
== :: ScalarType -> ScalarType -> Bool
$c== :: ScalarType -> ScalarType -> Bool
Eq, Eq ScalarType
Eq ScalarType
-> (ScalarType -> ScalarType -> Ordering)
-> (ScalarType -> ScalarType -> Bool)
-> (ScalarType -> ScalarType -> Bool)
-> (ScalarType -> ScalarType -> Bool)
-> (ScalarType -> ScalarType -> Bool)
-> (ScalarType -> ScalarType -> ScalarType)
-> (ScalarType -> ScalarType -> ScalarType)
-> Ord ScalarType
ScalarType -> ScalarType -> Bool
ScalarType -> ScalarType -> Ordering
ScalarType -> ScalarType -> ScalarType
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ScalarType -> ScalarType -> ScalarType
$cmin :: ScalarType -> ScalarType -> ScalarType
max :: ScalarType -> ScalarType -> ScalarType
$cmax :: ScalarType -> ScalarType -> ScalarType
>= :: ScalarType -> ScalarType -> Bool
$c>= :: ScalarType -> ScalarType -> Bool
> :: ScalarType -> ScalarType -> Bool
$c> :: ScalarType -> ScalarType -> Bool
<= :: ScalarType -> ScalarType -> Bool
$c<= :: ScalarType -> ScalarType -> Bool
< :: ScalarType -> ScalarType -> Bool
$c< :: ScalarType -> ScalarType -> Bool
compare :: ScalarType -> ScalarType -> Ordering
$ccompare :: ScalarType -> ScalarType -> Ordering
$cp1Ord :: Eq ScalarType
Ord, (forall x. ScalarType -> Rep ScalarType x)
-> (forall x. Rep ScalarType x -> ScalarType) -> Generic ScalarType
forall x. Rep ScalarType x -> ScalarType
forall x. ScalarType -> Rep ScalarType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScalarType x -> ScalarType
$cfrom :: forall x. ScalarType -> Rep ScalarType x
Generic, Typeable ScalarType
DataType
Constr
Typeable ScalarType
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ScalarType -> c ScalarType)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ScalarType)
-> (ScalarType -> Constr)
-> (ScalarType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ScalarType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ScalarType))
-> ((forall b. Data b => b -> b) -> ScalarType -> ScalarType)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ScalarType -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ScalarType -> r)
-> (forall u. (forall d. Data d => d -> u) -> ScalarType -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ScalarType -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ScalarType -> m ScalarType)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ScalarType -> m ScalarType)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ScalarType -> m ScalarType)
-> Data ScalarType
ScalarType -> DataType
ScalarType -> Constr
(forall b. Data b => b -> b) -> ScalarType -> ScalarType
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ScalarType -> c ScalarType
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ScalarType
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ScalarType -> u
forall u. (forall d. Data d => d -> u) -> ScalarType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ScalarType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ScalarType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ScalarType -> m ScalarType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ScalarType -> m ScalarType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ScalarType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ScalarType -> c ScalarType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ScalarType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScalarType)
$cStructScalarType :: Constr
$cBigDecimalScalarType :: Constr
$cDecimalScalarType :: Constr
$cGeographyScalarType :: Constr
$cDatetimeScalarType :: Constr
$cTimeScalarType :: Constr
$cDateScalarType :: Constr
$cTimestampScalarType :: Constr
$cBoolScalarType :: Constr
$cFloatScalarType :: Constr
$cIntegerScalarType :: Constr
$cBytesScalarType :: Constr
$cStringScalarType :: Constr
$tScalarType :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ScalarType -> m ScalarType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ScalarType -> m ScalarType
gmapMp :: (forall d. Data d => d -> m d) -> ScalarType -> m ScalarType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ScalarType -> m ScalarType
gmapM :: (forall d. Data d => d -> m d) -> ScalarType -> m ScalarType
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ScalarType -> m ScalarType
gmapQi :: Int -> (forall d. Data d => d -> u) -> ScalarType -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ScalarType -> u
gmapQ :: (forall d. Data d => d -> u) -> ScalarType -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ScalarType -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ScalarType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ScalarType -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ScalarType -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ScalarType -> r
gmapT :: (forall b. Data b => b -> b) -> ScalarType -> ScalarType
$cgmapT :: (forall b. Data b => b -> b) -> ScalarType -> ScalarType
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScalarType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScalarType)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ScalarType)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ScalarType)
dataTypeOf :: ScalarType -> DataType
$cdataTypeOf :: ScalarType -> DataType
toConstr :: ScalarType -> Constr
$ctoConstr :: ScalarType -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ScalarType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ScalarType
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ScalarType -> c ScalarType
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ScalarType -> c ScalarType
$cp1Data :: Typeable ScalarType
Data, ScalarType -> Q Exp
ScalarType -> Q (TExp ScalarType)
(ScalarType -> Q Exp)
-> (ScalarType -> Q (TExp ScalarType)) -> Lift ScalarType
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: ScalarType -> Q (TExp ScalarType)
$cliftTyped :: ScalarType -> Q (TExp ScalarType)
lift :: ScalarType -> Q Exp
$clift :: ScalarType -> Q Exp
Lift)

instance FromJSON ScalarType

instance Cacheable ScalarType

instance ToJSON ScalarType

instance ToJSONKey ScalarType

instance NFData ScalarType

instance Hashable ScalarType

instance ToTxt ScalarType where toTxt :: ScalarType -> Text
toTxt = ScalarType -> Text
forall a. Show a => a -> Text
tshow

instance ToErrorValue ScalarType where
  toErrorValue :: ScalarType -> ErrorMessage
toErrorValue = Text -> ErrorMessage
ErrorValue.squote (Text -> ErrorMessage)
-> (ScalarType -> Text) -> ScalarType -> ErrorMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ScalarType -> Text
forall a. Show a => a -> Text
tshow

--------------------------------------------------------------------------------
-- Unified table metadata

data UnifiedMetadata = UnifiedMetadata
  { UnifiedMetadata -> [UnifiedTableMetadata]
tables :: [UnifiedTableMetadata]
  }
  deriving (UnifiedMetadata -> UnifiedMetadata -> Bool
(UnifiedMetadata -> UnifiedMetadata -> Bool)
-> (UnifiedMetadata -> UnifiedMetadata -> Bool)
-> Eq UnifiedMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnifiedMetadata -> UnifiedMetadata -> Bool
$c/= :: UnifiedMetadata -> UnifiedMetadata -> Bool
== :: UnifiedMetadata -> UnifiedMetadata -> Bool
$c== :: UnifiedMetadata -> UnifiedMetadata -> Bool
Eq, Eq UnifiedMetadata
Eq UnifiedMetadata
-> (UnifiedMetadata -> UnifiedMetadata -> Ordering)
-> (UnifiedMetadata -> UnifiedMetadata -> Bool)
-> (UnifiedMetadata -> UnifiedMetadata -> Bool)
-> (UnifiedMetadata -> UnifiedMetadata -> Bool)
-> (UnifiedMetadata -> UnifiedMetadata -> Bool)
-> (UnifiedMetadata -> UnifiedMetadata -> UnifiedMetadata)
-> (UnifiedMetadata -> UnifiedMetadata -> UnifiedMetadata)
-> Ord UnifiedMetadata
UnifiedMetadata -> UnifiedMetadata -> Bool
UnifiedMetadata -> UnifiedMetadata -> Ordering
UnifiedMetadata -> UnifiedMetadata -> UnifiedMetadata
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: UnifiedMetadata -> UnifiedMetadata -> UnifiedMetadata
$cmin :: UnifiedMetadata -> UnifiedMetadata -> UnifiedMetadata
max :: UnifiedMetadata -> UnifiedMetadata -> UnifiedMetadata
$cmax :: UnifiedMetadata -> UnifiedMetadata -> UnifiedMetadata
>= :: UnifiedMetadata -> UnifiedMetadata -> Bool
$c>= :: UnifiedMetadata -> UnifiedMetadata -> Bool
> :: UnifiedMetadata -> UnifiedMetadata -> Bool
$c> :: UnifiedMetadata -> UnifiedMetadata -> Bool
<= :: UnifiedMetadata -> UnifiedMetadata -> Bool
$c<= :: UnifiedMetadata -> UnifiedMetadata -> Bool
< :: UnifiedMetadata -> UnifiedMetadata -> Bool
$c< :: UnifiedMetadata -> UnifiedMetadata -> Bool
compare :: UnifiedMetadata -> UnifiedMetadata -> Ordering
$ccompare :: UnifiedMetadata -> UnifiedMetadata -> Ordering
$cp1Ord :: Eq UnifiedMetadata
Ord, Int -> UnifiedMetadata -> ShowS
[UnifiedMetadata] -> ShowS
UnifiedMetadata -> String
(Int -> UnifiedMetadata -> ShowS)
-> (UnifiedMetadata -> String)
-> ([UnifiedMetadata] -> ShowS)
-> Show UnifiedMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnifiedMetadata] -> ShowS
$cshowList :: [UnifiedMetadata] -> ShowS
show :: UnifiedMetadata -> String
$cshow :: UnifiedMetadata -> String
showsPrec :: Int -> UnifiedMetadata -> ShowS
$cshowsPrec :: Int -> UnifiedMetadata -> ShowS
Show)

data UnifiedTableMetadata = UnifiedTableMetadata
  { UnifiedTableMetadata -> UnifiedTableName
table :: UnifiedTableName,
    UnifiedTableMetadata -> [UnifiedObjectRelationship]
object_relationships :: [UnifiedObjectRelationship],
    UnifiedTableMetadata -> [UnifiedArrayRelationship]
array_relationships :: [UnifiedArrayRelationship],
    UnifiedTableMetadata -> [UnifiedColumn]
columns :: [UnifiedColumn]
  }
  deriving (UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
(UnifiedTableMetadata -> UnifiedTableMetadata -> Bool)
-> (UnifiedTableMetadata -> UnifiedTableMetadata -> Bool)
-> Eq UnifiedTableMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
$c/= :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
== :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
$c== :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
Eq, Eq UnifiedTableMetadata
Eq UnifiedTableMetadata
-> (UnifiedTableMetadata -> UnifiedTableMetadata -> Ordering)
-> (UnifiedTableMetadata -> UnifiedTableMetadata -> Bool)
-> (UnifiedTableMetadata -> UnifiedTableMetadata -> Bool)
-> (UnifiedTableMetadata -> UnifiedTableMetadata -> Bool)
-> (UnifiedTableMetadata -> UnifiedTableMetadata -> Bool)
-> (UnifiedTableMetadata
    -> UnifiedTableMetadata -> UnifiedTableMetadata)
-> (UnifiedTableMetadata
    -> UnifiedTableMetadata -> UnifiedTableMetadata)
-> Ord UnifiedTableMetadata
UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
UnifiedTableMetadata -> UnifiedTableMetadata -> Ordering
UnifiedTableMetadata
-> UnifiedTableMetadata -> UnifiedTableMetadata
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: UnifiedTableMetadata
-> UnifiedTableMetadata -> UnifiedTableMetadata
$cmin :: UnifiedTableMetadata
-> UnifiedTableMetadata -> UnifiedTableMetadata
max :: UnifiedTableMetadata
-> UnifiedTableMetadata -> UnifiedTableMetadata
$cmax :: UnifiedTableMetadata
-> UnifiedTableMetadata -> UnifiedTableMetadata
>= :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
$c>= :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
> :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
$c> :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
<= :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
$c<= :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
< :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
$c< :: UnifiedTableMetadata -> UnifiedTableMetadata -> Bool
compare :: UnifiedTableMetadata -> UnifiedTableMetadata -> Ordering
$ccompare :: UnifiedTableMetadata -> UnifiedTableMetadata -> Ordering
$cp1Ord :: Eq UnifiedTableMetadata
Ord, Int -> UnifiedTableMetadata -> ShowS
[UnifiedTableMetadata] -> ShowS
UnifiedTableMetadata -> String
(Int -> UnifiedTableMetadata -> ShowS)
-> (UnifiedTableMetadata -> String)
-> ([UnifiedTableMetadata] -> ShowS)
-> Show UnifiedTableMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnifiedTableMetadata] -> ShowS
$cshowList :: [UnifiedTableMetadata] -> ShowS
show :: UnifiedTableMetadata -> String
$cshow :: UnifiedTableMetadata -> String
showsPrec :: Int -> UnifiedTableMetadata -> ShowS
$cshowsPrec :: Int -> UnifiedTableMetadata -> ShowS
Show)

data UnifiedColumn = UnifiedColumn
  { UnifiedColumn -> Text
name :: Text,
    UnifiedColumn -> ScalarType
type' :: ScalarType
  }
  deriving (UnifiedColumn -> UnifiedColumn -> Bool
(UnifiedColumn -> UnifiedColumn -> Bool)
-> (UnifiedColumn -> UnifiedColumn -> Bool) -> Eq UnifiedColumn
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnifiedColumn -> UnifiedColumn -> Bool
$c/= :: UnifiedColumn -> UnifiedColumn -> Bool
== :: UnifiedColumn -> UnifiedColumn -> Bool
$c== :: UnifiedColumn -> UnifiedColumn -> Bool
Eq, Eq UnifiedColumn
Eq UnifiedColumn
-> (UnifiedColumn -> UnifiedColumn -> Ordering)
-> (UnifiedColumn -> UnifiedColumn -> Bool)
-> (UnifiedColumn -> UnifiedColumn -> Bool)
-> (UnifiedColumn -> UnifiedColumn -> Bool)
-> (UnifiedColumn -> UnifiedColumn -> Bool)
-> (UnifiedColumn -> UnifiedColumn -> UnifiedColumn)
-> (UnifiedColumn -> UnifiedColumn -> UnifiedColumn)
-> Ord UnifiedColumn
UnifiedColumn -> UnifiedColumn -> Bool
UnifiedColumn -> UnifiedColumn -> Ordering
UnifiedColumn -> UnifiedColumn -> UnifiedColumn
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: UnifiedColumn -> UnifiedColumn -> UnifiedColumn
$cmin :: UnifiedColumn -> UnifiedColumn -> UnifiedColumn
max :: UnifiedColumn -> UnifiedColumn -> UnifiedColumn
$cmax :: UnifiedColumn -> UnifiedColumn -> UnifiedColumn
>= :: UnifiedColumn -> UnifiedColumn -> Bool
$c>= :: UnifiedColumn -> UnifiedColumn -> Bool
> :: UnifiedColumn -> UnifiedColumn -> Bool
$c> :: UnifiedColumn -> UnifiedColumn -> Bool
<= :: UnifiedColumn -> UnifiedColumn -> Bool
$c<= :: UnifiedColumn -> UnifiedColumn -> Bool
< :: UnifiedColumn -> UnifiedColumn -> Bool
$c< :: UnifiedColumn -> UnifiedColumn -> Bool
compare :: UnifiedColumn -> UnifiedColumn -> Ordering
$ccompare :: UnifiedColumn -> UnifiedColumn -> Ordering
$cp1Ord :: Eq UnifiedColumn
Ord, Int -> UnifiedColumn -> ShowS
[UnifiedColumn] -> ShowS
UnifiedColumn -> String
(Int -> UnifiedColumn -> ShowS)
-> (UnifiedColumn -> String)
-> ([UnifiedColumn] -> ShowS)
-> Show UnifiedColumn
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnifiedColumn] -> ShowS
$cshowList :: [UnifiedColumn] -> ShowS
show :: UnifiedColumn -> String
$cshow :: UnifiedColumn -> String
showsPrec :: Int -> UnifiedColumn -> ShowS
$cshowsPrec :: Int -> UnifiedColumn -> ShowS
Show)

data UnifiedTableName = UnifiedTableName
  { UnifiedTableName -> Text
schema :: Text,
    UnifiedTableName -> Text
name :: Text
  }
  deriving (UnifiedTableName -> UnifiedTableName -> Bool
(UnifiedTableName -> UnifiedTableName -> Bool)
-> (UnifiedTableName -> UnifiedTableName -> Bool)
-> Eq UnifiedTableName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnifiedTableName -> UnifiedTableName -> Bool
$c/= :: UnifiedTableName -> UnifiedTableName -> Bool
== :: UnifiedTableName -> UnifiedTableName -> Bool
$c== :: UnifiedTableName -> UnifiedTableName -> Bool
Eq, Eq UnifiedTableName
Eq UnifiedTableName
-> (UnifiedTableName -> UnifiedTableName -> Ordering)
-> (UnifiedTableName -> UnifiedTableName -> Bool)
-> (UnifiedTableName -> UnifiedTableName -> Bool)
-> (UnifiedTableName -> UnifiedTableName -> Bool)
-> (UnifiedTableName -> UnifiedTableName -> Bool)
-> (UnifiedTableName -> UnifiedTableName -> UnifiedTableName)
-> (UnifiedTableName -> UnifiedTableName -> UnifiedTableName)
-> Ord UnifiedTableName
UnifiedTableName -> UnifiedTableName -> Bool
UnifiedTableName -> UnifiedTableName -> Ordering
UnifiedTableName -> UnifiedTableName -> UnifiedTableName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: UnifiedTableName -> UnifiedTableName -> UnifiedTableName
$cmin :: UnifiedTableName -> UnifiedTableName -> UnifiedTableName
max :: UnifiedTableName -> UnifiedTableName -> UnifiedTableName
$cmax :: UnifiedTableName -> UnifiedTableName -> UnifiedTableName
>= :: UnifiedTableName -> UnifiedTableName -> Bool
$c>= :: UnifiedTableName -> UnifiedTableName -> Bool
> :: UnifiedTableName -> UnifiedTableName -> Bool
$c> :: UnifiedTableName -> UnifiedTableName -> Bool
<= :: UnifiedTableName -> UnifiedTableName -> Bool
$c<= :: UnifiedTableName -> UnifiedTableName -> Bool
< :: UnifiedTableName -> UnifiedTableName -> Bool
$c< :: UnifiedTableName -> UnifiedTableName -> Bool
compare :: UnifiedTableName -> UnifiedTableName -> Ordering
$ccompare :: UnifiedTableName -> UnifiedTableName -> Ordering
$cp1Ord :: Eq UnifiedTableName
Ord, Int -> UnifiedTableName -> ShowS
[UnifiedTableName] -> ShowS
UnifiedTableName -> String
(Int -> UnifiedTableName -> ShowS)
-> (UnifiedTableName -> String)
-> ([UnifiedTableName] -> ShowS)
-> Show UnifiedTableName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnifiedTableName] -> ShowS
$cshowList :: [UnifiedTableName] -> ShowS
show :: UnifiedTableName -> String
$cshow :: UnifiedTableName -> String
showsPrec :: Int -> UnifiedTableName -> ShowS
$cshowsPrec :: Int -> UnifiedTableName -> ShowS
Show)

data UnifiedObjectRelationship = UnifiedObjectRelationship
  { UnifiedObjectRelationship -> UnifiedUsing
using :: UnifiedUsing,
    UnifiedObjectRelationship -> Text
name :: Text
  }
  deriving (UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
(UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool)
-> (UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool)
-> Eq UnifiedObjectRelationship
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
$c/= :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
== :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
$c== :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
Eq, Eq UnifiedObjectRelationship
Eq UnifiedObjectRelationship
-> (UnifiedObjectRelationship
    -> UnifiedObjectRelationship -> Ordering)
-> (UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool)
-> (UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool)
-> (UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool)
-> (UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool)
-> (UnifiedObjectRelationship
    -> UnifiedObjectRelationship -> UnifiedObjectRelationship)
-> (UnifiedObjectRelationship
    -> UnifiedObjectRelationship -> UnifiedObjectRelationship)
-> Ord UnifiedObjectRelationship
UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
UnifiedObjectRelationship -> UnifiedObjectRelationship -> Ordering
UnifiedObjectRelationship
-> UnifiedObjectRelationship -> UnifiedObjectRelationship
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: UnifiedObjectRelationship
-> UnifiedObjectRelationship -> UnifiedObjectRelationship
$cmin :: UnifiedObjectRelationship
-> UnifiedObjectRelationship -> UnifiedObjectRelationship
max :: UnifiedObjectRelationship
-> UnifiedObjectRelationship -> UnifiedObjectRelationship
$cmax :: UnifiedObjectRelationship
-> UnifiedObjectRelationship -> UnifiedObjectRelationship
>= :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
$c>= :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
> :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
$c> :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
<= :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
$c<= :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
< :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
$c< :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Bool
compare :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Ordering
$ccompare :: UnifiedObjectRelationship -> UnifiedObjectRelationship -> Ordering
$cp1Ord :: Eq UnifiedObjectRelationship
Ord, Int -> UnifiedObjectRelationship -> ShowS
[UnifiedObjectRelationship] -> ShowS
UnifiedObjectRelationship -> String
(Int -> UnifiedObjectRelationship -> ShowS)
-> (UnifiedObjectRelationship -> String)
-> ([UnifiedObjectRelationship] -> ShowS)
-> Show UnifiedObjectRelationship
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnifiedObjectRelationship] -> ShowS
$cshowList :: [UnifiedObjectRelationship] -> ShowS
show :: UnifiedObjectRelationship -> String
$cshow :: UnifiedObjectRelationship -> String
showsPrec :: Int -> UnifiedObjectRelationship -> ShowS
$cshowsPrec :: Int -> UnifiedObjectRelationship -> ShowS
Show)

data UnifiedArrayRelationship = UnifiedArrayRelationship
  { UnifiedArrayRelationship -> UnifiedUsing
using :: UnifiedUsing,
    UnifiedArrayRelationship -> Text
name :: Text
  }
  deriving (UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
(UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool)
-> (UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool)
-> Eq UnifiedArrayRelationship
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
$c/= :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
== :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
$c== :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
Eq, Eq UnifiedArrayRelationship
Eq UnifiedArrayRelationship
-> (UnifiedArrayRelationship
    -> UnifiedArrayRelationship -> Ordering)
-> (UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool)
-> (UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool)
-> (UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool)
-> (UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool)
-> (UnifiedArrayRelationship
    -> UnifiedArrayRelationship -> UnifiedArrayRelationship)
-> (UnifiedArrayRelationship
    -> UnifiedArrayRelationship -> UnifiedArrayRelationship)
-> Ord UnifiedArrayRelationship
UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
UnifiedArrayRelationship -> UnifiedArrayRelationship -> Ordering
UnifiedArrayRelationship
-> UnifiedArrayRelationship -> UnifiedArrayRelationship
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: UnifiedArrayRelationship
-> UnifiedArrayRelationship -> UnifiedArrayRelationship
$cmin :: UnifiedArrayRelationship
-> UnifiedArrayRelationship -> UnifiedArrayRelationship
max :: UnifiedArrayRelationship
-> UnifiedArrayRelationship -> UnifiedArrayRelationship
$cmax :: UnifiedArrayRelationship
-> UnifiedArrayRelationship -> UnifiedArrayRelationship
>= :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
$c>= :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
> :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
$c> :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
<= :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
$c<= :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
< :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
$c< :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Bool
compare :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Ordering
$ccompare :: UnifiedArrayRelationship -> UnifiedArrayRelationship -> Ordering
$cp1Ord :: Eq UnifiedArrayRelationship
Ord, Int -> UnifiedArrayRelationship -> ShowS
[UnifiedArrayRelationship] -> ShowS
UnifiedArrayRelationship -> String
(Int -> UnifiedArrayRelationship -> ShowS)
-> (UnifiedArrayRelationship -> String)
-> ([UnifiedArrayRelationship] -> ShowS)
-> Show UnifiedArrayRelationship
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnifiedArrayRelationship] -> ShowS
$cshowList :: [UnifiedArrayRelationship] -> ShowS
show :: UnifiedArrayRelationship -> String
$cshow :: UnifiedArrayRelationship -> String
showsPrec :: Int -> UnifiedArrayRelationship -> ShowS
$cshowsPrec :: Int -> UnifiedArrayRelationship -> ShowS
Show)

data UnifiedUsing = UnifiedUsing
  { UnifiedUsing -> UnifiedOn
foreign_key_constraint_on :: UnifiedOn
  }
  deriving (UnifiedUsing -> UnifiedUsing -> Bool
(UnifiedUsing -> UnifiedUsing -> Bool)
-> (UnifiedUsing -> UnifiedUsing -> Bool) -> Eq UnifiedUsing
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnifiedUsing -> UnifiedUsing -> Bool
$c/= :: UnifiedUsing -> UnifiedUsing -> Bool
== :: UnifiedUsing -> UnifiedUsing -> Bool
$c== :: UnifiedUsing -> UnifiedUsing -> Bool
Eq, Eq UnifiedUsing
Eq UnifiedUsing
-> (UnifiedUsing -> UnifiedUsing -> Ordering)
-> (UnifiedUsing -> UnifiedUsing -> Bool)
-> (UnifiedUsing -> UnifiedUsing -> Bool)
-> (UnifiedUsing -> UnifiedUsing -> Bool)
-> (UnifiedUsing -> UnifiedUsing -> Bool)
-> (UnifiedUsing -> UnifiedUsing -> UnifiedUsing)
-> (UnifiedUsing -> UnifiedUsing -> UnifiedUsing)
-> Ord UnifiedUsing
UnifiedUsing -> UnifiedUsing -> Bool
UnifiedUsing -> UnifiedUsing -> Ordering
UnifiedUsing -> UnifiedUsing -> UnifiedUsing
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: UnifiedUsing -> UnifiedUsing -> UnifiedUsing
$cmin :: UnifiedUsing -> UnifiedUsing -> UnifiedUsing
max :: UnifiedUsing -> UnifiedUsing -> UnifiedUsing
$cmax :: UnifiedUsing -> UnifiedUsing -> UnifiedUsing
>= :: UnifiedUsing -> UnifiedUsing -> Bool
$c>= :: UnifiedUsing -> UnifiedUsing -> Bool
> :: UnifiedUsing -> UnifiedUsing -> Bool
$c> :: UnifiedUsing -> UnifiedUsing -> Bool
<= :: UnifiedUsing -> UnifiedUsing -> Bool
$c<= :: UnifiedUsing -> UnifiedUsing -> Bool
< :: UnifiedUsing -> UnifiedUsing -> Bool
$c< :: UnifiedUsing -> UnifiedUsing -> Bool
compare :: UnifiedUsing -> UnifiedUsing -> Ordering
$ccompare :: UnifiedUsing -> UnifiedUsing -> Ordering
$cp1Ord :: Eq UnifiedUsing
Ord, Int -> UnifiedUsing -> ShowS
[UnifiedUsing] -> ShowS
UnifiedUsing -> String
(Int -> UnifiedUsing -> ShowS)
-> (UnifiedUsing -> String)
-> ([UnifiedUsing] -> ShowS)
-> Show UnifiedUsing
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnifiedUsing] -> ShowS
$cshowList :: [UnifiedUsing] -> ShowS
show :: UnifiedUsing -> String
$cshow :: UnifiedUsing -> String
showsPrec :: Int -> UnifiedUsing -> ShowS
$cshowsPrec :: Int -> UnifiedUsing -> ShowS
Show)

data UnifiedOn = UnifiedOn
  { UnifiedOn -> UnifiedTableName
table :: UnifiedTableName,
    UnifiedOn -> Text
column :: Text
  }
  deriving (UnifiedOn -> UnifiedOn -> Bool
(UnifiedOn -> UnifiedOn -> Bool)
-> (UnifiedOn -> UnifiedOn -> Bool) -> Eq UnifiedOn
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnifiedOn -> UnifiedOn -> Bool
$c/= :: UnifiedOn -> UnifiedOn -> Bool
== :: UnifiedOn -> UnifiedOn -> Bool
$c== :: UnifiedOn -> UnifiedOn -> Bool
Eq, Eq UnifiedOn
Eq UnifiedOn
-> (UnifiedOn -> UnifiedOn -> Ordering)
-> (UnifiedOn -> UnifiedOn -> Bool)
-> (UnifiedOn -> UnifiedOn -> Bool)
-> (UnifiedOn -> UnifiedOn -> Bool)
-> (UnifiedOn -> UnifiedOn -> Bool)
-> (UnifiedOn -> UnifiedOn -> UnifiedOn)
-> (UnifiedOn -> UnifiedOn -> UnifiedOn)
-> Ord UnifiedOn
UnifiedOn -> UnifiedOn -> Bool
UnifiedOn -> UnifiedOn -> Ordering
UnifiedOn -> UnifiedOn -> UnifiedOn
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: UnifiedOn -> UnifiedOn -> UnifiedOn
$cmin :: UnifiedOn -> UnifiedOn -> UnifiedOn
max :: UnifiedOn -> UnifiedOn -> UnifiedOn
$cmax :: UnifiedOn -> UnifiedOn -> UnifiedOn
>= :: UnifiedOn -> UnifiedOn -> Bool
$c>= :: UnifiedOn -> UnifiedOn -> Bool
> :: UnifiedOn -> UnifiedOn -> Bool
$c> :: UnifiedOn -> UnifiedOn -> Bool
<= :: UnifiedOn -> UnifiedOn -> Bool
$c<= :: UnifiedOn -> UnifiedOn -> Bool
< :: UnifiedOn -> UnifiedOn -> Bool
$c< :: UnifiedOn -> UnifiedOn -> Bool
compare :: UnifiedOn -> UnifiedOn -> Ordering
$ccompare :: UnifiedOn -> UnifiedOn -> Ordering
$cp1Ord :: Eq UnifiedOn
Ord, Int -> UnifiedOn -> ShowS
[UnifiedOn] -> ShowS
UnifiedOn -> String
(Int -> UnifiedOn -> ShowS)
-> (UnifiedOn -> String)
-> ([UnifiedOn] -> ShowS)
-> Show UnifiedOn
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnifiedOn] -> ShowS
$cshowList :: [UnifiedOn] -> ShowS
show :: UnifiedOn -> String
$cshow :: UnifiedOn -> String
showsPrec :: Int -> UnifiedOn -> ShowS
$cshowsPrec :: Int -> UnifiedOn -> ShowS
Show)

data BooleanOperators a
  = ASTContains a
  | ASTEquals a
  | ASTTouches a
  | ASTWithin a
  | ASTIntersects a
  | ASTDWithin (DWithinGeogOp a)
  deriving stock (BooleanOperators a -> BooleanOperators a -> Bool
(BooleanOperators a -> BooleanOperators a -> Bool)
-> (BooleanOperators a -> BooleanOperators a -> Bool)
-> Eq (BooleanOperators a)
forall a. Eq a => BooleanOperators a -> BooleanOperators a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BooleanOperators a -> BooleanOperators a -> Bool
$c/= :: forall a. Eq a => BooleanOperators a -> BooleanOperators a -> Bool
== :: BooleanOperators a -> BooleanOperators a -> Bool
$c== :: forall a. Eq a => BooleanOperators a -> BooleanOperators a -> Bool
Eq, (forall x. BooleanOperators a -> Rep (BooleanOperators a) x)
-> (forall x. Rep (BooleanOperators a) x -> BooleanOperators a)
-> Generic (BooleanOperators a)
forall x. Rep (BooleanOperators a) x -> BooleanOperators a
forall x. BooleanOperators a -> Rep (BooleanOperators a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (BooleanOperators a) x -> BooleanOperators a
forall a x. BooleanOperators a -> Rep (BooleanOperators a) x
$cto :: forall a x. Rep (BooleanOperators a) x -> BooleanOperators a
$cfrom :: forall a x. BooleanOperators a -> Rep (BooleanOperators a) x
Generic, BooleanOperators a -> Bool
(a -> m) -> BooleanOperators a -> m
(a -> b -> b) -> b -> BooleanOperators a -> b
(forall m. Monoid m => BooleanOperators m -> m)
-> (forall m a. Monoid m => (a -> m) -> BooleanOperators a -> m)
-> (forall m a. Monoid m => (a -> m) -> BooleanOperators a -> m)
-> (forall a b. (a -> b -> b) -> b -> BooleanOperators a -> b)
-> (forall a b. (a -> b -> b) -> b -> BooleanOperators a -> b)
-> (forall b a. (b -> a -> b) -> b -> BooleanOperators a -> b)
-> (forall b a. (b -> a -> b) -> b -> BooleanOperators a -> b)
-> (forall a. (a -> a -> a) -> BooleanOperators a -> a)
-> (forall a. (a -> a -> a) -> BooleanOperators a -> a)
-> (forall a. BooleanOperators a -> [a])
-> (forall a. BooleanOperators a -> Bool)
-> (forall a. BooleanOperators a -> Int)
-> (forall a. Eq a => a -> BooleanOperators a -> Bool)
-> (forall a. Ord a => BooleanOperators a -> a)
-> (forall a. Ord a => BooleanOperators a -> a)
-> (forall a. Num a => BooleanOperators a -> a)
-> (forall a. Num a => BooleanOperators a -> a)
-> Foldable BooleanOperators
forall a. Eq a => a -> BooleanOperators a -> Bool
forall a. Num a => BooleanOperators a -> a
forall a. Ord a => BooleanOperators a -> a
forall m. Monoid m => BooleanOperators m -> m
forall a. BooleanOperators a -> Bool
forall a. BooleanOperators a -> Int
forall a. BooleanOperators a -> [a]
forall a. (a -> a -> a) -> BooleanOperators a -> a
forall m a. Monoid m => (a -> m) -> BooleanOperators a -> m
forall b a. (b -> a -> b) -> b -> BooleanOperators a -> b
forall a b. (a -> b -> b) -> b -> BooleanOperators a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: BooleanOperators a -> a
$cproduct :: forall a. Num a => BooleanOperators a -> a
sum :: BooleanOperators a -> a
$csum :: forall a. Num a => BooleanOperators a -> a
minimum :: BooleanOperators a -> a
$cminimum :: forall a. Ord a => BooleanOperators a -> a
maximum :: BooleanOperators a -> a
$cmaximum :: forall a. Ord a => BooleanOperators a -> a
elem :: a -> BooleanOperators a -> Bool
$celem :: forall a. Eq a => a -> BooleanOperators a -> Bool
length :: BooleanOperators a -> Int
$clength :: forall a. BooleanOperators a -> Int
null :: BooleanOperators a -> Bool
$cnull :: forall a. BooleanOperators a -> Bool
toList :: BooleanOperators a -> [a]
$ctoList :: forall a. BooleanOperators a -> [a]
foldl1 :: (a -> a -> a) -> BooleanOperators a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> BooleanOperators a -> a
foldr1 :: (a -> a -> a) -> BooleanOperators a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> BooleanOperators a -> a
foldl' :: (b -> a -> b) -> b -> BooleanOperators a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> BooleanOperators a -> b
foldl :: (b -> a -> b) -> b -> BooleanOperators a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> BooleanOperators a -> b
foldr' :: (a -> b -> b) -> b -> BooleanOperators a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> BooleanOperators a -> b
foldr :: (a -> b -> b) -> b -> BooleanOperators a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> BooleanOperators a -> b
foldMap' :: (a -> m) -> BooleanOperators a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> BooleanOperators a -> m
foldMap :: (a -> m) -> BooleanOperators a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> BooleanOperators a -> m
fold :: BooleanOperators m -> m
$cfold :: forall m. Monoid m => BooleanOperators m -> m
Foldable, a -> BooleanOperators b -> BooleanOperators a
(a -> b) -> BooleanOperators a -> BooleanOperators b
(forall a b. (a -> b) -> BooleanOperators a -> BooleanOperators b)
-> (forall a b. a -> BooleanOperators b -> BooleanOperators a)
-> Functor BooleanOperators
forall a b. a -> BooleanOperators b -> BooleanOperators a
forall a b. (a -> b) -> BooleanOperators a -> BooleanOperators b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> BooleanOperators b -> BooleanOperators a
$c<$ :: forall a b. a -> BooleanOperators b -> BooleanOperators a
fmap :: (a -> b) -> BooleanOperators a -> BooleanOperators b
$cfmap :: forall a b. (a -> b) -> BooleanOperators a -> BooleanOperators b
Functor, Functor BooleanOperators
Foldable BooleanOperators
Functor BooleanOperators
-> Foldable BooleanOperators
-> (forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> BooleanOperators a -> f (BooleanOperators b))
-> (forall (f :: * -> *) a.
    Applicative f =>
    BooleanOperators (f a) -> f (BooleanOperators a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> BooleanOperators a -> m (BooleanOperators b))
-> (forall (m :: * -> *) a.
    Monad m =>
    BooleanOperators (m a) -> m (BooleanOperators a))
-> Traversable BooleanOperators
(a -> f b) -> BooleanOperators a -> f (BooleanOperators b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
BooleanOperators (m a) -> m (BooleanOperators a)
forall (f :: * -> *) a.
Applicative f =>
BooleanOperators (f a) -> f (BooleanOperators a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> BooleanOperators a -> m (BooleanOperators b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> BooleanOperators a -> f (BooleanOperators b)
sequence :: BooleanOperators (m a) -> m (BooleanOperators a)
$csequence :: forall (m :: * -> *) a.
Monad m =>
BooleanOperators (m a) -> m (BooleanOperators a)
mapM :: (a -> m b) -> BooleanOperators a -> m (BooleanOperators b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> BooleanOperators a -> m (BooleanOperators b)
sequenceA :: BooleanOperators (f a) -> f (BooleanOperators a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
BooleanOperators (f a) -> f (BooleanOperators a)
traverse :: (a -> f b) -> BooleanOperators a -> f (BooleanOperators b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> BooleanOperators a -> f (BooleanOperators b)
$cp2Traversable :: Foldable BooleanOperators
$cp1Traversable :: Functor BooleanOperators
Traversable, Int -> BooleanOperators a -> ShowS
[BooleanOperators a] -> ShowS
BooleanOperators a -> String
(Int -> BooleanOperators a -> ShowS)
-> (BooleanOperators a -> String)
-> ([BooleanOperators a] -> ShowS)
-> Show (BooleanOperators a)
forall a. Show a => Int -> BooleanOperators a -> ShowS
forall a. Show a => [BooleanOperators a] -> ShowS
forall a. Show a => BooleanOperators a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BooleanOperators a] -> ShowS
$cshowList :: forall a. Show a => [BooleanOperators a] -> ShowS
show :: BooleanOperators a -> String
$cshow :: forall a. Show a => BooleanOperators a -> String
showsPrec :: Int -> BooleanOperators a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> BooleanOperators a -> ShowS
Show)

instance NFData a => NFData (BooleanOperators a)

instance Hashable a => Hashable (BooleanOperators a)

instance Cacheable a => Cacheable (BooleanOperators a)

instance ToJSON a => J.ToJSONKeyValue (BooleanOperators a) where
  toJSONKeyValue :: BooleanOperators a -> Pair
toJSONKeyValue = \case
    ASTContains a
a -> (Key
"_st_contains", a -> Value
forall a. ToJSON a => a -> Value
J.toJSON a
a)
    ASTEquals a
a -> (Key
"_st_equals", a -> Value
forall a. ToJSON a => a -> Value
J.toJSON a
a)
    ASTIntersects a
a -> (Key
"_st_intersects", a -> Value
forall a. ToJSON a => a -> Value
J.toJSON a
a)
    ASTTouches a
a -> (Key
"_st_touches", a -> Value
forall a. ToJSON a => a -> Value
J.toJSON a
a)
    ASTWithin a
a -> (Key
"_st_within", a -> Value
forall a. ToJSON a => a -> Value
J.toJSON a
a)
    ASTDWithin DWithinGeogOp a
a -> (Key
"_st_dwithin", DWithinGeogOp a -> Value
forall a. ToJSON a => a -> Value
J.toJSON DWithinGeogOp a
a)

data FunctionName = FunctionName
  { FunctionName -> Text
functionName :: Text,
    -- | System functions like "unnest" don't have schema/dataset
    FunctionName -> Maybe Text
functionNameSchema :: Maybe Text
  }
  deriving (FunctionName -> FunctionName -> Bool
(FunctionName -> FunctionName -> Bool)
-> (FunctionName -> FunctionName -> Bool) -> Eq FunctionName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionName -> FunctionName -> Bool
$c/= :: FunctionName -> FunctionName -> Bool
== :: FunctionName -> FunctionName -> Bool
$c== :: FunctionName -> FunctionName -> Bool
Eq, Int -> FunctionName -> ShowS
[FunctionName] -> ShowS
FunctionName -> String
(Int -> FunctionName -> ShowS)
-> (FunctionName -> String)
-> ([FunctionName] -> ShowS)
-> Show FunctionName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FunctionName] -> ShowS
$cshowList :: [FunctionName] -> ShowS
show :: FunctionName -> String
$cshow :: FunctionName -> String
showsPrec :: Int -> FunctionName -> ShowS
$cshowsPrec :: Int -> FunctionName -> ShowS
Show, (forall x. FunctionName -> Rep FunctionName x)
-> (forall x. Rep FunctionName x -> FunctionName)
-> Generic FunctionName
forall x. Rep FunctionName x -> FunctionName
forall x. FunctionName -> Rep FunctionName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FunctionName x -> FunctionName
$cfrom :: forall x. FunctionName -> Rep FunctionName x
Generic, Typeable FunctionName
DataType
Constr
Typeable FunctionName
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> FunctionName -> c FunctionName)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c FunctionName)
-> (FunctionName -> Constr)
-> (FunctionName -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c FunctionName))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c FunctionName))
-> ((forall b. Data b => b -> b) -> FunctionName -> FunctionName)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionName -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> FunctionName -> r)
-> (forall u. (forall d. Data d => d -> u) -> FunctionName -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> FunctionName -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName)
-> Data FunctionName
FunctionName -> DataType
FunctionName -> Constr
(forall b. Data b => b -> b) -> FunctionName -> FunctionName
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FunctionName -> c FunctionName
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FunctionName
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> FunctionName -> u
forall u. (forall d. Data d => d -> u) -> FunctionName -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FunctionName -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FunctionName -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FunctionName -> m FunctionName
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FunctionName -> m FunctionName
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FunctionName
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FunctionName -> c FunctionName
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FunctionName)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FunctionName)
$cFunctionName :: Constr
$tFunctionName :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FunctionName -> m FunctionName
gmapMp :: (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> FunctionName -> m FunctionName
gmapM :: (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> FunctionName -> m FunctionName
gmapQi :: Int -> (forall d. Data d => d -> u) -> FunctionName -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FunctionName -> u
gmapQ :: (forall d. Data d => d -> u) -> FunctionName -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> FunctionName -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FunctionName -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> FunctionName -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FunctionName -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> FunctionName -> r
gmapT :: (forall b. Data b => b -> b) -> FunctionName -> FunctionName
$cgmapT :: (forall b. Data b => b -> b) -> FunctionName -> FunctionName
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FunctionName)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c FunctionName)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c FunctionName)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c FunctionName)
dataTypeOf :: FunctionName -> DataType
$cdataTypeOf :: FunctionName -> DataType
toConstr :: FunctionName -> Constr
$ctoConstr :: FunctionName -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FunctionName
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c FunctionName
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FunctionName -> c FunctionName
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> FunctionName -> c FunctionName
$cp1Data :: Typeable FunctionName
Data, FunctionName -> Q Exp
FunctionName -> Q (TExp FunctionName)
(FunctionName -> Q Exp)
-> (FunctionName -> Q (TExp FunctionName)) -> Lift FunctionName
forall t. (t -> Q Exp) -> (t -> Q (TExp t)) -> Lift t
liftTyped :: FunctionName -> Q (TExp FunctionName)
$cliftTyped :: FunctionName -> Q (TExp FunctionName)
lift :: FunctionName -> Q Exp
$clift :: FunctionName -> Q Exp
Lift, Eq FunctionName
Eq FunctionName
-> (FunctionName -> FunctionName -> Ordering)
-> (FunctionName -> FunctionName -> Bool)
-> (FunctionName -> FunctionName -> Bool)
-> (FunctionName -> FunctionName -> Bool)
-> (FunctionName -> FunctionName -> Bool)
-> (FunctionName -> FunctionName -> FunctionName)
-> (FunctionName -> FunctionName -> FunctionName)
-> Ord FunctionName
FunctionName -> FunctionName -> Bool
FunctionName -> FunctionName -> Ordering
FunctionName -> FunctionName -> FunctionName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: FunctionName -> FunctionName -> FunctionName
$cmin :: FunctionName -> FunctionName -> FunctionName
max :: FunctionName -> FunctionName -> FunctionName
$cmax :: FunctionName -> FunctionName -> FunctionName
>= :: FunctionName -> FunctionName -> Bool
$c>= :: FunctionName -> FunctionName -> Bool
> :: FunctionName -> FunctionName -> Bool
$c> :: FunctionName -> FunctionName -> Bool
<= :: FunctionName -> FunctionName -> Bool
$c<= :: FunctionName -> FunctionName -> Bool
< :: FunctionName -> FunctionName -> Bool
$c< :: FunctionName -> FunctionName -> Bool
compare :: FunctionName -> FunctionName -> Ordering
$ccompare :: FunctionName -> FunctionName -> Ordering
$cp1Ord :: Eq FunctionName
Ord)

instance FromJSON FunctionName where
  parseJSON :: Value -> Parser FunctionName
parseJSON =
    String
-> (Object -> Parser FunctionName) -> Value -> Parser FunctionName
forall a. String -> (Object -> Parser a) -> Value -> Parser a
J.withObject
      String
"FunctionName"
      (\Object
o -> Text -> Maybe Text -> FunctionName
FunctionName (Text -> Maybe Text -> FunctionName)
-> Parser Text -> Parser (Maybe Text -> FunctionName)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
J..: Key
"name" Parser (Maybe Text -> FunctionName)
-> Parser (Maybe Text) -> Parser FunctionName
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
J..:? Key
"dataset")

instance ToJSON FunctionName where
  toJSON :: FunctionName -> Value
toJSON FunctionName {Maybe Text
Text
functionNameSchema :: Maybe Text
functionName :: Text
$sel:functionNameSchema:FunctionName :: FunctionName -> Maybe Text
$sel:functionName:FunctionName :: FunctionName -> Text
..} = [Pair] -> Value
J.object [Key
"name" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
J..= Text
functionName, Key
"dataset" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
J..= Maybe Text
functionNameSchema]

instance ToTxt FunctionName where
  toTxt :: FunctionName -> Text
toTxt FunctionName {Maybe Text
Text
functionNameSchema :: Maybe Text
functionName :: Text
$sel:functionNameSchema:FunctionName :: FunctionName -> Maybe Text
$sel:functionName:FunctionName :: FunctionName -> Text
..} =
    case Maybe Text
functionNameSchema of
      Maybe Text
Nothing -> Text
functionName
      Just Text
schemaName -> Text
schemaName Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
"." Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
functionName

instance ToErrorValue FunctionName where
  toErrorValue :: FunctionName -> ErrorMessage
toErrorValue = Text -> ErrorMessage
ErrorValue.squote (Text -> ErrorMessage)
-> (FunctionName -> Text) -> FunctionName -> ErrorMessage
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FunctionName -> Text
forall a. ToTxt a => a -> Text
toTxt

instance Hashable FunctionName

instance Cacheable FunctionName

instance ToJSONKey FunctionName

instance NFData FunctionName

-- | The metadata required to define a computed field for a BigQuery table
data ComputedFieldDefinition = ComputedFieldDefinition
  { -- | Name of the user defined routine
    ComputedFieldDefinition -> FunctionName
_bqcfdFunction :: FunctionName,
    -- | Name of the table which the function returns. If not provided
    -- the return table schema is inferred from the routine API metadata.
    ComputedFieldDefinition -> Maybe TableName
_bqcfdReturnTable :: Maybe TableName,
    -- | A mapping context to determine argument value from table column
    ComputedFieldDefinition -> HashMap FunctionArgName ColumnName
_bqcfdArgumentMapping :: HashMap FunctionArgName ColumnName
  }
  deriving (ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
(ComputedFieldDefinition -> ComputedFieldDefinition -> Bool)
-> (ComputedFieldDefinition -> ComputedFieldDefinition -> Bool)
-> Eq ComputedFieldDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
$c/= :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
== :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
$c== :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
Eq, Int -> ComputedFieldDefinition -> ShowS
[ComputedFieldDefinition] -> ShowS
ComputedFieldDefinition -> String
(Int -> ComputedFieldDefinition -> ShowS)
-> (ComputedFieldDefinition -> String)
-> ([ComputedFieldDefinition] -> ShowS)
-> Show ComputedFieldDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComputedFieldDefinition] -> ShowS
$cshowList :: [ComputedFieldDefinition] -> ShowS
show :: ComputedFieldDefinition -> String
$cshow :: ComputedFieldDefinition -> String
showsPrec :: Int -> ComputedFieldDefinition -> ShowS
$cshowsPrec :: Int -> ComputedFieldDefinition -> ShowS
Show, (forall x.
 ComputedFieldDefinition -> Rep ComputedFieldDefinition x)
-> (forall x.
    Rep ComputedFieldDefinition x -> ComputedFieldDefinition)
-> Generic ComputedFieldDefinition
forall x. Rep ComputedFieldDefinition x -> ComputedFieldDefinition
forall x. ComputedFieldDefinition -> Rep ComputedFieldDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComputedFieldDefinition x -> ComputedFieldDefinition
$cfrom :: forall x. ComputedFieldDefinition -> Rep ComputedFieldDefinition x
Generic, Typeable ComputedFieldDefinition
DataType
Constr
Typeable ComputedFieldDefinition
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> ComputedFieldDefinition
    -> c ComputedFieldDefinition)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ComputedFieldDefinition)
-> (ComputedFieldDefinition -> Constr)
-> (ComputedFieldDefinition -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ComputedFieldDefinition))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ComputedFieldDefinition))
-> ((forall b. Data b => b -> b)
    -> ComputedFieldDefinition -> ComputedFieldDefinition)
-> (forall r r'.
    (r -> r' -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> ComputedFieldDefinition
    -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> ComputedFieldDefinition
    -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> ComputedFieldDefinition -> [u])
-> (forall u.
    Int
    -> (forall d. Data d => d -> u) -> ComputedFieldDefinition -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> ComputedFieldDefinition -> m ComputedFieldDefinition)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ComputedFieldDefinition -> m ComputedFieldDefinition)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ComputedFieldDefinition -> m ComputedFieldDefinition)
-> Data ComputedFieldDefinition
ComputedFieldDefinition -> DataType
ComputedFieldDefinition -> Constr
(forall b. Data b => b -> b)
-> ComputedFieldDefinition -> ComputedFieldDefinition
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ComputedFieldDefinition
-> c ComputedFieldDefinition
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ComputedFieldDefinition
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ComputedFieldDefinition -> u
forall u.
(forall d. Data d => d -> u) -> ComputedFieldDefinition -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ComputedFieldDefinition
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ComputedFieldDefinition
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ComputedFieldDefinition -> m ComputedFieldDefinition
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ComputedFieldDefinition -> m ComputedFieldDefinition
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ComputedFieldDefinition
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ComputedFieldDefinition
-> c ComputedFieldDefinition
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ComputedFieldDefinition)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ComputedFieldDefinition)
$cComputedFieldDefinition :: Constr
$tComputedFieldDefinition :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> ComputedFieldDefinition -> m ComputedFieldDefinition
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ComputedFieldDefinition -> m ComputedFieldDefinition
gmapMp :: (forall d. Data d => d -> m d)
-> ComputedFieldDefinition -> m ComputedFieldDefinition
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ComputedFieldDefinition -> m ComputedFieldDefinition
gmapM :: (forall d. Data d => d -> m d)
-> ComputedFieldDefinition -> m ComputedFieldDefinition
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ComputedFieldDefinition -> m ComputedFieldDefinition
gmapQi :: Int -> (forall d. Data d => d -> u) -> ComputedFieldDefinition -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ComputedFieldDefinition -> u
gmapQ :: (forall d. Data d => d -> u) -> ComputedFieldDefinition -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> ComputedFieldDefinition -> [u]
gmapQr :: (r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ComputedFieldDefinition
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ComputedFieldDefinition
-> r
gmapQl :: (r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ComputedFieldDefinition
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ComputedFieldDefinition
-> r
gmapT :: (forall b. Data b => b -> b)
-> ComputedFieldDefinition -> ComputedFieldDefinition
$cgmapT :: (forall b. Data b => b -> b)
-> ComputedFieldDefinition -> ComputedFieldDefinition
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ComputedFieldDefinition)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ComputedFieldDefinition)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ComputedFieldDefinition)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ComputedFieldDefinition)
dataTypeOf :: ComputedFieldDefinition -> DataType
$cdataTypeOf :: ComputedFieldDefinition -> DataType
toConstr :: ComputedFieldDefinition -> Constr
$ctoConstr :: ComputedFieldDefinition -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ComputedFieldDefinition
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ComputedFieldDefinition
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ComputedFieldDefinition
-> c ComputedFieldDefinition
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ComputedFieldDefinition
-> c ComputedFieldDefinition
$cp1Data :: Typeable ComputedFieldDefinition
Data, Eq ComputedFieldDefinition
Eq ComputedFieldDefinition
-> (ComputedFieldDefinition -> ComputedFieldDefinition -> Ordering)
-> (ComputedFieldDefinition -> ComputedFieldDefinition -> Bool)
-> (ComputedFieldDefinition -> ComputedFieldDefinition -> Bool)
-> (ComputedFieldDefinition -> ComputedFieldDefinition -> Bool)
-> (ComputedFieldDefinition -> ComputedFieldDefinition -> Bool)
-> (ComputedFieldDefinition
    -> ComputedFieldDefinition -> ComputedFieldDefinition)
-> (ComputedFieldDefinition
    -> ComputedFieldDefinition -> ComputedFieldDefinition)
-> Ord ComputedFieldDefinition
ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
ComputedFieldDefinition -> ComputedFieldDefinition -> Ordering
ComputedFieldDefinition
-> ComputedFieldDefinition -> ComputedFieldDefinition
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ComputedFieldDefinition
-> ComputedFieldDefinition -> ComputedFieldDefinition
$cmin :: ComputedFieldDefinition
-> ComputedFieldDefinition -> ComputedFieldDefinition
max :: ComputedFieldDefinition
-> ComputedFieldDefinition -> ComputedFieldDefinition
$cmax :: ComputedFieldDefinition
-> ComputedFieldDefinition -> ComputedFieldDefinition
>= :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
$c>= :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
> :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
$c> :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
<= :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
$c<= :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
< :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
$c< :: ComputedFieldDefinition -> ComputedFieldDefinition -> Bool
compare :: ComputedFieldDefinition -> ComputedFieldDefinition -> Ordering
$ccompare :: ComputedFieldDefinition -> ComputedFieldDefinition -> Ordering
$cp1Ord :: Eq ComputedFieldDefinition
Ord)

instance Hashable ComputedFieldDefinition

instance Cacheable ComputedFieldDefinition

instance NFData ComputedFieldDefinition

instance ToJSON ComputedFieldDefinition where
  toJSON :: ComputedFieldDefinition -> Value
toJSON = Options -> ComputedFieldDefinition -> Value
forall a.
(Generic a, GToJSON' Value Zero (Rep a)) =>
Options -> a -> Value
J.genericToJSON Options
hasuraJSON {omitNothingFields :: Bool
J.omitNothingFields = Bool
True}

instance FromJSON ComputedFieldDefinition where
  parseJSON :: Value -> Parser ComputedFieldDefinition
parseJSON = Options -> Value -> Parser ComputedFieldDefinition
forall a.
(Generic a, GFromJSON Zero (Rep a)) =>
Options -> Value -> Parser a
J.genericParseJSON Options
hasuraJSON

-- | A argument expression for SQL functions
data ArgumentExp v
  = -- | Value coming from user's input through GraphQL query
    AEInput v
  | -- | For computed fields, value of column from the table
    AETableColumn ColumnName
  deriving stock (ArgumentExp v -> ArgumentExp v -> Bool
(ArgumentExp v -> ArgumentExp v -> Bool)
-> (ArgumentExp v -> ArgumentExp v -> Bool) -> Eq (ArgumentExp v)
forall v. Eq v => ArgumentExp v -> ArgumentExp v -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArgumentExp v -> ArgumentExp v -> Bool
$c/= :: forall v. Eq v => ArgumentExp v -> ArgumentExp v -> Bool
== :: ArgumentExp v -> ArgumentExp v -> Bool
$c== :: forall v. Eq v => ArgumentExp v -> ArgumentExp v -> Bool
Eq, Int -> ArgumentExp v -> ShowS
[ArgumentExp v] -> ShowS
ArgumentExp v -> String
(Int -> ArgumentExp v -> ShowS)
-> (ArgumentExp v -> String)
-> ([ArgumentExp v] -> ShowS)
-> Show (ArgumentExp v)
forall v. Show v => Int -> ArgumentExp v -> ShowS
forall v. Show v => [ArgumentExp v] -> ShowS
forall v. Show v => ArgumentExp v -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArgumentExp v] -> ShowS
$cshowList :: forall v. Show v => [ArgumentExp v] -> ShowS
show :: ArgumentExp v -> String
$cshow :: forall v. Show v => ArgumentExp v -> String
showsPrec :: Int -> ArgumentExp v -> ShowS
$cshowsPrec :: forall v. Show v => Int -> ArgumentExp v -> ShowS
Show, a -> ArgumentExp b -> ArgumentExp a
(a -> b) -> ArgumentExp a -> ArgumentExp b
(forall a b. (a -> b) -> ArgumentExp a -> ArgumentExp b)
-> (forall a b. a -> ArgumentExp b -> ArgumentExp a)
-> Functor ArgumentExp
forall a b. a -> ArgumentExp b -> ArgumentExp a
forall a b. (a -> b) -> ArgumentExp a -> ArgumentExp b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> ArgumentExp b -> ArgumentExp a
$c<$ :: forall a b. a -> ArgumentExp b -> ArgumentExp a
fmap :: (a -> b) -> ArgumentExp a -> ArgumentExp b
$cfmap :: forall a b. (a -> b) -> ArgumentExp a -> ArgumentExp b
Functor, ArgumentExp a -> Bool
(a -> m) -> ArgumentExp a -> m
(a -> b -> b) -> b -> ArgumentExp a -> b
(forall m. Monoid m => ArgumentExp m -> m)
-> (forall m a. Monoid m => (a -> m) -> ArgumentExp a -> m)
-> (forall m a. Monoid m => (a -> m) -> ArgumentExp a -> m)
-> (forall a b. (a -> b -> b) -> b -> ArgumentExp a -> b)
-> (forall a b. (a -> b -> b) -> b -> ArgumentExp a -> b)
-> (forall b a. (b -> a -> b) -> b -> ArgumentExp a -> b)
-> (forall b a. (b -> a -> b) -> b -> ArgumentExp a -> b)
-> (forall a. (a -> a -> a) -> ArgumentExp a -> a)
-> (forall a. (a -> a -> a) -> ArgumentExp a -> a)
-> (forall a. ArgumentExp a -> [a])
-> (forall a. ArgumentExp a -> Bool)
-> (forall a. ArgumentExp a -> Int)
-> (forall a. Eq a => a -> ArgumentExp a -> Bool)
-> (forall a. Ord a => ArgumentExp a -> a)
-> (forall a. Ord a => ArgumentExp a -> a)
-> (forall a. Num a => ArgumentExp a -> a)
-> (forall a. Num a => ArgumentExp a -> a)
-> Foldable ArgumentExp
forall a. Eq a => a -> ArgumentExp a -> Bool
forall a. Num a => ArgumentExp a -> a
forall a. Ord a => ArgumentExp a -> a
forall m. Monoid m => ArgumentExp m -> m
forall a. ArgumentExp a -> Bool
forall a. ArgumentExp a -> Int
forall a. ArgumentExp a -> [a]
forall a. (a -> a -> a) -> ArgumentExp a -> a
forall m a. Monoid m => (a -> m) -> ArgumentExp a -> m
forall b a. (b -> a -> b) -> b -> ArgumentExp a -> b
forall a b. (a -> b -> b) -> b -> ArgumentExp a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: ArgumentExp a -> a
$cproduct :: forall a. Num a => ArgumentExp a -> a
sum :: ArgumentExp a -> a
$csum :: forall a. Num a => ArgumentExp a -> a
minimum :: ArgumentExp a -> a
$cminimum :: forall a. Ord a => ArgumentExp a -> a
maximum :: ArgumentExp a -> a
$cmaximum :: forall a. Ord a => ArgumentExp a -> a
elem :: a -> ArgumentExp a -> Bool
$celem :: forall a. Eq a => a -> ArgumentExp a -> Bool
length :: ArgumentExp a -> Int
$clength :: forall a. ArgumentExp a -> Int
null :: ArgumentExp a -> Bool
$cnull :: forall a. ArgumentExp a -> Bool
toList :: ArgumentExp a -> [a]
$ctoList :: forall a. ArgumentExp a -> [a]
foldl1 :: (a -> a -> a) -> ArgumentExp a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> ArgumentExp a -> a
foldr1 :: (a -> a -> a) -> ArgumentExp a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> ArgumentExp a -> a
foldl' :: (b -> a -> b) -> b -> ArgumentExp a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> ArgumentExp a -> b
foldl :: (b -> a -> b) -> b -> ArgumentExp a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> ArgumentExp a -> b
foldr' :: (a -> b -> b) -> b -> ArgumentExp a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> ArgumentExp a -> b
foldr :: (a -> b -> b) -> b -> ArgumentExp a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> ArgumentExp a -> b
foldMap' :: (a -> m) -> ArgumentExp a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> ArgumentExp a -> m
foldMap :: (a -> m) -> ArgumentExp a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> ArgumentExp a -> m
fold :: ArgumentExp m -> m
$cfold :: forall m. Monoid m => ArgumentExp m -> m
Foldable, Functor ArgumentExp
Foldable ArgumentExp
Functor ArgumentExp
-> Foldable ArgumentExp
-> (forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> ArgumentExp a -> f (ArgumentExp b))
-> (forall (f :: * -> *) a.
    Applicative f =>
    ArgumentExp (f a) -> f (ArgumentExp a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> ArgumentExp a -> m (ArgumentExp b))
-> (forall (m :: * -> *) a.
    Monad m =>
    ArgumentExp (m a) -> m (ArgumentExp a))
-> Traversable ArgumentExp
(a -> f b) -> ArgumentExp a -> f (ArgumentExp b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
ArgumentExp (m a) -> m (ArgumentExp a)
forall (f :: * -> *) a.
Applicative f =>
ArgumentExp (f a) -> f (ArgumentExp a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> ArgumentExp a -> m (ArgumentExp b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> ArgumentExp a -> f (ArgumentExp b)
sequence :: ArgumentExp (m a) -> m (ArgumentExp a)
$csequence :: forall (m :: * -> *) a.
Monad m =>
ArgumentExp (m a) -> m (ArgumentExp a)
mapM :: (a -> m b) -> ArgumentExp a -> m (ArgumentExp b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> ArgumentExp a -> m (ArgumentExp b)
sequenceA :: ArgumentExp (f a) -> f (ArgumentExp a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
ArgumentExp (f a) -> f (ArgumentExp a)
traverse :: (a -> f b) -> ArgumentExp a -> f (ArgumentExp b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> ArgumentExp a -> f (ArgumentExp b)
$cp2Traversable :: Foldable ArgumentExp
$cp1Traversable :: Functor ArgumentExp
Traversable, (forall x. ArgumentExp v -> Rep (ArgumentExp v) x)
-> (forall x. Rep (ArgumentExp v) x -> ArgumentExp v)
-> Generic (ArgumentExp v)
forall x. Rep (ArgumentExp v) x -> ArgumentExp v
forall x. ArgumentExp v -> Rep (ArgumentExp v) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall v x. Rep (ArgumentExp v) x -> ArgumentExp v
forall v x. ArgumentExp v -> Rep (ArgumentExp v) x
$cto :: forall v x. Rep (ArgumentExp v) x -> ArgumentExp v
$cfrom :: forall v x. ArgumentExp v -> Rep (ArgumentExp v) x
Generic)

instance (Hashable v) => Hashable (ArgumentExp v)

type ComputedFieldImplicitArguments = HashMap FunctionArgName ColumnName

-- | Returning type of the function underlying a computed field
data ComputedFieldReturn
  = -- | Returns existing table, needs to be present in the metadata
    ReturnExistingTable TableName
  | -- | An arbitrary table schema specified by column name and type pairs
    ReturnTableSchema [(ColumnName, G.Name, ScalarType)]
  deriving (Int -> ComputedFieldReturn -> ShowS
[ComputedFieldReturn] -> ShowS
ComputedFieldReturn -> String
(Int -> ComputedFieldReturn -> ShowS)
-> (ComputedFieldReturn -> String)
-> ([ComputedFieldReturn] -> ShowS)
-> Show ComputedFieldReturn
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComputedFieldReturn] -> ShowS
$cshowList :: [ComputedFieldReturn] -> ShowS
show :: ComputedFieldReturn -> String
$cshow :: ComputedFieldReturn -> String
showsPrec :: Int -> ComputedFieldReturn -> ShowS
$cshowsPrec :: Int -> ComputedFieldReturn -> ShowS
Show, ComputedFieldReturn -> ComputedFieldReturn -> Bool
(ComputedFieldReturn -> ComputedFieldReturn -> Bool)
-> (ComputedFieldReturn -> ComputedFieldReturn -> Bool)
-> Eq ComputedFieldReturn
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComputedFieldReturn -> ComputedFieldReturn -> Bool
$c/= :: ComputedFieldReturn -> ComputedFieldReturn -> Bool
== :: ComputedFieldReturn -> ComputedFieldReturn -> Bool
$c== :: ComputedFieldReturn -> ComputedFieldReturn -> Bool
Eq, (forall x. ComputedFieldReturn -> Rep ComputedFieldReturn x)
-> (forall x. Rep ComputedFieldReturn x -> ComputedFieldReturn)
-> Generic ComputedFieldReturn
forall x. Rep ComputedFieldReturn x -> ComputedFieldReturn
forall x. ComputedFieldReturn -> Rep ComputedFieldReturn x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComputedFieldReturn x -> ComputedFieldReturn
$cfrom :: forall x. ComputedFieldReturn -> Rep ComputedFieldReturn x
Generic)

instance Cacheable ComputedFieldReturn

instance NFData ComputedFieldReturn

instance Hashable ComputedFieldReturn

instance ToJSON ComputedFieldReturn where
  toJSON :: ComputedFieldReturn -> Value
toJSON =
    Options -> ComputedFieldReturn -> Value
forall a.
(Generic a, GToJSON' Value Zero (Rep a)) =>
Options -> a -> Value
J.genericToJSON (Options -> ComputedFieldReturn -> Value)
-> Options -> ComputedFieldReturn -> Value
forall a b. (a -> b) -> a -> b
$
      Options
J.defaultOptions
        { constructorTagModifier :: ShowS
J.constructorTagModifier = ShowS
J.snakeCase,
          sumEncoding :: SumEncoding
J.sumEncoding = String -> String -> SumEncoding
J.TaggedObject String
"type" String
"info"
        }

-- | Function input argument specification
data FunctionArgument = FunctionArgument
  { -- | Argument name of a table valued function is required
    -- Ref: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_table_function_statement
    FunctionArgument -> FunctionArgName
_faName :: FunctionArgName,
    -- | The data type of the argument
    FunctionArgument -> ScalarType
_faType :: ScalarType
  }
  deriving (Int -> FunctionArgument -> ShowS
[FunctionArgument] -> ShowS
FunctionArgument -> String
(Int -> FunctionArgument -> ShowS)
-> (FunctionArgument -> String)
-> ([FunctionArgument] -> ShowS)
-> Show FunctionArgument
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FunctionArgument] -> ShowS
$cshowList :: [FunctionArgument] -> ShowS
show :: FunctionArgument -> String
$cshow :: FunctionArgument -> String
showsPrec :: Int -> FunctionArgument -> ShowS
$cshowsPrec :: Int -> FunctionArgument -> ShowS
Show, FunctionArgument -> FunctionArgument -> Bool
(FunctionArgument -> FunctionArgument -> Bool)
-> (FunctionArgument -> FunctionArgument -> Bool)
-> Eq FunctionArgument
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionArgument -> FunctionArgument -> Bool
$c/= :: FunctionArgument -> FunctionArgument -> Bool
== :: FunctionArgument -> FunctionArgument -> Bool
$c== :: FunctionArgument -> FunctionArgument -> Bool
Eq, (forall x. FunctionArgument -> Rep FunctionArgument x)
-> (forall x. Rep FunctionArgument x -> FunctionArgument)
-> Generic FunctionArgument
forall x. Rep FunctionArgument x -> FunctionArgument
forall x. FunctionArgument -> Rep FunctionArgument x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FunctionArgument x -> FunctionArgument
$cfrom :: forall x. FunctionArgument -> Rep FunctionArgument x
Generic)

instance Cacheable FunctionArgument

instance NFData FunctionArgument

instance Hashable FunctionArgument

instance ToJSON FunctionArgument where
  toJSON :: FunctionArgument -> Value
toJSON = Options -> FunctionArgument -> Value
forall a.
(Generic a, GToJSON' Value Zero (Rep a)) =>
Options -> a -> Value
J.genericToJSON Options
hasuraJSON

--------------------------------------------------------------------------------
-- Backend-related stuff
--

parseScalarValue :: ScalarType -> J.Value -> Either QErr Value
parseScalarValue :: ScalarType -> Value -> Either QErr Value
parseScalarValue ScalarType
scalarType Value
jValue = case ScalarType
scalarType of
  ScalarType
StringScalarType -> Text -> Value
StringValue (Text -> Value) -> Either QErr Text -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Text
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
BytesScalarType -> Text -> Value
StringValue (Text -> Value) -> Either QErr Text -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Text
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
IntegerScalarType -> Int64 -> Value
IntegerValue (Int64 -> Value) -> Either QErr Int64 -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Int64
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
FloatScalarType -> Float64 -> Value
FloatValue (Float64 -> Value) -> Either QErr Float64 -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Float64
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
BoolScalarType -> Bool -> Value
BoolValue (Bool -> Value) -> Either QErr Bool -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Bool
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
DecimalScalarType -> Decimal -> Value
DecimalValue (Decimal -> Value) -> Either QErr Decimal -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Decimal
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
BigDecimalScalarType -> BigDecimal -> Value
BigDecimalValue (BigDecimal -> Value)
-> Either QErr BigDecimal -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr BigDecimal
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
TimestampScalarType -> Timestamp -> Value
TimestampValue (Timestamp -> Value) -> Either QErr Timestamp -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Timestamp
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
DateScalarType -> Date -> Value
DateValue (Date -> Value) -> Either QErr Date -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Date
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
TimeScalarType -> Time -> Value
TimeValue (Time -> Value) -> Either QErr Time -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Time
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
DatetimeScalarType -> Datetime -> Value
DatetimeValue (Datetime -> Value) -> Either QErr Datetime -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Datetime
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
GeographyScalarType -> Geography -> Value
GeographyValue (Geography -> Value) -> Either QErr Geography -> Either QErr Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Value -> Either QErr Geography
forall a. FromJSON a => Value -> Either QErr a
parseJValue Value
jValue
  ScalarType
_ -> QErr -> Either QErr Value
forall a b. a -> Either a b
Left (Text -> QErr
internalError (String -> Text
T.pack (String
"Unsupported scalar type: " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> ScalarType -> String
forall a. Show a => a -> String
show ScalarType
scalarType String -> ShowS
forall a. Semigroup a => a -> a -> a
<> String
": " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> Value -> String
forall a. Show a => a -> String
show Value
jValue)))
  -- TODO: These types:
  -- RecordScalarType -> RecordValue <$> parseJValue jValue
  -- StructScalarType -> StructValue <$> parseJValue jValue
  where
    parseJValue :: (J.FromJSON a) => J.Value -> Either QErr a
    parseJValue :: Value -> Either QErr a
parseJValue = (Value -> Parser a) -> Value -> Either QErr a
forall (m :: * -> *) v a. QErrM m => (v -> Parser a) -> v -> m a
runAesonParser Value -> Parser a
forall a. FromJSON a => Value -> Parser a
J.parseJSON

-- see comparable BigQuery data types in
-- https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types
-- in practice only Geography data type is not comparable
-- as ARRAY isn't a scalar type in the backend
isComparableType, isNumType :: ScalarType -> Bool
isComparableType :: ScalarType -> Bool
isComparableType = \case
  ScalarType
StringScalarType -> Bool
True
  ScalarType
BytesScalarType -> Bool
True
  ScalarType
IntegerScalarType -> Bool
True
  ScalarType
FloatScalarType -> Bool
True
  ScalarType
BoolScalarType -> Bool
True
  ScalarType
TimestampScalarType -> Bool
True
  ScalarType
DateScalarType -> Bool
True
  ScalarType
TimeScalarType -> Bool
True
  ScalarType
DatetimeScalarType -> Bool
True
  ScalarType
GeographyScalarType -> Bool
False
  ScalarType
DecimalScalarType -> Bool
True
  ScalarType
BigDecimalScalarType -> Bool
True
  ScalarType
StructScalarType -> Bool
True
isNumType :: ScalarType -> Bool
isNumType =
  \case
    ScalarType
StringScalarType -> Bool
False
    ScalarType
BytesScalarType -> Bool
False
    ScalarType
IntegerScalarType -> Bool
True
    ScalarType
FloatScalarType -> Bool
True
    ScalarType
BoolScalarType -> Bool
False
    ScalarType
TimestampScalarType -> Bool
False
    ScalarType
DateScalarType -> Bool
False
    ScalarType
TimeScalarType -> Bool
False
    ScalarType
DatetimeScalarType -> Bool
False
    ScalarType
GeographyScalarType -> Bool
False
    ScalarType
DecimalScalarType -> Bool
True
    ScalarType
BigDecimalScalarType -> Bool
True
    ScalarType
StructScalarType -> Bool
False

getGQLTableName :: TableName -> Either QErr G.Name
getGQLTableName :: TableName -> Either QErr Name
getGQLTableName (TableName Text
table Text
schema) = do
  let textName :: Text
textName = Text
schema Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
"_" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
table
  Maybe Name -> Either QErr Name -> Either QErr Name
forall (m :: * -> *) a. Applicative m => Maybe a -> m a -> m a
onNothing (Text -> Maybe Name
G.mkName Text
textName) (Either QErr Name -> Either QErr Name)
-> Either QErr Name -> Either QErr Name
forall a b. (a -> b) -> a -> b
$
    Code -> Text -> Either QErr Name
forall (m :: * -> *) a. QErrM m => Code -> Text -> m a
throw400 Code
ValidationFailed (Text -> Either QErr Name) -> Text -> Either QErr Name
forall a b. (a -> b) -> a -> b
$
      Text
"cannot include " Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
textName Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
" in the GraphQL schema because it is not a valid GraphQL identifier"

--------------------------------------------------------------------------------
-- Liberal numeric parsers/printers (via JSON)
--
-- These are parsers/printers that go via text predominantly, except
-- where in simple cases they go via raw number representations in
-- JSON.

-- These printers may do something more clever later. See PG backend's
-- equivalent functions.
liberalIntegralPrinter :: Coercible Text a => a -> J.Value
liberalIntegralPrinter :: a -> Value
liberalIntegralPrinter a
a = Text -> Value
forall a. ToJSON a => a -> Value
J.toJSON (a -> Text
coerce a
a :: Text)

liberalDecimalPrinter :: Coercible a Text => a -> J.Value
liberalDecimalPrinter :: a -> Value
liberalDecimalPrinter a
a = Text -> Value
forall a. ToJSON a => a -> Value
J.toJSON (a -> Text
coerce a
a :: Text)

-- | Parse from text by simply validating it contains digits;
-- otherwise, require a JSON integer.
liberalInt64Parser :: (Text -> a) -> J.Value -> J.Parser a
liberalInt64Parser :: (Text -> a) -> Value -> Parser a
liberalInt64Parser Text -> a
fromText Value
json = Parser a
viaText Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> Parser a
viaNumber
  where
    viaText :: Parser a
viaText = do
      Text
text <- Value -> Parser Text
forall a. FromJSON a => Value -> Parser a
J.parseJSON Value
json
      -- Parsing scientific is safe; it doesn't normalise until we ask
      -- it to.
      case ReadP Scientific -> ReadS Scientific
forall a. ReadP a -> ReadS a
readP_to_S ReadP Scientific
scientificP (Text -> String
T.unpack Text
text) of
        [(Scientific
sci, String
"")] | Scientific -> Bool
isInteger Scientific
sci -> a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> a
fromText Text
text)
        [(Scientific, String)]
_ -> String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail (String
"String containing integral number is invalid: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Text -> String
forall a. Show a => a -> String
show Text
text)
    viaNumber :: Parser a
viaNumber = do
      Int
int <- Value -> Parser Int
forall a. FromJSON a => Value -> Parser a
J.parseJSON Value
json
      a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> a
fromText (Int -> Text
forall a. Show a => a -> Text
tshow (Int
int :: Int)))

-- | Parse either a JSON native double number, or a text string
-- containing something vaguely in scientific notation. In either
-- case, producing a wrapped Text as the final result.
liberalDecimalParser :: (Text -> a) -> J.Value -> J.Parser a
liberalDecimalParser :: (Text -> a) -> Value -> Parser a
liberalDecimalParser Text -> a
fromText Value
json = Parser a
viaText Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> Parser a
viaNumber
  where
    viaText :: Parser a
viaText = do
      Text
text <- Value -> Parser Text
forall a. FromJSON a => Value -> Parser a
J.parseJSON Value
json
      -- Parsing scientific is safe; it doesn't normalise until we ask
      -- it to.
      let -- See https://cloud.google.com/bigquery/docs/reference/standard-sql/conversion_functions#cast_as_floating_point
          isNonFinite :: Bool
isNonFinite =
            let noSign :: Text
noSign = case Text -> Maybe (Char, Text)
T.uncons Text
text of
                  Just (Char
'+', Text
rest) -> Text
rest
                  Just (Char
'-', Text
rest) -> Text
rest
                  Maybe (Char, Text)
_ -> Text
text
             in Text -> Text
T.toLower Text
noSign Text -> [Text] -> Bool
forall (t :: * -> *) a. (Foldable t, Eq a) => a -> t a -> Bool
`elem` [Text
"nan", Text
"infinity", Text
"inf"]
      case ReadP Scientific -> ReadS Scientific
forall a. ReadP a -> ReadS a
readP_to_S (ReadP Scientific
scientificP ReadP Scientific -> ReadP () -> ReadP Scientific
forall (f :: * -> *) a b. Applicative f => f a -> f b -> f a
<* ReadP ()
eof) (Text -> String
T.unpack Text
text) of
        [(Scientific, String)
_] -> a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> a
fromText Text
text)
        [] | Bool
isNonFinite -> a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> a
fromText Text
text)
        [(Scientific, String)]
_ -> String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail (String
"String containing decimal places is invalid: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Text -> String
forall a. Show a => a -> String
show Text
text)
    viaNumber :: Parser a
viaNumber = do
      Double
d <- Value -> Parser Double
forall a. FromJSON a => Value -> Parser a
J.parseJSON Value
json
      -- Converting a scientific to an unbounded number is unsafe, but
      -- to a double is bounded and therefore OK. JSON only supports
      -- doubles, so that's fine.
      a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Text -> a
fromText (Double -> Text
forall a. Show a => a -> Text
tshow (Double
d :: Double)))

projectionAlias :: Projection -> Maybe Text
projectionAlias :: Projection -> Maybe Text
projectionAlias =
  \case
    ExpressionProjection Aliased Expression
a -> Text -> Maybe Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Aliased Expression -> Text
forall a. Aliased a -> Text
aliasedAlias Aliased Expression
a)
    FieldNameProjection Aliased FieldName
a -> Text -> Maybe Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Aliased FieldName -> Text
forall a. Aliased a -> Text
aliasedAlias Aliased FieldName
a)
    AggregateProjections Aliased (NonEmpty (Aliased Aggregate))
a -> Text -> Maybe Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Aliased (NonEmpty (Aliased Aggregate)) -> Text
forall a. Aliased a -> Text
aliasedAlias Aliased (NonEmpty (Aliased Aggregate))
a)
    AggregateProjection Aliased Aggregate
a -> Text -> Maybe Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Aliased Aggregate -> Text
forall a. Aliased a -> Text
aliasedAlias Aliased Aggregate
a)
    Projection
StarProjection -> Maybe Text
forall a. Maybe a
Nothing
    ArrayAggProjection Aliased ArrayAgg
a -> Text -> Maybe Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Aliased ArrayAgg -> Text
forall a. Aliased a -> Text
aliasedAlias Aliased ArrayAgg
a)
    EntityProjection Aliased [(FieldName, FieldOrigin)]
a -> Text -> Maybe Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Aliased [(FieldName, FieldOrigin)] -> Text
forall a. Aliased a -> Text
aliasedAlias Aliased [(FieldName, FieldOrigin)]
a)
    ArrayEntityProjection EntityAlias
_ Aliased [FieldName]
a -> Text -> Maybe Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Aliased [FieldName] -> Text
forall a. Aliased a -> Text
aliasedAlias Aliased [FieldName]
a)
    WindowProjection Aliased WindowFunction
a -> Text -> Maybe Text
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Aliased WindowFunction -> Text
forall a. Aliased a -> Text
aliasedAlias Aliased WindowFunction
a)