{-# LANGUAGE TemplateHaskell #-}
module Hasura.RQL.IR.Insert
( AnnotatedInsertData (..),
AnnotatedInsert (..),
aiFieldName,
aiIsSingle,
aiData,
aiOutput,
aiNamingConvention,
AnnotatedInsertField (..),
AnnotatedInsertRow,
ArrayRelationInsert,
OnConflictClause (..),
OnConflictClauseData (..),
ConflictTarget (..),
InsertQueryP1 (..),
MultiObjectInsert,
ObjectRelationInsert,
RelationInsert (..),
Single (..),
SingleObjectInsert,
getInsertArrayRelationships,
getInsertColumns,
getInsertObjectRelationships,
_AIArrayRelationship,
_AIColumn,
_AIObjectRelationship,
)
where
import Control.Lens ((^?))
import Control.Lens.TH (makeLenses, makePrisms)
import Data.Kind (Type)
import Hasura.GraphQL.Schema.NamingCase (NamingCase)
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp
import Hasura.RQL.IR.Conflict
import Hasura.RQL.IR.Returning
import Hasura.RQL.Types.Backend
import Hasura.RQL.Types.Column
import Hasura.RQL.Types.Relationships.Local
import Hasura.SQL.Backend
data AnnotatedInsert (b :: BackendType) (r :: Type) v = AnnotatedInsert
{ AnnotatedInsert b r v -> Text
_aiFieldName :: Text,
AnnotatedInsert b r v -> Bool
_aiIsSingle :: Bool,
AnnotatedInsert b r v -> MultiObjectInsert b v
_aiData :: MultiObjectInsert b v,
AnnotatedInsert b r v -> MutationOutputG b r v
_aiOutput :: MutationOutputG b r v,
AnnotatedInsert b r v -> Maybe NamingCase
_aiNamingConvention :: Maybe NamingCase
}
deriving (a -> AnnotatedInsert b r b -> AnnotatedInsert b r a
(a -> b) -> AnnotatedInsert b r a -> AnnotatedInsert b r b
(forall a b.
(a -> b) -> AnnotatedInsert b r a -> AnnotatedInsert b r b)
-> (forall a b.
a -> AnnotatedInsert b r b -> AnnotatedInsert b r a)
-> Functor (AnnotatedInsert b r)
forall a b. a -> AnnotatedInsert b r b -> AnnotatedInsert b r a
forall a b.
(a -> b) -> AnnotatedInsert b r a -> AnnotatedInsert b r b
forall (b :: BackendType) r a b.
Backend b =>
a -> AnnotatedInsert b r b -> AnnotatedInsert b r a
forall (b :: BackendType) r a b.
Backend b =>
(a -> b) -> AnnotatedInsert b r a -> AnnotatedInsert b r b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> AnnotatedInsert b r b -> AnnotatedInsert b r a
$c<$ :: forall (b :: BackendType) r a b.
Backend b =>
a -> AnnotatedInsert b r b -> AnnotatedInsert b r a
fmap :: (a -> b) -> AnnotatedInsert b r a -> AnnotatedInsert b r b
$cfmap :: forall (b :: BackendType) r a b.
Backend b =>
(a -> b) -> AnnotatedInsert b r a -> AnnotatedInsert b r b
Functor, AnnotatedInsert b r a -> Bool
(a -> m) -> AnnotatedInsert b r a -> m
(a -> b -> b) -> b -> AnnotatedInsert b r a -> b
(forall m. Monoid m => AnnotatedInsert b r m -> m)
-> (forall m a. Monoid m => (a -> m) -> AnnotatedInsert b r a -> m)
-> (forall m a. Monoid m => (a -> m) -> AnnotatedInsert b r a -> m)
-> (forall a b. (a -> b -> b) -> b -> AnnotatedInsert b r a -> b)
-> (forall a b. (a -> b -> b) -> b -> AnnotatedInsert b r a -> b)
-> (forall b a. (b -> a -> b) -> b -> AnnotatedInsert b r a -> b)
-> (forall b a. (b -> a -> b) -> b -> AnnotatedInsert b r a -> b)
-> (forall a. (a -> a -> a) -> AnnotatedInsert b r a -> a)
-> (forall a. (a -> a -> a) -> AnnotatedInsert b r a -> a)
-> (forall a. AnnotatedInsert b r a -> [a])
-> (forall a. AnnotatedInsert b r a -> Bool)
-> (forall a. AnnotatedInsert b r a -> Int)
-> (forall a. Eq a => a -> AnnotatedInsert b r a -> Bool)
-> (forall a. Ord a => AnnotatedInsert b r a -> a)
-> (forall a. Ord a => AnnotatedInsert b r a -> a)
-> (forall a. Num a => AnnotatedInsert b r a -> a)
-> (forall a. Num a => AnnotatedInsert b r a -> a)
-> Foldable (AnnotatedInsert b r)
forall a. Eq a => a -> AnnotatedInsert b r a -> Bool
forall a. Num a => AnnotatedInsert b r a -> a
forall a. Ord a => AnnotatedInsert b r a -> a
forall m. Monoid m => AnnotatedInsert b r m -> m
forall a. AnnotatedInsert b r a -> Bool
forall a. AnnotatedInsert b r a -> Int
forall a. AnnotatedInsert b r a -> [a]
forall a. (a -> a -> a) -> AnnotatedInsert b r a -> a
forall m a. Monoid m => (a -> m) -> AnnotatedInsert b r a -> m
forall b a. (b -> a -> b) -> b -> AnnotatedInsert b r a -> b
forall a b. (a -> b -> b) -> b -> AnnotatedInsert b r a -> b
forall (b :: BackendType) r a.
(Backend b, Eq a) =>
a -> AnnotatedInsert b r a -> Bool
forall (b :: BackendType) r a.
(Backend b, Num a) =>
AnnotatedInsert b r a -> a
forall (b :: BackendType) r a.
(Backend b, Ord a) =>
AnnotatedInsert b r a -> a
forall (b :: BackendType) r m.
(Backend b, Monoid m) =>
AnnotatedInsert b r m -> m
forall (b :: BackendType) r a.
Backend b =>
AnnotatedInsert b r a -> Bool
forall (b :: BackendType) r a.
Backend b =>
AnnotatedInsert b r a -> Int
forall (b :: BackendType) r a.
Backend b =>
AnnotatedInsert b r a -> [a]
forall (b :: BackendType) r a.
Backend b =>
(a -> a -> a) -> AnnotatedInsert b r a -> a
forall (b :: BackendType) r m a.
(Backend b, Monoid m) =>
(a -> m) -> AnnotatedInsert b r a -> m
forall (b :: BackendType) r b a.
Backend b =>
(b -> a -> b) -> b -> AnnotatedInsert b r a -> b
forall (b :: BackendType) r a b.
Backend b =>
(a -> b -> b) -> b -> AnnotatedInsert b r 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 :: AnnotatedInsert b r a -> a
$cproduct :: forall (b :: BackendType) r a.
(Backend b, Num a) =>
AnnotatedInsert b r a -> a
sum :: AnnotatedInsert b r a -> a
$csum :: forall (b :: BackendType) r a.
(Backend b, Num a) =>
AnnotatedInsert b r a -> a
minimum :: AnnotatedInsert b r a -> a
$cminimum :: forall (b :: BackendType) r a.
(Backend b, Ord a) =>
AnnotatedInsert b r a -> a
maximum :: AnnotatedInsert b r a -> a
$cmaximum :: forall (b :: BackendType) r a.
(Backend b, Ord a) =>
AnnotatedInsert b r a -> a
elem :: a -> AnnotatedInsert b r a -> Bool
$celem :: forall (b :: BackendType) r a.
(Backend b, Eq a) =>
a -> AnnotatedInsert b r a -> Bool
length :: AnnotatedInsert b r a -> Int
$clength :: forall (b :: BackendType) r a.
Backend b =>
AnnotatedInsert b r a -> Int
null :: AnnotatedInsert b r a -> Bool
$cnull :: forall (b :: BackendType) r a.
Backend b =>
AnnotatedInsert b r a -> Bool
toList :: AnnotatedInsert b r a -> [a]
$ctoList :: forall (b :: BackendType) r a.
Backend b =>
AnnotatedInsert b r a -> [a]
foldl1 :: (a -> a -> a) -> AnnotatedInsert b r a -> a
$cfoldl1 :: forall (b :: BackendType) r a.
Backend b =>
(a -> a -> a) -> AnnotatedInsert b r a -> a
foldr1 :: (a -> a -> a) -> AnnotatedInsert b r a -> a
$cfoldr1 :: forall (b :: BackendType) r a.
Backend b =>
(a -> a -> a) -> AnnotatedInsert b r a -> a
foldl' :: (b -> a -> b) -> b -> AnnotatedInsert b r a -> b
$cfoldl' :: forall (b :: BackendType) r b a.
Backend b =>
(b -> a -> b) -> b -> AnnotatedInsert b r a -> b
foldl :: (b -> a -> b) -> b -> AnnotatedInsert b r a -> b
$cfoldl :: forall (b :: BackendType) r b a.
Backend b =>
(b -> a -> b) -> b -> AnnotatedInsert b r a -> b
foldr' :: (a -> b -> b) -> b -> AnnotatedInsert b r a -> b
$cfoldr' :: forall (b :: BackendType) r a b.
Backend b =>
(a -> b -> b) -> b -> AnnotatedInsert b r a -> b
foldr :: (a -> b -> b) -> b -> AnnotatedInsert b r a -> b
$cfoldr :: forall (b :: BackendType) r a b.
Backend b =>
(a -> b -> b) -> b -> AnnotatedInsert b r a -> b
foldMap' :: (a -> m) -> AnnotatedInsert b r a -> m
$cfoldMap' :: forall (b :: BackendType) r m a.
(Backend b, Monoid m) =>
(a -> m) -> AnnotatedInsert b r a -> m
foldMap :: (a -> m) -> AnnotatedInsert b r a -> m
$cfoldMap :: forall (b :: BackendType) r m a.
(Backend b, Monoid m) =>
(a -> m) -> AnnotatedInsert b r a -> m
fold :: AnnotatedInsert b r m -> m
$cfold :: forall (b :: BackendType) r m.
(Backend b, Monoid m) =>
AnnotatedInsert b r m -> m
Foldable, Functor (AnnotatedInsert b r)
Foldable (AnnotatedInsert b r)
Functor (AnnotatedInsert b r)
-> Foldable (AnnotatedInsert b r)
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> AnnotatedInsert b r a -> f (AnnotatedInsert b r b))
-> (forall (f :: * -> *) a.
Applicative f =>
AnnotatedInsert b r (f a) -> f (AnnotatedInsert b r a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> AnnotatedInsert b r a -> m (AnnotatedInsert b r b))
-> (forall (m :: * -> *) a.
Monad m =>
AnnotatedInsert b r (m a) -> m (AnnotatedInsert b r a))
-> Traversable (AnnotatedInsert b r)
(a -> f b) -> AnnotatedInsert b r a -> f (AnnotatedInsert b r b)
forall (b :: BackendType) r.
Backend b =>
Functor (AnnotatedInsert b r)
forall (b :: BackendType) r.
Backend b =>
Foldable (AnnotatedInsert b r)
forall (b :: BackendType) r (m :: * -> *) a.
(Backend b, Monad m) =>
AnnotatedInsert b r (m a) -> m (AnnotatedInsert b r a)
forall (b :: BackendType) r (f :: * -> *) a.
(Backend b, Applicative f) =>
AnnotatedInsert b r (f a) -> f (AnnotatedInsert b r a)
forall (b :: BackendType) r (m :: * -> *) a b.
(Backend b, Monad m) =>
(a -> m b) -> AnnotatedInsert b r a -> m (AnnotatedInsert b r b)
forall (b :: BackendType) r (f :: * -> *) a b.
(Backend b, Applicative f) =>
(a -> f b) -> AnnotatedInsert b r a -> f (AnnotatedInsert b r 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 =>
AnnotatedInsert b r (m a) -> m (AnnotatedInsert b r a)
forall (f :: * -> *) a.
Applicative f =>
AnnotatedInsert b r (f a) -> f (AnnotatedInsert b r a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> AnnotatedInsert b r a -> m (AnnotatedInsert b r b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> AnnotatedInsert b r a -> f (AnnotatedInsert b r b)
sequence :: AnnotatedInsert b r (m a) -> m (AnnotatedInsert b r a)
$csequence :: forall (b :: BackendType) r (m :: * -> *) a.
(Backend b, Monad m) =>
AnnotatedInsert b r (m a) -> m (AnnotatedInsert b r a)
mapM :: (a -> m b) -> AnnotatedInsert b r a -> m (AnnotatedInsert b r b)
$cmapM :: forall (b :: BackendType) r (m :: * -> *) a b.
(Backend b, Monad m) =>
(a -> m b) -> AnnotatedInsert b r a -> m (AnnotatedInsert b r b)
sequenceA :: AnnotatedInsert b r (f a) -> f (AnnotatedInsert b r a)
$csequenceA :: forall (b :: BackendType) r (f :: * -> *) a.
(Backend b, Applicative f) =>
AnnotatedInsert b r (f a) -> f (AnnotatedInsert b r a)
traverse :: (a -> f b) -> AnnotatedInsert b r a -> f (AnnotatedInsert b r b)
$ctraverse :: forall (b :: BackendType) r (f :: * -> *) a b.
(Backend b, Applicative f) =>
(a -> f b) -> AnnotatedInsert b r a -> f (AnnotatedInsert b r b)
$cp2Traversable :: forall (b :: BackendType) r.
Backend b =>
Foldable (AnnotatedInsert b r)
$cp1Traversable :: forall (b :: BackendType) r.
Backend b =>
Functor (AnnotatedInsert b r)
Traversable)
data AnnotatedInsertData (b :: BackendType) (f :: Type -> Type) (v :: Type) = AnnotatedInsertData
{ AnnotatedInsertData b f v -> f (AnnotatedInsertRow b v)
_aiInsertObject :: f (AnnotatedInsertRow b v),
AnnotatedInsertData b f v -> TableName b
_aiTableName :: TableName b,
AnnotatedInsertData b f v
-> (AnnBoolExp b v, Maybe (AnnBoolExp b v))
_aiCheckCondition :: (AnnBoolExp b v, Maybe (AnnBoolExp b v)),
AnnotatedInsertData b f v -> [ColumnInfo b]
_aiTableColumns :: [ColumnInfo b],
AnnotatedInsertData b f v -> PreSetColsG b v
_aiPresetValues :: PreSetColsG b v,
AnnotatedInsertData b f v -> BackendInsert b v
_aiBackendInsert :: BackendInsert b v
}
deriving (a -> AnnotatedInsertData b f b -> AnnotatedInsertData b f a
(a -> b) -> AnnotatedInsertData b f a -> AnnotatedInsertData b f b
(forall a b.
(a -> b) -> AnnotatedInsertData b f a -> AnnotatedInsertData b f b)
-> (forall a b.
a -> AnnotatedInsertData b f b -> AnnotatedInsertData b f a)
-> Functor (AnnotatedInsertData b f)
forall a b.
a -> AnnotatedInsertData b f b -> AnnotatedInsertData b f a
forall a b.
(a -> b) -> AnnotatedInsertData b f a -> AnnotatedInsertData b f b
forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Functor f) =>
a -> AnnotatedInsertData b f b -> AnnotatedInsertData b f a
forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Functor f) =>
(a -> b) -> AnnotatedInsertData b f a -> AnnotatedInsertData b f b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> AnnotatedInsertData b f b -> AnnotatedInsertData b f a
$c<$ :: forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Functor f) =>
a -> AnnotatedInsertData b f b -> AnnotatedInsertData b f a
fmap :: (a -> b) -> AnnotatedInsertData b f a -> AnnotatedInsertData b f b
$cfmap :: forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Functor f) =>
(a -> b) -> AnnotatedInsertData b f a -> AnnotatedInsertData b f b
Functor, AnnotatedInsertData b f a -> Bool
(a -> m) -> AnnotatedInsertData b f a -> m
(a -> b -> b) -> b -> AnnotatedInsertData b f a -> b
(forall m. Monoid m => AnnotatedInsertData b f m -> m)
-> (forall m a.
Monoid m =>
(a -> m) -> AnnotatedInsertData b f a -> m)
-> (forall m a.
Monoid m =>
(a -> m) -> AnnotatedInsertData b f a -> m)
-> (forall a b.
(a -> b -> b) -> b -> AnnotatedInsertData b f a -> b)
-> (forall a b.
(a -> b -> b) -> b -> AnnotatedInsertData b f a -> b)
-> (forall b a.
(b -> a -> b) -> b -> AnnotatedInsertData b f a -> b)
-> (forall b a.
(b -> a -> b) -> b -> AnnotatedInsertData b f a -> b)
-> (forall a. (a -> a -> a) -> AnnotatedInsertData b f a -> a)
-> (forall a. (a -> a -> a) -> AnnotatedInsertData b f a -> a)
-> (forall a. AnnotatedInsertData b f a -> [a])
-> (forall a. AnnotatedInsertData b f a -> Bool)
-> (forall a. AnnotatedInsertData b f a -> Int)
-> (forall a. Eq a => a -> AnnotatedInsertData b f a -> Bool)
-> (forall a. Ord a => AnnotatedInsertData b f a -> a)
-> (forall a. Ord a => AnnotatedInsertData b f a -> a)
-> (forall a. Num a => AnnotatedInsertData b f a -> a)
-> (forall a. Num a => AnnotatedInsertData b f a -> a)
-> Foldable (AnnotatedInsertData b f)
forall a. Eq a => a -> AnnotatedInsertData b f a -> Bool
forall a. Num a => AnnotatedInsertData b f a -> a
forall a. Ord a => AnnotatedInsertData b f a -> a
forall m. Monoid m => AnnotatedInsertData b f m -> m
forall a. AnnotatedInsertData b f a -> Bool
forall a. AnnotatedInsertData b f a -> Int
forall a. AnnotatedInsertData b f a -> [a]
forall a. (a -> a -> a) -> AnnotatedInsertData b f a -> a
forall m a. Monoid m => (a -> m) -> AnnotatedInsertData b f a -> m
forall b a. (b -> a -> b) -> b -> AnnotatedInsertData b f a -> b
forall a b. (a -> b -> b) -> b -> AnnotatedInsertData b f a -> b
forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f, Eq a) =>
a -> AnnotatedInsertData b f a -> Bool
forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f, Num a) =>
AnnotatedInsertData b f a -> a
forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f, Ord a) =>
AnnotatedInsertData b f a -> a
forall (b :: BackendType) (f :: * -> *) m.
(Backend b, Foldable f, Monoid m) =>
AnnotatedInsertData b f m -> m
forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
AnnotatedInsertData b f a -> Bool
forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
AnnotatedInsertData b f a -> Int
forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
AnnotatedInsertData b f a -> [a]
forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
(a -> a -> a) -> AnnotatedInsertData b f a -> a
forall (b :: BackendType) (f :: * -> *) m a.
(Backend b, Foldable f, Monoid m) =>
(a -> m) -> AnnotatedInsertData b f a -> m
forall (b :: BackendType) (f :: * -> *) b a.
(Backend b, Foldable f) =>
(b -> a -> b) -> b -> AnnotatedInsertData b f a -> b
forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Foldable f) =>
(a -> b -> b) -> b -> AnnotatedInsertData b f 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 :: AnnotatedInsertData b f a -> a
$cproduct :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f, Num a) =>
AnnotatedInsertData b f a -> a
sum :: AnnotatedInsertData b f a -> a
$csum :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f, Num a) =>
AnnotatedInsertData b f a -> a
minimum :: AnnotatedInsertData b f a -> a
$cminimum :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f, Ord a) =>
AnnotatedInsertData b f a -> a
maximum :: AnnotatedInsertData b f a -> a
$cmaximum :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f, Ord a) =>
AnnotatedInsertData b f a -> a
elem :: a -> AnnotatedInsertData b f a -> Bool
$celem :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f, Eq a) =>
a -> AnnotatedInsertData b f a -> Bool
length :: AnnotatedInsertData b f a -> Int
$clength :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
AnnotatedInsertData b f a -> Int
null :: AnnotatedInsertData b f a -> Bool
$cnull :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
AnnotatedInsertData b f a -> Bool
toList :: AnnotatedInsertData b f a -> [a]
$ctoList :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
AnnotatedInsertData b f a -> [a]
foldl1 :: (a -> a -> a) -> AnnotatedInsertData b f a -> a
$cfoldl1 :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
(a -> a -> a) -> AnnotatedInsertData b f a -> a
foldr1 :: (a -> a -> a) -> AnnotatedInsertData b f a -> a
$cfoldr1 :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Foldable f) =>
(a -> a -> a) -> AnnotatedInsertData b f a -> a
foldl' :: (b -> a -> b) -> b -> AnnotatedInsertData b f a -> b
$cfoldl' :: forall (b :: BackendType) (f :: * -> *) b a.
(Backend b, Foldable f) =>
(b -> a -> b) -> b -> AnnotatedInsertData b f a -> b
foldl :: (b -> a -> b) -> b -> AnnotatedInsertData b f a -> b
$cfoldl :: forall (b :: BackendType) (f :: * -> *) b a.
(Backend b, Foldable f) =>
(b -> a -> b) -> b -> AnnotatedInsertData b f a -> b
foldr' :: (a -> b -> b) -> b -> AnnotatedInsertData b f a -> b
$cfoldr' :: forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Foldable f) =>
(a -> b -> b) -> b -> AnnotatedInsertData b f a -> b
foldr :: (a -> b -> b) -> b -> AnnotatedInsertData b f a -> b
$cfoldr :: forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Foldable f) =>
(a -> b -> b) -> b -> AnnotatedInsertData b f a -> b
foldMap' :: (a -> m) -> AnnotatedInsertData b f a -> m
$cfoldMap' :: forall (b :: BackendType) (f :: * -> *) m a.
(Backend b, Foldable f, Monoid m) =>
(a -> m) -> AnnotatedInsertData b f a -> m
foldMap :: (a -> m) -> AnnotatedInsertData b f a -> m
$cfoldMap :: forall (b :: BackendType) (f :: * -> *) m a.
(Backend b, Foldable f, Monoid m) =>
(a -> m) -> AnnotatedInsertData b f a -> m
fold :: AnnotatedInsertData b f m -> m
$cfold :: forall (b :: BackendType) (f :: * -> *) m.
(Backend b, Foldable f, Monoid m) =>
AnnotatedInsertData b f m -> m
Foldable, Functor (AnnotatedInsertData b f)
Foldable (AnnotatedInsertData b f)
Functor (AnnotatedInsertData b f)
-> Foldable (AnnotatedInsertData b f)
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b)
-> AnnotatedInsertData b f a -> f (AnnotatedInsertData b f b))
-> (forall (f :: * -> *) a.
Applicative f =>
AnnotatedInsertData b f (f a) -> f (AnnotatedInsertData b f a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b)
-> AnnotatedInsertData b f a -> m (AnnotatedInsertData b f b))
-> (forall (m :: * -> *) a.
Monad m =>
AnnotatedInsertData b f (m a) -> m (AnnotatedInsertData b f a))
-> Traversable (AnnotatedInsertData b f)
(a -> f b)
-> AnnotatedInsertData b f a -> f (AnnotatedInsertData b f b)
forall (b :: BackendType) (f :: * -> *).
(Backend b, Traversable f) =>
Functor (AnnotatedInsertData b f)
forall (b :: BackendType) (f :: * -> *).
(Backend b, Traversable f) =>
Foldable (AnnotatedInsertData b f)
forall (b :: BackendType) (f :: * -> *) (m :: * -> *) a.
(Backend b, Traversable f, Monad m) =>
AnnotatedInsertData b f (m a) -> m (AnnotatedInsertData b f a)
forall (b :: BackendType) (f :: * -> *) (f :: * -> *) a.
(Backend b, Traversable f, Applicative f) =>
AnnotatedInsertData b f (f a) -> f (AnnotatedInsertData b f a)
forall (b :: BackendType) (f :: * -> *) (m :: * -> *) a b.
(Backend b, Traversable f, Monad m) =>
(a -> m b)
-> AnnotatedInsertData b f a -> m (AnnotatedInsertData b f b)
forall (b :: BackendType) (f :: * -> *) (f :: * -> *) a b.
(Backend b, Traversable f, Applicative f) =>
(a -> f b)
-> AnnotatedInsertData b f a -> f (AnnotatedInsertData b f 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 =>
AnnotatedInsertData b f (m a) -> m (AnnotatedInsertData b f a)
forall (f :: * -> *) a.
Applicative f =>
AnnotatedInsertData b f (f a) -> f (AnnotatedInsertData b f a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b)
-> AnnotatedInsertData b f a -> m (AnnotatedInsertData b f b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b)
-> AnnotatedInsertData b f a -> f (AnnotatedInsertData b f b)
sequence :: AnnotatedInsertData b f (m a) -> m (AnnotatedInsertData b f a)
$csequence :: forall (b :: BackendType) (f :: * -> *) (m :: * -> *) a.
(Backend b, Traversable f, Monad m) =>
AnnotatedInsertData b f (m a) -> m (AnnotatedInsertData b f a)
mapM :: (a -> m b)
-> AnnotatedInsertData b f a -> m (AnnotatedInsertData b f b)
$cmapM :: forall (b :: BackendType) (f :: * -> *) (m :: * -> *) a b.
(Backend b, Traversable f, Monad m) =>
(a -> m b)
-> AnnotatedInsertData b f a -> m (AnnotatedInsertData b f b)
sequenceA :: AnnotatedInsertData b f (f a) -> f (AnnotatedInsertData b f a)
$csequenceA :: forall (b :: BackendType) (f :: * -> *) (f :: * -> *) a.
(Backend b, Traversable f, Applicative f) =>
AnnotatedInsertData b f (f a) -> f (AnnotatedInsertData b f a)
traverse :: (a -> f b)
-> AnnotatedInsertData b f a -> f (AnnotatedInsertData b f b)
$ctraverse :: forall (b :: BackendType) (f :: * -> *) (f :: * -> *) a b.
(Backend b, Traversable f, Applicative f) =>
(a -> f b)
-> AnnotatedInsertData b f a -> f (AnnotatedInsertData b f b)
$cp2Traversable :: forall (b :: BackendType) (f :: * -> *).
(Backend b, Traversable f) =>
Foldable (AnnotatedInsertData b f)
$cp1Traversable :: forall (b :: BackendType) (f :: * -> *).
(Backend b, Traversable f) =>
Functor (AnnotatedInsertData b f)
Traversable)
newtype Single a = Single {Single a -> a
unSingle :: a}
deriving (a -> Single b -> Single a
(a -> b) -> Single a -> Single b
(forall a b. (a -> b) -> Single a -> Single b)
-> (forall a b. a -> Single b -> Single a) -> Functor Single
forall a b. a -> Single b -> Single a
forall a b. (a -> b) -> Single a -> Single b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Single b -> Single a
$c<$ :: forall a b. a -> Single b -> Single a
fmap :: (a -> b) -> Single a -> Single b
$cfmap :: forall a b. (a -> b) -> Single a -> Single b
Functor, Single a -> Bool
(a -> m) -> Single a -> m
(a -> b -> b) -> b -> Single a -> b
(forall m. Monoid m => Single m -> m)
-> (forall m a. Monoid m => (a -> m) -> Single a -> m)
-> (forall m a. Monoid m => (a -> m) -> Single a -> m)
-> (forall a b. (a -> b -> b) -> b -> Single a -> b)
-> (forall a b. (a -> b -> b) -> b -> Single a -> b)
-> (forall b a. (b -> a -> b) -> b -> Single a -> b)
-> (forall b a. (b -> a -> b) -> b -> Single a -> b)
-> (forall a. (a -> a -> a) -> Single a -> a)
-> (forall a. (a -> a -> a) -> Single a -> a)
-> (forall a. Single a -> [a])
-> (forall a. Single a -> Bool)
-> (forall a. Single a -> Int)
-> (forall a. Eq a => a -> Single a -> Bool)
-> (forall a. Ord a => Single a -> a)
-> (forall a. Ord a => Single a -> a)
-> (forall a. Num a => Single a -> a)
-> (forall a. Num a => Single a -> a)
-> Foldable Single
forall a. Eq a => a -> Single a -> Bool
forall a. Num a => Single a -> a
forall a. Ord a => Single a -> a
forall m. Monoid m => Single m -> m
forall a. Single a -> Bool
forall a. Single a -> Int
forall a. Single a -> [a]
forall a. (a -> a -> a) -> Single a -> a
forall m a. Monoid m => (a -> m) -> Single a -> m
forall b a. (b -> a -> b) -> b -> Single a -> b
forall a b. (a -> b -> b) -> b -> Single 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 :: Single a -> a
$cproduct :: forall a. Num a => Single a -> a
sum :: Single a -> a
$csum :: forall a. Num a => Single a -> a
minimum :: Single a -> a
$cminimum :: forall a. Ord a => Single a -> a
maximum :: Single a -> a
$cmaximum :: forall a. Ord a => Single a -> a
elem :: a -> Single a -> Bool
$celem :: forall a. Eq a => a -> Single a -> Bool
length :: Single a -> Int
$clength :: forall a. Single a -> Int
null :: Single a -> Bool
$cnull :: forall a. Single a -> Bool
toList :: Single a -> [a]
$ctoList :: forall a. Single a -> [a]
foldl1 :: (a -> a -> a) -> Single a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Single a -> a
foldr1 :: (a -> a -> a) -> Single a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Single a -> a
foldl' :: (b -> a -> b) -> b -> Single a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Single a -> b
foldl :: (b -> a -> b) -> b -> Single a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Single a -> b
foldr' :: (a -> b -> b) -> b -> Single a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Single a -> b
foldr :: (a -> b -> b) -> b -> Single a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Single a -> b
foldMap' :: (a -> m) -> Single a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Single a -> m
foldMap :: (a -> m) -> Single a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Single a -> m
fold :: Single m -> m
$cfold :: forall m. Monoid m => Single m -> m
Foldable, Functor Single
Foldable Single
Functor Single
-> Foldable Single
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Single a -> f (Single b))
-> (forall (f :: * -> *) a.
Applicative f =>
Single (f a) -> f (Single a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Single a -> m (Single b))
-> (forall (m :: * -> *) a.
Monad m =>
Single (m a) -> m (Single a))
-> Traversable Single
(a -> f b) -> Single a -> f (Single 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 => Single (m a) -> m (Single a)
forall (f :: * -> *) a.
Applicative f =>
Single (f a) -> f (Single a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Single a -> m (Single b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Single a -> f (Single b)
sequence :: Single (m a) -> m (Single a)
$csequence :: forall (m :: * -> *) a. Monad m => Single (m a) -> m (Single a)
mapM :: (a -> m b) -> Single a -> m (Single b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Single a -> m (Single b)
sequenceA :: Single (f a) -> f (Single a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
Single (f a) -> f (Single a)
traverse :: (a -> f b) -> Single a -> f (Single b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Single a -> f (Single b)
$cp2Traversable :: Foldable Single
$cp1Traversable :: Functor Single
Traversable)
type SingleObjectInsert b v = AnnotatedInsertData b Single v
type MultiObjectInsert b v = AnnotatedInsertData b [] v
data AnnotatedInsertField (b :: BackendType) v
= AIColumn (Column b, v)
| AIObjectRelationship (XNestedInserts b) (ObjectRelationInsert b v)
| AIArrayRelationship (XNestedInserts b) (ArrayRelationInsert b v)
deriving (a -> AnnotatedInsertField b b -> AnnotatedInsertField b a
(a -> b) -> AnnotatedInsertField b a -> AnnotatedInsertField b b
(forall a b.
(a -> b) -> AnnotatedInsertField b a -> AnnotatedInsertField b b)
-> (forall a b.
a -> AnnotatedInsertField b b -> AnnotatedInsertField b a)
-> Functor (AnnotatedInsertField b)
forall a b.
a -> AnnotatedInsertField b b -> AnnotatedInsertField b a
forall a b.
(a -> b) -> AnnotatedInsertField b a -> AnnotatedInsertField b b
forall (b :: BackendType) a b.
Backend b =>
a -> AnnotatedInsertField b b -> AnnotatedInsertField b a
forall (b :: BackendType) a b.
Backend b =>
(a -> b) -> AnnotatedInsertField b a -> AnnotatedInsertField b b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> AnnotatedInsertField b b -> AnnotatedInsertField b a
$c<$ :: forall (b :: BackendType) a b.
Backend b =>
a -> AnnotatedInsertField b b -> AnnotatedInsertField b a
fmap :: (a -> b) -> AnnotatedInsertField b a -> AnnotatedInsertField b b
$cfmap :: forall (b :: BackendType) a b.
Backend b =>
(a -> b) -> AnnotatedInsertField b a -> AnnotatedInsertField b b
Functor, AnnotatedInsertField b a -> Bool
(a -> m) -> AnnotatedInsertField b a -> m
(a -> b -> b) -> b -> AnnotatedInsertField b a -> b
(forall m. Monoid m => AnnotatedInsertField b m -> m)
-> (forall m a.
Monoid m =>
(a -> m) -> AnnotatedInsertField b a -> m)
-> (forall m a.
Monoid m =>
(a -> m) -> AnnotatedInsertField b a -> m)
-> (forall a b.
(a -> b -> b) -> b -> AnnotatedInsertField b a -> b)
-> (forall a b.
(a -> b -> b) -> b -> AnnotatedInsertField b a -> b)
-> (forall b a.
(b -> a -> b) -> b -> AnnotatedInsertField b a -> b)
-> (forall b a.
(b -> a -> b) -> b -> AnnotatedInsertField b a -> b)
-> (forall a. (a -> a -> a) -> AnnotatedInsertField b a -> a)
-> (forall a. (a -> a -> a) -> AnnotatedInsertField b a -> a)
-> (forall a. AnnotatedInsertField b a -> [a])
-> (forall a. AnnotatedInsertField b a -> Bool)
-> (forall a. AnnotatedInsertField b a -> Int)
-> (forall a. Eq a => a -> AnnotatedInsertField b a -> Bool)
-> (forall a. Ord a => AnnotatedInsertField b a -> a)
-> (forall a. Ord a => AnnotatedInsertField b a -> a)
-> (forall a. Num a => AnnotatedInsertField b a -> a)
-> (forall a. Num a => AnnotatedInsertField b a -> a)
-> Foldable (AnnotatedInsertField b)
forall a. Eq a => a -> AnnotatedInsertField b a -> Bool
forall a. Num a => AnnotatedInsertField b a -> a
forall a. Ord a => AnnotatedInsertField b a -> a
forall m. Monoid m => AnnotatedInsertField b m -> m
forall a. AnnotatedInsertField b a -> Bool
forall a. AnnotatedInsertField b a -> Int
forall a. AnnotatedInsertField b a -> [a]
forall a. (a -> a -> a) -> AnnotatedInsertField b a -> a
forall m a. Monoid m => (a -> m) -> AnnotatedInsertField b a -> m
forall b a. (b -> a -> b) -> b -> AnnotatedInsertField b a -> b
forall a b. (a -> b -> b) -> b -> AnnotatedInsertField b a -> b
forall (b :: BackendType) a.
(Backend b, Eq a) =>
a -> AnnotatedInsertField b a -> Bool
forall (b :: BackendType) a.
(Backend b, Num a) =>
AnnotatedInsertField b a -> a
forall (b :: BackendType) a.
(Backend b, Ord a) =>
AnnotatedInsertField b a -> a
forall (b :: BackendType) m.
(Backend b, Monoid m) =>
AnnotatedInsertField b m -> m
forall (b :: BackendType) a.
Backend b =>
AnnotatedInsertField b a -> Bool
forall (b :: BackendType) a.
Backend b =>
AnnotatedInsertField b a -> Int
forall (b :: BackendType) a.
Backend b =>
AnnotatedInsertField b a -> [a]
forall (b :: BackendType) a.
Backend b =>
(a -> a -> a) -> AnnotatedInsertField b a -> a
forall (b :: BackendType) m a.
(Backend b, Monoid m) =>
(a -> m) -> AnnotatedInsertField b a -> m
forall (b :: BackendType) b a.
Backend b =>
(b -> a -> b) -> b -> AnnotatedInsertField b a -> b
forall (b :: BackendType) a b.
Backend b =>
(a -> b -> b) -> b -> AnnotatedInsertField b 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 :: AnnotatedInsertField b a -> a
$cproduct :: forall (b :: BackendType) a.
(Backend b, Num a) =>
AnnotatedInsertField b a -> a
sum :: AnnotatedInsertField b a -> a
$csum :: forall (b :: BackendType) a.
(Backend b, Num a) =>
AnnotatedInsertField b a -> a
minimum :: AnnotatedInsertField b a -> a
$cminimum :: forall (b :: BackendType) a.
(Backend b, Ord a) =>
AnnotatedInsertField b a -> a
maximum :: AnnotatedInsertField b a -> a
$cmaximum :: forall (b :: BackendType) a.
(Backend b, Ord a) =>
AnnotatedInsertField b a -> a
elem :: a -> AnnotatedInsertField b a -> Bool
$celem :: forall (b :: BackendType) a.
(Backend b, Eq a) =>
a -> AnnotatedInsertField b a -> Bool
length :: AnnotatedInsertField b a -> Int
$clength :: forall (b :: BackendType) a.
Backend b =>
AnnotatedInsertField b a -> Int
null :: AnnotatedInsertField b a -> Bool
$cnull :: forall (b :: BackendType) a.
Backend b =>
AnnotatedInsertField b a -> Bool
toList :: AnnotatedInsertField b a -> [a]
$ctoList :: forall (b :: BackendType) a.
Backend b =>
AnnotatedInsertField b a -> [a]
foldl1 :: (a -> a -> a) -> AnnotatedInsertField b a -> a
$cfoldl1 :: forall (b :: BackendType) a.
Backend b =>
(a -> a -> a) -> AnnotatedInsertField b a -> a
foldr1 :: (a -> a -> a) -> AnnotatedInsertField b a -> a
$cfoldr1 :: forall (b :: BackendType) a.
Backend b =>
(a -> a -> a) -> AnnotatedInsertField b a -> a
foldl' :: (b -> a -> b) -> b -> AnnotatedInsertField b a -> b
$cfoldl' :: forall (b :: BackendType) b a.
Backend b =>
(b -> a -> b) -> b -> AnnotatedInsertField b a -> b
foldl :: (b -> a -> b) -> b -> AnnotatedInsertField b a -> b
$cfoldl :: forall (b :: BackendType) b a.
Backend b =>
(b -> a -> b) -> b -> AnnotatedInsertField b a -> b
foldr' :: (a -> b -> b) -> b -> AnnotatedInsertField b a -> b
$cfoldr' :: forall (b :: BackendType) a b.
Backend b =>
(a -> b -> b) -> b -> AnnotatedInsertField b a -> b
foldr :: (a -> b -> b) -> b -> AnnotatedInsertField b a -> b
$cfoldr :: forall (b :: BackendType) a b.
Backend b =>
(a -> b -> b) -> b -> AnnotatedInsertField b a -> b
foldMap' :: (a -> m) -> AnnotatedInsertField b a -> m
$cfoldMap' :: forall (b :: BackendType) m a.
(Backend b, Monoid m) =>
(a -> m) -> AnnotatedInsertField b a -> m
foldMap :: (a -> m) -> AnnotatedInsertField b a -> m
$cfoldMap :: forall (b :: BackendType) m a.
(Backend b, Monoid m) =>
(a -> m) -> AnnotatedInsertField b a -> m
fold :: AnnotatedInsertField b m -> m
$cfold :: forall (b :: BackendType) m.
(Backend b, Monoid m) =>
AnnotatedInsertField b m -> m
Foldable, Functor (AnnotatedInsertField b)
Foldable (AnnotatedInsertField b)
Functor (AnnotatedInsertField b)
-> Foldable (AnnotatedInsertField b)
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b)
-> AnnotatedInsertField b a -> f (AnnotatedInsertField b b))
-> (forall (f :: * -> *) a.
Applicative f =>
AnnotatedInsertField b (f a) -> f (AnnotatedInsertField b a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b)
-> AnnotatedInsertField b a -> m (AnnotatedInsertField b b))
-> (forall (m :: * -> *) a.
Monad m =>
AnnotatedInsertField b (m a) -> m (AnnotatedInsertField b a))
-> Traversable (AnnotatedInsertField b)
(a -> f b)
-> AnnotatedInsertField b a -> f (AnnotatedInsertField b b)
forall (b :: BackendType).
Backend b =>
Functor (AnnotatedInsertField b)
forall (b :: BackendType).
Backend b =>
Foldable (AnnotatedInsertField b)
forall (b :: BackendType) (m :: * -> *) a.
(Backend b, Monad m) =>
AnnotatedInsertField b (m a) -> m (AnnotatedInsertField b a)
forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Applicative f) =>
AnnotatedInsertField b (f a) -> f (AnnotatedInsertField b a)
forall (b :: BackendType) (m :: * -> *) a b.
(Backend b, Monad m) =>
(a -> m b)
-> AnnotatedInsertField b a -> m (AnnotatedInsertField b b)
forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Applicative f) =>
(a -> f b)
-> AnnotatedInsertField b a -> f (AnnotatedInsertField b 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 =>
AnnotatedInsertField b (m a) -> m (AnnotatedInsertField b a)
forall (f :: * -> *) a.
Applicative f =>
AnnotatedInsertField b (f a) -> f (AnnotatedInsertField b a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b)
-> AnnotatedInsertField b a -> m (AnnotatedInsertField b b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b)
-> AnnotatedInsertField b a -> f (AnnotatedInsertField b b)
sequence :: AnnotatedInsertField b (m a) -> m (AnnotatedInsertField b a)
$csequence :: forall (b :: BackendType) (m :: * -> *) a.
(Backend b, Monad m) =>
AnnotatedInsertField b (m a) -> m (AnnotatedInsertField b a)
mapM :: (a -> m b)
-> AnnotatedInsertField b a -> m (AnnotatedInsertField b b)
$cmapM :: forall (b :: BackendType) (m :: * -> *) a b.
(Backend b, Monad m) =>
(a -> m b)
-> AnnotatedInsertField b a -> m (AnnotatedInsertField b b)
sequenceA :: AnnotatedInsertField b (f a) -> f (AnnotatedInsertField b a)
$csequenceA :: forall (b :: BackendType) (f :: * -> *) a.
(Backend b, Applicative f) =>
AnnotatedInsertField b (f a) -> f (AnnotatedInsertField b a)
traverse :: (a -> f b)
-> AnnotatedInsertField b a -> f (AnnotatedInsertField b b)
$ctraverse :: forall (b :: BackendType) (f :: * -> *) a b.
(Backend b, Applicative f) =>
(a -> f b)
-> AnnotatedInsertField b a -> f (AnnotatedInsertField b b)
$cp2Traversable :: forall (b :: BackendType).
Backend b =>
Foldable (AnnotatedInsertField b)
$cp1Traversable :: forall (b :: BackendType).
Backend b =>
Functor (AnnotatedInsertField b)
Traversable)
type AnnotatedInsertRow b v = [AnnotatedInsertField b v]
data RelationInsert (b :: BackendType) a = RelationInsert
{ RelationInsert b a -> a
_riInsertData :: a,
RelationInsert b a -> RelInfo b
_riRelationInfo :: RelInfo b
}
deriving (Int -> RelationInsert b a -> ShowS
[RelationInsert b a] -> ShowS
RelationInsert b a -> String
(Int -> RelationInsert b a -> ShowS)
-> (RelationInsert b a -> String)
-> ([RelationInsert b a] -> ShowS)
-> Show (RelationInsert b a)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall (b :: BackendType) a.
(Backend b, Show a) =>
Int -> RelationInsert b a -> ShowS
forall (b :: BackendType) a.
(Backend b, Show a) =>
[RelationInsert b a] -> ShowS
forall (b :: BackendType) a.
(Backend b, Show a) =>
RelationInsert b a -> String
showList :: [RelationInsert b a] -> ShowS
$cshowList :: forall (b :: BackendType) a.
(Backend b, Show a) =>
[RelationInsert b a] -> ShowS
show :: RelationInsert b a -> String
$cshow :: forall (b :: BackendType) a.
(Backend b, Show a) =>
RelationInsert b a -> String
showsPrec :: Int -> RelationInsert b a -> ShowS
$cshowsPrec :: forall (b :: BackendType) a.
(Backend b, Show a) =>
Int -> RelationInsert b a -> ShowS
Show, RelationInsert b a -> RelationInsert b a -> Bool
(RelationInsert b a -> RelationInsert b a -> Bool)
-> (RelationInsert b a -> RelationInsert b a -> Bool)
-> Eq (RelationInsert b a)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (b :: BackendType) a.
(Backend b, Eq a) =>
RelationInsert b a -> RelationInsert b a -> Bool
/= :: RelationInsert b a -> RelationInsert b a -> Bool
$c/= :: forall (b :: BackendType) a.
(Backend b, Eq a) =>
RelationInsert b a -> RelationInsert b a -> Bool
== :: RelationInsert b a -> RelationInsert b a -> Bool
$c== :: forall (b :: BackendType) a.
(Backend b, Eq a) =>
RelationInsert b a -> RelationInsert b a -> Bool
Eq, a -> RelationInsert b b -> RelationInsert b a
(a -> b) -> RelationInsert b a -> RelationInsert b b
(forall a b. (a -> b) -> RelationInsert b a -> RelationInsert b b)
-> (forall a b. a -> RelationInsert b b -> RelationInsert b a)
-> Functor (RelationInsert b)
forall a b. a -> RelationInsert b b -> RelationInsert b a
forall a b. (a -> b) -> RelationInsert b a -> RelationInsert b b
forall (b :: BackendType) a b.
a -> RelationInsert b b -> RelationInsert b a
forall (b :: BackendType) a b.
(a -> b) -> RelationInsert b a -> RelationInsert b b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> RelationInsert b b -> RelationInsert b a
$c<$ :: forall (b :: BackendType) a b.
a -> RelationInsert b b -> RelationInsert b a
fmap :: (a -> b) -> RelationInsert b a -> RelationInsert b b
$cfmap :: forall (b :: BackendType) a b.
(a -> b) -> RelationInsert b a -> RelationInsert b b
Functor, RelationInsert b a -> Bool
(a -> m) -> RelationInsert b a -> m
(a -> b -> b) -> b -> RelationInsert b a -> b
(forall m. Monoid m => RelationInsert b m -> m)
-> (forall m a. Monoid m => (a -> m) -> RelationInsert b a -> m)
-> (forall m a. Monoid m => (a -> m) -> RelationInsert b a -> m)
-> (forall a b. (a -> b -> b) -> b -> RelationInsert b a -> b)
-> (forall a b. (a -> b -> b) -> b -> RelationInsert b a -> b)
-> (forall b a. (b -> a -> b) -> b -> RelationInsert b a -> b)
-> (forall b a. (b -> a -> b) -> b -> RelationInsert b a -> b)
-> (forall a. (a -> a -> a) -> RelationInsert b a -> a)
-> (forall a. (a -> a -> a) -> RelationInsert b a -> a)
-> (forall a. RelationInsert b a -> [a])
-> (forall a. RelationInsert b a -> Bool)
-> (forall a. RelationInsert b a -> Int)
-> (forall a. Eq a => a -> RelationInsert b a -> Bool)
-> (forall a. Ord a => RelationInsert b a -> a)
-> (forall a. Ord a => RelationInsert b a -> a)
-> (forall a. Num a => RelationInsert b a -> a)
-> (forall a. Num a => RelationInsert b a -> a)
-> Foldable (RelationInsert b)
forall a. Eq a => a -> RelationInsert b a -> Bool
forall a. Num a => RelationInsert b a -> a
forall a. Ord a => RelationInsert b a -> a
forall m. Monoid m => RelationInsert b m -> m
forall a. RelationInsert b a -> Bool
forall a. RelationInsert b a -> Int
forall a. RelationInsert b a -> [a]
forall a. (a -> a -> a) -> RelationInsert b a -> a
forall m a. Monoid m => (a -> m) -> RelationInsert b a -> m
forall b a. (b -> a -> b) -> b -> RelationInsert b a -> b
forall a b. (a -> b -> b) -> b -> RelationInsert b a -> b
forall (b :: BackendType) a.
Eq a =>
a -> RelationInsert b a -> Bool
forall (b :: BackendType) a. Num a => RelationInsert b a -> a
forall (b :: BackendType) a. Ord a => RelationInsert b a -> a
forall (b :: BackendType) m. Monoid m => RelationInsert b m -> m
forall (b :: BackendType) a. RelationInsert b a -> Bool
forall (b :: BackendType) a. RelationInsert b a -> Int
forall (b :: BackendType) a. RelationInsert b a -> [a]
forall (b :: BackendType) a.
(a -> a -> a) -> RelationInsert b a -> a
forall (b :: BackendType) m a.
Monoid m =>
(a -> m) -> RelationInsert b a -> m
forall (b :: BackendType) b a.
(b -> a -> b) -> b -> RelationInsert b a -> b
forall (b :: BackendType) a b.
(a -> b -> b) -> b -> RelationInsert b 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 :: RelationInsert b a -> a
$cproduct :: forall (b :: BackendType) a. Num a => RelationInsert b a -> a
sum :: RelationInsert b a -> a
$csum :: forall (b :: BackendType) a. Num a => RelationInsert b a -> a
minimum :: RelationInsert b a -> a
$cminimum :: forall (b :: BackendType) a. Ord a => RelationInsert b a -> a
maximum :: RelationInsert b a -> a
$cmaximum :: forall (b :: BackendType) a. Ord a => RelationInsert b a -> a
elem :: a -> RelationInsert b a -> Bool
$celem :: forall (b :: BackendType) a.
Eq a =>
a -> RelationInsert b a -> Bool
length :: RelationInsert b a -> Int
$clength :: forall (b :: BackendType) a. RelationInsert b a -> Int
null :: RelationInsert b a -> Bool
$cnull :: forall (b :: BackendType) a. RelationInsert b a -> Bool
toList :: RelationInsert b a -> [a]
$ctoList :: forall (b :: BackendType) a. RelationInsert b a -> [a]
foldl1 :: (a -> a -> a) -> RelationInsert b a -> a
$cfoldl1 :: forall (b :: BackendType) a.
(a -> a -> a) -> RelationInsert b a -> a
foldr1 :: (a -> a -> a) -> RelationInsert b a -> a
$cfoldr1 :: forall (b :: BackendType) a.
(a -> a -> a) -> RelationInsert b a -> a
foldl' :: (b -> a -> b) -> b -> RelationInsert b a -> b
$cfoldl' :: forall (b :: BackendType) b a.
(b -> a -> b) -> b -> RelationInsert b a -> b
foldl :: (b -> a -> b) -> b -> RelationInsert b a -> b
$cfoldl :: forall (b :: BackendType) b a.
(b -> a -> b) -> b -> RelationInsert b a -> b
foldr' :: (a -> b -> b) -> b -> RelationInsert b a -> b
$cfoldr' :: forall (b :: BackendType) a b.
(a -> b -> b) -> b -> RelationInsert b a -> b
foldr :: (a -> b -> b) -> b -> RelationInsert b a -> b
$cfoldr :: forall (b :: BackendType) a b.
(a -> b -> b) -> b -> RelationInsert b a -> b
foldMap' :: (a -> m) -> RelationInsert b a -> m
$cfoldMap' :: forall (b :: BackendType) m a.
Monoid m =>
(a -> m) -> RelationInsert b a -> m
foldMap :: (a -> m) -> RelationInsert b a -> m
$cfoldMap :: forall (b :: BackendType) m a.
Monoid m =>
(a -> m) -> RelationInsert b a -> m
fold :: RelationInsert b m -> m
$cfold :: forall (b :: BackendType) m. Monoid m => RelationInsert b m -> m
Foldable, Functor (RelationInsert b)
Foldable (RelationInsert b)
Functor (RelationInsert b)
-> Foldable (RelationInsert b)
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> RelationInsert b a -> f (RelationInsert b b))
-> (forall (f :: * -> *) a.
Applicative f =>
RelationInsert b (f a) -> f (RelationInsert b a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> RelationInsert b a -> m (RelationInsert b b))
-> (forall (m :: * -> *) a.
Monad m =>
RelationInsert b (m a) -> m (RelationInsert b a))
-> Traversable (RelationInsert b)
(a -> f b) -> RelationInsert b a -> f (RelationInsert b b)
forall (b :: BackendType). Functor (RelationInsert b)
forall (b :: BackendType). Foldable (RelationInsert b)
forall (b :: BackendType) (m :: * -> *) a.
Monad m =>
RelationInsert b (m a) -> m (RelationInsert b a)
forall (b :: BackendType) (f :: * -> *) a.
Applicative f =>
RelationInsert b (f a) -> f (RelationInsert b a)
forall (b :: BackendType) (m :: * -> *) a b.
Monad m =>
(a -> m b) -> RelationInsert b a -> m (RelationInsert b b)
forall (b :: BackendType) (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> RelationInsert b a -> f (RelationInsert b 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 =>
RelationInsert b (m a) -> m (RelationInsert b a)
forall (f :: * -> *) a.
Applicative f =>
RelationInsert b (f a) -> f (RelationInsert b a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> RelationInsert b a -> m (RelationInsert b b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> RelationInsert b a -> f (RelationInsert b b)
sequence :: RelationInsert b (m a) -> m (RelationInsert b a)
$csequence :: forall (b :: BackendType) (m :: * -> *) a.
Monad m =>
RelationInsert b (m a) -> m (RelationInsert b a)
mapM :: (a -> m b) -> RelationInsert b a -> m (RelationInsert b b)
$cmapM :: forall (b :: BackendType) (m :: * -> *) a b.
Monad m =>
(a -> m b) -> RelationInsert b a -> m (RelationInsert b b)
sequenceA :: RelationInsert b (f a) -> f (RelationInsert b a)
$csequenceA :: forall (b :: BackendType) (f :: * -> *) a.
Applicative f =>
RelationInsert b (f a) -> f (RelationInsert b a)
traverse :: (a -> f b) -> RelationInsert b a -> f (RelationInsert b b)
$ctraverse :: forall (b :: BackendType) (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> RelationInsert b a -> f (RelationInsert b b)
$cp2Traversable :: forall (b :: BackendType). Foldable (RelationInsert b)
$cp1Traversable :: forall (b :: BackendType). Functor (RelationInsert b)
Traversable)
type ObjectRelationInsert b v = RelationInsert b (SingleObjectInsert b v)
type ArrayRelationInsert b v = RelationInsert b (MultiObjectInsert b v)
data InsertQueryP1 (b :: BackendType) = InsertQueryP1
{ InsertQueryP1 b -> TableName b
iqp1Table :: TableName b,
InsertQueryP1 b -> [Column b]
iqp1Cols :: [Column b],
InsertQueryP1 b -> [[SQLExpression b]]
iqp1Tuples :: [[SQLExpression b]],
InsertQueryP1 b -> Maybe (OnConflictClause b (SQLExpression b))
iqp1Conflict :: Maybe (OnConflictClause b (SQLExpression b)),
InsertQueryP1 b -> (AnnBoolExpSQL b, Maybe (AnnBoolExpSQL b))
iqp1CheckCond :: (AnnBoolExpSQL b, Maybe (AnnBoolExpSQL b)),
InsertQueryP1 b -> MutationOutput b
iqp1Output :: MutationOutput b,
InsertQueryP1 b -> [ColumnInfo b]
iqp1AllCols :: [ColumnInfo b]
}
$(makeLenses ''AnnotatedInsert)
$(makePrisms ''AnnotatedInsertField)
getInsertColumns :: AnnotatedInsertRow b v -> [(Column b, v)]
getInsertColumns :: AnnotatedInsertRow b v -> [(Column b, v)]
getInsertColumns = (AnnotatedInsertField b v -> Maybe (Column b, v))
-> AnnotatedInsertRow b v -> [(Column b, v)]
forall (f :: * -> *) a b.
Filterable f =>
(a -> Maybe b) -> f a -> f b
mapMaybe (AnnotatedInsertField b v
-> Getting
(First (Column b, v)) (AnnotatedInsertField b v) (Column b, v)
-> Maybe (Column b, v)
forall s a. s -> Getting (First a) s a -> Maybe a
^? Getting
(First (Column b, v)) (AnnotatedInsertField b v) (Column b, v)
forall (b :: BackendType) v.
Prism' (AnnotatedInsertField b v) (Column b, v)
_AIColumn)
getInsertObjectRelationships :: AnnotatedInsertRow b v -> [ObjectRelationInsert b v]
getInsertObjectRelationships :: AnnotatedInsertRow b v -> [ObjectRelationInsert b v]
getInsertObjectRelationships = (AnnotatedInsertField b v -> Maybe (ObjectRelationInsert b v))
-> AnnotatedInsertRow b v -> [ObjectRelationInsert b v]
forall (f :: * -> *) a b.
Filterable f =>
(a -> Maybe b) -> f a -> f b
mapMaybe (((XNestedInserts b, ObjectRelationInsert b v)
-> ObjectRelationInsert b v)
-> Maybe (XNestedInserts b, ObjectRelationInsert b v)
-> Maybe (ObjectRelationInsert b v)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (XNestedInserts b, ObjectRelationInsert b v)
-> ObjectRelationInsert b v
forall a b. (a, b) -> b
snd (Maybe (XNestedInserts b, ObjectRelationInsert b v)
-> Maybe (ObjectRelationInsert b v))
-> (AnnotatedInsertField b v
-> Maybe (XNestedInserts b, ObjectRelationInsert b v))
-> AnnotatedInsertField b v
-> Maybe (ObjectRelationInsert b v)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (AnnotatedInsertField b v
-> Getting
(First (XNestedInserts b, ObjectRelationInsert b v))
(AnnotatedInsertField b v)
(XNestedInserts b, ObjectRelationInsert b v)
-> Maybe (XNestedInserts b, ObjectRelationInsert b v)
forall s a. s -> Getting (First a) s a -> Maybe a
^? Getting
(First (XNestedInserts b, ObjectRelationInsert b v))
(AnnotatedInsertField b v)
(XNestedInserts b, ObjectRelationInsert b v)
forall (b :: BackendType) v.
Prism'
(AnnotatedInsertField b v)
(XNestedInserts b, ObjectRelationInsert b v)
_AIObjectRelationship))
getInsertArrayRelationships :: AnnotatedInsertRow b v -> [ArrayRelationInsert b v]
getInsertArrayRelationships :: AnnotatedInsertRow b v -> [ArrayRelationInsert b v]
getInsertArrayRelationships = (AnnotatedInsertField b v -> Maybe (ArrayRelationInsert b v))
-> AnnotatedInsertRow b v -> [ArrayRelationInsert b v]
forall (f :: * -> *) a b.
Filterable f =>
(a -> Maybe b) -> f a -> f b
mapMaybe (((XNestedInserts b, ArrayRelationInsert b v)
-> ArrayRelationInsert b v)
-> Maybe (XNestedInserts b, ArrayRelationInsert b v)
-> Maybe (ArrayRelationInsert b v)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (XNestedInserts b, ArrayRelationInsert b v)
-> ArrayRelationInsert b v
forall a b. (a, b) -> b
snd (Maybe (XNestedInserts b, ArrayRelationInsert b v)
-> Maybe (ArrayRelationInsert b v))
-> (AnnotatedInsertField b v
-> Maybe (XNestedInserts b, ArrayRelationInsert b v))
-> AnnotatedInsertField b v
-> Maybe (ArrayRelationInsert b v)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (AnnotatedInsertField b v
-> Getting
(First (XNestedInserts b, ArrayRelationInsert b v))
(AnnotatedInsertField b v)
(XNestedInserts b, ArrayRelationInsert b v)
-> Maybe (XNestedInserts b, ArrayRelationInsert b v)
forall s a. s -> Getting (First a) s a -> Maybe a
^? Getting
(First (XNestedInserts b, ArrayRelationInsert b v))
(AnnotatedInsertField b v)
(XNestedInserts b, ArrayRelationInsert b v)
forall (b :: BackendType) v.
Prism'
(AnnotatedInsertField b v)
(XNestedInserts b, ArrayRelationInsert b v)
_AIArrayRelationship))