graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Table.Cache

Synopsis

Documentation

newtype GraphQLType Source #

A wrapper around GType which allows us to define custom JSON instances.

TODO: this name is ambiguous, and conflicts with Hasura.RQL.DDL.RemoteSchema.Permission.GraphQLType; it should perhaps be renamed, made internal to this module, or removed altogether?

Constructors

GraphQLType 

Fields

Instances

Instances details
FromJSON GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

ToJSON GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

HasCodec GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

Generic GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep GraphQLType :: Type -> Type #

Show GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

NFData GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: GraphQLType -> () #

Eq GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

Ord GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep GraphQLType Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep GraphQLType = D1 ('MetaData "GraphQLType" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "GraphQLType" 'PrefixI 'True) (S1 ('MetaSel ('Just "unGraphQLType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GType)))

data CustomRootField Source #

Instances

Instances details
FromJSON CustomRootField Source # 
Instance details

Defined in Hasura.Table.Cache

ToJSON CustomRootField Source # 
Instance details

Defined in Hasura.Table.Cache

HasCodec CustomRootField Source # 
Instance details

Defined in Hasura.Table.Cache

Generic CustomRootField Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep CustomRootField :: Type -> Type #

Show CustomRootField Source # 
Instance details

Defined in Hasura.Table.Cache

NFData CustomRootField Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: CustomRootField -> () #

Eq CustomRootField Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep CustomRootField Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep CustomRootField = D1 ('MetaData "CustomRootField" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "CustomRootField" 'PrefixI 'True) (S1 ('MetaSel ('Just "_crfName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Name)) :*: S1 ('MetaSel ('Just "_crfComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Comment)))

data TableCustomRootFields Source #

Instances

Instances details
FromJSON TableCustomRootFields Source # 
Instance details

Defined in Hasura.Table.Cache

ToJSON TableCustomRootFields Source # 
Instance details

Defined in Hasura.Table.Cache

HasCodec TableCustomRootFields Source # 
Instance details

Defined in Hasura.Table.Cache

Generic TableCustomRootFields Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep TableCustomRootFields :: Type -> Type #

Show TableCustomRootFields Source # 
Instance details

Defined in Hasura.Table.Cache

NFData TableCustomRootFields Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: TableCustomRootFields -> () #

Eq TableCustomRootFields Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep TableCustomRootFields Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep TableCustomRootFields = D1 ('MetaData "TableCustomRootFields" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "TableCustomRootFields" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_tcrfSelect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField) :*: S1 ('MetaSel ('Just "_tcrfSelectByPk") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField)) :*: (S1 ('MetaSel ('Just "_tcrfSelectAggregate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField) :*: (S1 ('MetaSel ('Just "_tcrfSelectStream") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField) :*: S1 ('MetaSel ('Just "_tcrfInsert") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField)))) :*: ((S1 ('MetaSel ('Just "_tcrfInsertOne") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField) :*: (S1 ('MetaSel ('Just "_tcrfUpdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField) :*: S1 ('MetaSel ('Just "_tcrfUpdateByPk") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField))) :*: (S1 ('MetaSel ('Just "_tcrfUpdateMany") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField) :*: (S1 ('MetaSel ('Just "_tcrfDelete") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField) :*: S1 ('MetaSel ('Just "_tcrfDeleteByPk") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CustomRootField))))))

data FieldInfo (b :: BackendType) Source #

Instances

Instances details
Backend b => ToJSON (FieldInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (FieldInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (FieldInfo b) :: Type -> Type #

Methods

from :: FieldInfo b -> Rep (FieldInfo b) x #

to :: Rep (FieldInfo b) x -> FieldInfo b #

Backend b => Eq (FieldInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

(==) :: FieldInfo b -> FieldInfo b -> Bool #

(/=) :: FieldInfo b -> FieldInfo b -> Bool #

type Rep (FieldInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

fieldInfoGraphQLNames :: FieldInfo b -> [Name] Source #

Returns all the field names created for the given field. Columns, object relationships, and computed fields only ever produce a single field, but array relationships also contain an _aggregate field.

sortCols :: [ColumnInfo backend] -> [ColumnInfo backend] Source #

Sort columns based on their ordinal position

getRels :: FieldInfoMap (FieldInfo backend) -> [RelInfo backend] Source #

data InsPermInfo (b :: BackendType) Source #

Instances

Instances details
(Backend b, ToJSON (AnnBoolExpPartialSQL b)) => ToJSON (InsPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (InsPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (InsPermInfo b) :: Type -> Type #

Methods

from :: InsPermInfo b -> Rep (InsPermInfo b) x #

to :: Rep (InsPermInfo b) x -> InsPermInfo b #

(Backend b, Show (AnnBoolExpPartialSQL b)) => Show (InsPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

(Backend b, NFData (AnnBoolExpPartialSQL b), NFData (PreSetColsPartial b)) => NFData (InsPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: InsPermInfo b -> () #

(Backend b, Eq (AnnBoolExpPartialSQL b)) => Eq (InsPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (InsPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

data SelPermInfo (b :: BackendType) Source #

Constructors

SelPermInfo 

Fields

Instances

Instances details
(Backend b, ToJSON (AnnBoolExpPartialSQL b)) => ToJSON (SelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (SelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (SelPermInfo b) :: Type -> Type #

Methods

from :: SelPermInfo b -> Rep (SelPermInfo b) x #

to :: Rep (SelPermInfo b) x -> SelPermInfo b #

(Backend b, Show (AnnBoolExpPartialSQL b)) => Show (SelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

(Backend b, NFData (AnnBoolExpPartialSQL b)) => NFData (SelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: SelPermInfo b -> () #

(Backend b, Eq (AnnBoolExpPartialSQL b)) => Eq (SelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (SelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

data UpdPermInfo (b :: BackendType) Source #

Instances

Instances details
(Backend b, ToJSON (AnnBoolExpPartialSQL b)) => ToJSON (UpdPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (UpdPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (UpdPermInfo b) :: Type -> Type #

Methods

from :: UpdPermInfo b -> Rep (UpdPermInfo b) x #

to :: Rep (UpdPermInfo b) x -> UpdPermInfo b #

(Backend b, Show (AnnBoolExpPartialSQL b)) => Show (UpdPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

(Backend b, NFData (AnnBoolExpPartialSQL b), NFData (PreSetColsPartial b)) => NFData (UpdPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: UpdPermInfo b -> () #

(Backend b, Eq (AnnBoolExpPartialSQL b)) => Eq (UpdPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (UpdPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

data DelPermInfo (b :: BackendType) Source #

Instances

Instances details
(Backend b, ToJSON (AnnBoolExpPartialSQL b)) => ToJSON (DelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (DelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (DelPermInfo b) :: Type -> Type #

Methods

from :: DelPermInfo b -> Rep (DelPermInfo b) x #

to :: Rep (DelPermInfo b) x -> DelPermInfo b #

(Backend b, Show (AnnBoolExpPartialSQL b)) => Show (DelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

(Backend b, NFData (AnnBoolExpPartialSQL b)) => NFData (DelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: DelPermInfo b -> () #

(Backend b, Eq (AnnBoolExpPartialSQL b)) => Eq (DelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (DelPermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

data RolePermInfo (b :: BackendType) Source #

Instances

Instances details
(Backend b, ToJSON (InsPermInfo b), ToJSON (SelPermInfo b), ToJSON (UpdPermInfo b), ToJSON (DelPermInfo b)) => ToJSON (RolePermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (RolePermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (RolePermInfo b) :: Type -> Type #

Methods

from :: RolePermInfo b -> Rep (RolePermInfo b) x #

to :: Rep (RolePermInfo b) x -> RolePermInfo b #

(Backend b, NFData (InsPermInfo b), NFData (SelPermInfo b), NFData (UpdPermInfo b), NFData (DelPermInfo b)) => NFData (RolePermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: RolePermInfo b -> () #

type Rep (RolePermInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (RolePermInfo b) = D1 ('MetaData "RolePermInfo" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "RolePermInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_permIns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (InsPermInfo b))) :*: S1 ('MetaSel ('Just "_permSel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (SelPermInfo b)))) :*: (S1 ('MetaSel ('Just "_permUpd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (UpdPermInfo b))) :*: S1 ('MetaSel ('Just "_permDel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (DelPermInfo b))))))

hasuraJSON ''TableConstraint)

data ViewInfo Source #

Instances

Instances details
FromJSON ViewInfo Source # 
Instance details

Defined in Hasura.Table.Cache

ToJSON ViewInfo Source # 
Instance details

Defined in Hasura.Table.Cache

Generic ViewInfo Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep ViewInfo :: Type -> Type #

Methods

from :: ViewInfo -> Rep ViewInfo x #

to :: Rep ViewInfo x -> ViewInfo #

Show ViewInfo Source # 
Instance details

Defined in Hasura.Table.Cache

NFData ViewInfo Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: ViewInfo -> () #

Eq ViewInfo Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep ViewInfo Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep ViewInfo = D1 ('MetaData "ViewInfo" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ViewInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "viIsUpdatable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "viIsDeletable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "viIsInsertable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))))

data ColumnConfig Source #

Instances

Instances details
FromJSON ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

ToJSON ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

HasCodec ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

Monoid ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

Semigroup ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

Generic ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep ColumnConfig :: Type -> Type #

Show ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

NFData ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: ColumnConfig -> () #

Eq ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep ColumnConfig Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep ColumnConfig = D1 ('MetaData "ColumnConfig" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ColumnConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "_ccfgCustomName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Name)) :*: S1 ('MetaSel ('Just "_ccfgComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Comment)))

data TableConfig b Source #

Instances

Instances details
Backend b => FromJSON (TableConfig b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => ToJSON (TableConfig b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => HasCodec (TableConfig b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (TableConfig b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (TableConfig b) :: Type -> Type #

Methods

from :: TableConfig b -> Rep (TableConfig b) x #

to :: Rep (TableConfig b) x -> TableConfig b #

Backend b => Show (TableConfig b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => NFData (TableConfig b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: TableConfig b -> () #

Backend b => Eq (TableConfig b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (TableConfig b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (TableConfig b) = D1 ('MetaData "TableConfig" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "TableConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_tcCustomRootFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TableCustomRootFields) :*: S1 ('MetaSel ('Just "_tcColumnConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap (Column b) ColumnConfig))) :*: (S1 ('MetaSel ('Just "_tcCustomName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Name)) :*: S1 ('MetaSel ('Just "_tcComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Comment))))

data Constraint (b :: BackendType) Source #

Constructors

Constraint 

Fields

Instances

Instances details
Backend b => FromJSON (Constraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => ToJSON (Constraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (Constraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (Constraint b) :: Type -> Type #

Methods

from :: Constraint b -> Rep (Constraint b) x #

to :: Rep (Constraint b) x -> Constraint b #

Backend b => Show (Constraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => NFData (Constraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: Constraint b -> () #

Backend b => Eq (Constraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

(==) :: Constraint b -> Constraint b -> Bool #

(/=) :: Constraint b -> Constraint b -> Bool #

Backend b => Hashable (Constraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (Constraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (Constraint b) = D1 ('MetaData "Constraint" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "Constraint" 'PrefixI 'True) (S1 ('MetaSel ('Just "_cName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ConstraintName b)) :*: S1 ('MetaSel ('Just "_cOid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 OID)))

data PrimaryKey (b :: BackendType) a Source #

Constructors

PrimaryKey 

Instances

Instances details
Foldable (PrimaryKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

fold :: Monoid m => PrimaryKey b m -> m #

foldMap :: Monoid m => (a -> m) -> PrimaryKey b a -> m #

foldMap' :: Monoid m => (a -> m) -> PrimaryKey b a -> m #

foldr :: (a -> b0 -> b0) -> b0 -> PrimaryKey b a -> b0 #

foldr' :: (a -> b0 -> b0) -> b0 -> PrimaryKey b a -> b0 #

foldl :: (b0 -> a -> b0) -> b0 -> PrimaryKey b a -> b0 #

foldl' :: (b0 -> a -> b0) -> b0 -> PrimaryKey b a -> b0 #

foldr1 :: (a -> a -> a) -> PrimaryKey b a -> a #

foldl1 :: (a -> a -> a) -> PrimaryKey b a -> a #

toList :: PrimaryKey b a -> [a] #

null :: PrimaryKey b a -> Bool #

length :: PrimaryKey b a -> Int #

elem :: Eq a => a -> PrimaryKey b a -> Bool #

maximum :: Ord a => PrimaryKey b a -> a #

minimum :: Ord a => PrimaryKey b a -> a #

sum :: Num a => PrimaryKey b a -> a #

product :: Num a => PrimaryKey b a -> a #

(Backend b, FromJSON a) => FromJSON (PrimaryKey b a) Source # 
Instance details

Defined in Hasura.Table.Cache

(Backend b, ToJSON a) => ToJSON (PrimaryKey b a) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (PrimaryKey b a) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (PrimaryKey b a) :: Type -> Type #

Methods

from :: PrimaryKey b a -> Rep (PrimaryKey b a) x #

to :: Rep (PrimaryKey b a) x -> PrimaryKey b a #

(Backend b, Show a) => Show (PrimaryKey b a) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

showsPrec :: Int -> PrimaryKey b a -> ShowS #

show :: PrimaryKey b a -> String #

showList :: [PrimaryKey b a] -> ShowS #

(Backend b, NFData a) => NFData (PrimaryKey b a) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: PrimaryKey b a -> () #

(Backend b, Eq a) => Eq (PrimaryKey b a) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

(==) :: PrimaryKey b a -> PrimaryKey b a -> Bool #

(/=) :: PrimaryKey b a -> PrimaryKey b a -> Bool #

(Eq a, Backend b, Hashable (NESeq a)) => Hashable (PrimaryKey b a) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (PrimaryKey b a) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (PrimaryKey b a) = D1 ('MetaData "PrimaryKey" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "PrimaryKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "_pkConstraint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Constraint b)) :*: S1 ('MetaSel ('Just "_pkColumns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NESeq a))))

pkConstraint :: forall b a b. Lens (PrimaryKey b a) (PrimaryKey b a) (Constraint b) (Constraint b) Source #

pkColumns :: forall b a a. Lens (PrimaryKey b a) (PrimaryKey b a) (NESeq a) (NESeq a) Source #

data UniqueConstraint (b :: BackendType) Source #

Data type modelling uniqueness constraints. Occasionally this will include primary keys, although those are tracked separately in TableCoreInfoG.

For more information about unique constraints, visit the postgresql documentation: https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS.

Constructors

UniqueConstraint 

Fields

Instances

Instances details
Backend b => FromJSON (UniqueConstraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => ToJSON (UniqueConstraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (UniqueConstraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (UniqueConstraint b) :: Type -> Type #

Backend b => Show (UniqueConstraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => NFData (UniqueConstraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: UniqueConstraint b -> () #

Backend b => Eq (UniqueConstraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => Hashable (UniqueConstraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (UniqueConstraint b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (UniqueConstraint b) = D1 ('MetaData "UniqueConstraint" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "UniqueConstraint" 'PrefixI 'True) (S1 ('MetaSel ('Just "_ucConstraint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Constraint b)) :*: S1 ('MetaSel ('Just "_ucColumns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashSet (Column b)))))

data ForeignKey (b :: BackendType) Source #

Instances

Instances details
Backend b => FromJSON (ForeignKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => ToJSON (ForeignKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (ForeignKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (ForeignKey b) :: Type -> Type #

Methods

from :: ForeignKey b -> Rep (ForeignKey b) x #

to :: Rep (ForeignKey b) x -> ForeignKey b #

Backend b => Show (ForeignKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => NFData (ForeignKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: ForeignKey b -> () #

Backend b => Eq (ForeignKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

(==) :: ForeignKey b -> ForeignKey b -> Bool #

(/=) :: ForeignKey b -> ForeignKey b -> Bool #

Backend b => Hashable (ForeignKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (ForeignKey b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (ForeignKey b) = D1 ('MetaData "ForeignKey" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ForeignKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "_fkConstraint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Constraint b)) :*: (S1 ('MetaSel ('Just "_fkForeignTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableName b)) :*: S1 ('MetaSel ('Just "_fkColumnMapping") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NEHashMap (Column b) (Column b))))))

data TableCoreInfoG (b :: BackendType) field primaryKeyColumn Source #

The field and primaryKeyColumn type parameters vary as the schema cache is built and more information is accumulated. See also TableCoreInfo.

Instances

Instances details
(Backend b, Generic pkCol, ToJSON field, ToJSON pkCol) => ToJSON (TableCoreInfoG b field pkCol) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

toJSON :: TableCoreInfoG b field pkCol -> Value Source #

toEncoding :: TableCoreInfoG b field pkCol -> Encoding Source #

toJSONList :: [TableCoreInfoG b field pkCol] -> Value Source #

toEncodingList :: [TableCoreInfoG b field pkCol] -> Encoding Source #

Generic (TableCoreInfoG b field primaryKeyColumn) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (TableCoreInfoG b field primaryKeyColumn) :: Type -> Type #

Methods

from :: TableCoreInfoG b field primaryKeyColumn -> Rep (TableCoreInfoG b field primaryKeyColumn) x #

to :: Rep (TableCoreInfoG b field primaryKeyColumn) x -> TableCoreInfoG b field primaryKeyColumn #

(Eq field, Eq pkCol, Backend b) => Eq (TableCoreInfoG b field pkCol) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

(==) :: TableCoreInfoG b field pkCol -> TableCoreInfoG b field pkCol -> Bool #

(/=) :: TableCoreInfoG b field pkCol -> TableCoreInfoG b field pkCol -> Bool #

type Rep (TableCoreInfoG b field primaryKeyColumn) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (TableCoreInfoG b field primaryKeyColumn) = D1 ('MetaData "TableCoreInfoG" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "TableCoreInfo" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_tciName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableName b)) :*: (S1 ('MetaSel ('Just "_tciDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PGDescription)) :*: S1 ('MetaSel ('Just "_tciFieldInfoMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (FieldInfoMap field)))) :*: (S1 ('MetaSel ('Just "_tciPrimaryKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (PrimaryKey b primaryKeyColumn))) :*: (S1 ('MetaSel ('Just "_tciUniqueConstraints") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashSet (UniqueConstraint b))) :*: S1 ('MetaSel ('Just "_tciForeignKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashSet (ForeignKey b)))))) :*: ((S1 ('MetaSel ('Just "_tciViewInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ViewInfo)) :*: (S1 ('MetaSel ('Just "_tciEnumValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EnumValues)) :*: S1 ('MetaSel ('Just "_tciCustomConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableConfig b)))) :*: (S1 ('MetaSel ('Just "_tciExtraTableMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ExtraTableMetadata b)) :*: (S1 ('MetaSel ('Just "_tciApolloFederationConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ApolloFederationConfig)) :*: S1 ('MetaSel ('Just "_tciRawColumns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [RawColumnInfo b]))))))

tciViewInfo :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (Maybe ViewInfo) Source #

tciUniqueConstraints :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (HashSet (UniqueConstraint b)) Source #

tciRawColumns :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) [RawColumnInfo b] Source #

tciPrimaryKey :: forall b field primaryKeyColumn primaryKeyColumn. Lens (TableCoreInfoG b field primaryKeyColumn) (TableCoreInfoG b field primaryKeyColumn) (Maybe (PrimaryKey b primaryKeyColumn)) (Maybe (PrimaryKey b primaryKeyColumn)) Source #

tciName :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (TableName b) Source #

tciForeignKeys :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (HashSet (ForeignKey b)) Source #

tciFieldInfoMap :: forall b field primaryKeyColumn field. Lens (TableCoreInfoG b field primaryKeyColumn) (TableCoreInfoG b field primaryKeyColumn) (FieldInfoMap field) (FieldInfoMap field) Source #

tciExtraTableMetadata :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (ExtraTableMetadata b) Source #

tciEnumValues :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (Maybe EnumValues) Source #

tciDescription :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (Maybe PGDescription) Source #

tciCustomConfig :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (TableConfig b) Source #

tciApolloFederationConfig :: forall b field primaryKeyColumn. Lens' (TableCoreInfoG b field primaryKeyColumn) (Maybe ApolloFederationConfig) Source #

type TableCoreInfo b = TableCoreInfoG b (FieldInfo b) (ColumnInfo b) Source #

Fully-processed table info that includes non-column fields.

data TableInfo (b :: BackendType) Source #

Instances

Instances details
(Backend b, ToJSON (EventTriggerInfoMap b), ToJSON (RolePermInfo b), ToJSON (RolePermInfoMap b), ToJSON (TableCoreInfo b)) => ToJSON (TableInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (TableInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (TableInfo b) :: Type -> Type #

Methods

from :: TableInfo b -> Rep (TableInfo b) x #

to :: Rep (TableInfo b) x -> TableInfo b #

type Rep (TableInfo b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (TableInfo b) = D1 ('MetaData "TableInfo" "Hasura.Table.Cache" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "TableInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_tiCoreInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableCoreInfo b)) :*: S1 ('MetaSel ('Just "_tiRolePermInfoMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (RolePermInfoMap b))) :*: (S1 ('MetaSel ('Just "_tiEventTriggerInfoMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (EventTriggerInfoMap b)) :*: S1 ('MetaSel ('Just "_tiAdminRolePermInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (RolePermInfo b)))))

newtype ForeignKeyMetadata (b :: BackendType) Source #

Metadata of a Postgres foreign key constraint which is being extracted from database via 'src-rsr/pg_table_metadata.sql'

data DBTableMetadata (b :: BackendType) Source #

Metadata of any Backend table which is being extracted from source database

Instances

Instances details
Backend b => FromJSON (DBTableMetadata b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => ToJSON (DBTableMetadata b) Source # 
Instance details

Defined in Hasura.Table.Cache

Generic (DBTableMetadata b) Source # 
Instance details

Defined in Hasura.Table.Cache

Associated Types

type Rep (DBTableMetadata b) :: Type -> Type #

Backend b => Show (DBTableMetadata b) Source # 
Instance details

Defined in Hasura.Table.Cache

Backend b => NFData (DBTableMetadata b) Source # 
Instance details

Defined in Hasura.Table.Cache

Methods

rnf :: DBTableMetadata b -> () #

Backend b => Eq (DBTableMetadata b) Source # 
Instance details

Defined in Hasura.Table.Cache

type Rep (DBTableMetadata b) Source # 
Instance details

Defined in Hasura.Table.Cache

askFieldInfo :: MonadError QErr m => FieldInfoMap fieldInfo -> FieldName -> m fieldInfo Source #

askColumnType :: (MonadError QErr m, Backend backend) => FieldInfoMap (FieldInfo backend) -> Column backend -> Text -> m (ColumnType backend) Source #

askColInfo :: forall m backend. (MonadError QErr m, Backend backend) => FieldInfoMap (FieldInfo backend) -> Column backend -> Text -> m (ColumnInfo backend) Source #

assertColumnExists :: forall backend m. (MonadError QErr m, Backend backend) => FieldInfoMap (FieldInfo backend) -> Text -> Column backend -> m () Source #

askRelType :: MonadError QErr m => FieldInfoMap (FieldInfo backend) -> RelName -> Text -> m (RelInfo backend) Source #