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

Hasura.RQL.Types.Column

Synopsis

Documentation

newtype EnumValue Source #

Constructors

EnumValue 

Fields

Instances

Instances details
FromJSON EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

FromJSONKey EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

ToJSON EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

ToJSONKey EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Generic EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

type Rep EnumValue :: Type -> Type #

Show EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

NFData EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Methods

rnf :: EnumValue -> () #

Eq EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Ord EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Hashable EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep EnumValue Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep EnumValue = D1 ('MetaData "EnumValue" "Hasura.RQL.Types.Column" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "EnumValue" 'PrefixI 'True) (S1 ('MetaSel ('Just "getEnumValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)))

newtype EnumValueInfo Source #

Constructors

EnumValueInfo 

Fields

Instances

Instances details
FromJSON EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

ToJSON EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Generic EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

type Rep EnumValueInfo :: Type -> Type #

Show EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

NFData EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Methods

rnf :: EnumValueInfo -> () #

Eq EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Ord EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Hashable EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep EnumValueInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep EnumValueInfo = D1 ('MetaData "EnumValueInfo" "Hasura.RQL.Types.Column" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "EnumValueInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "evComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))

data EnumReference (b :: BackendType) Source #

Represents a reference to an “enum table,” a single-column Postgres table that is referenced via foreign key.

Instances

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Generic (EnumReference b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

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

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Methods

rnf :: EnumReference b -> () #

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

Defined in Hasura.RQL.Types.Column

Backend b => Ord (EnumReference b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

type Rep (EnumReference b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep (EnumReference b) = D1 ('MetaData "EnumReference" "Hasura.RQL.Types.Column" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "EnumReference" 'PrefixI 'True) (S1 ('MetaSel ('Just "erTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableName b)) :*: (S1 ('MetaSel ('Just "erValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 EnumValues) :*: S1 ('MetaSel ('Just "erTableCustomName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Name)))))

data ColumnType (b :: BackendType) Source #

The type we use for columns, which are currently always “scalars” (though see the note about CollectableType). Unlike ScalarType, which represents a type that a backend knows about, this type characterizes distinctions we make but the backend doesn’t.

Constructors

ColumnScalar (ScalarType b)

Ordinary Postgres columns.

ColumnEnumReference (EnumReference b)

Columns that reference enum tables (see Hasura.RQL.Schema.Enum). This is not actually a distinct type from the perspective of Postgres (at the time of this writing, we ensure they always have type text), but we really want to distinguish this case, since we treat it completely differently in the GraphQL schema.

Instances

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

Defined in Hasura.RQL.Types.Column

Generic (ColumnType b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

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

Methods

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

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

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Methods

rnf :: ColumnType b -> () #

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

Defined in Hasura.RQL.Types.Column

Methods

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

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

Backend b => Ord (ColumnType b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Backend b => ToTxt (ColumnType b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Methods

toTxt :: ColumnType b -> Text Source #

type Rep (ColumnType b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep (ColumnType b) = D1 ('MetaData "ColumnType" "Hasura.RQL.Types.Column" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ColumnScalar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ScalarType b))) :+: C1 ('MetaCons "ColumnEnumReference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (EnumReference b))))

type ValueParser b m v = CollectableType (ColumnType b) -> Value -> m v Source #

A parser to parse a json value with enforcing column type

data ColumnValue (b :: BackendType) Source #

Constructors

ColumnValue 

Instances

Instances details
Backend b => Show (ColumnValue b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

parseScalarValueColumnTypeWithContext :: forall m b. (MonadError QErr m, Backend b) => ScalarTypeParsingContext b -> ColumnType b -> Value -> m (ScalarValue b) Source #

Note: Unconditionally accepts null values and returns PGNull.

parseScalarValueColumnType :: forall m b r. (MonadError QErr m, Backend b, MonadReader r m, Has (ScalarTypeParsingContext b) r) => ColumnType b -> Value -> m (ScalarValue b) Source #

Note: Unconditionally accepts null values and returns PGNull.

data RawColumnType (b :: BackendType) Source #

Instances

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Generic (RawColumnType b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

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

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Methods

rnf :: RawColumnType b -> () #

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

Defined in Hasura.RQL.Types.Column

Backend b => Ord (RawColumnType b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

type Rep (RawColumnType b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

data RawColumnInfo (b :: BackendType) Source #

“Raw” column info, as stored in the catalog (but not in the schema cache). Instead of containing a PGColumnType, it only contains a PGScalarType, which is combined with the pcirReferences field and other table data to eventually resolve the type to a PGColumnType.

Constructors

RawColumnInfo 

Fields

Instances

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Generic (RawColumnInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

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

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Methods

rnf :: RawColumnInfo b -> () #

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

Defined in Hasura.RQL.Types.Column

type Rep (RawColumnInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

data ColumnMutability Source #

Indicates whether a column may participate in certain mutations.

For example, identity columns may sometimes be insertable but rarely updatable, depending on the backend and how they're declared.

This guides the schema parsers such that they only generate fields for columns where they're valid without having to model the exact circumstances which cause a column to appear or not.

See https://github.com/hasura/graphql-engine/blob/master/rfcs/column-mutability.md.

Instances

Instances details
FromJSON ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

ToJSON ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Generic ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

type Rep ColumnMutability :: Type -> Type #

Show ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

NFData ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Methods

rnf :: ColumnMutability -> () #

Eq ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Ord ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Hashable ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep ColumnMutability Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep ColumnMutability = D1 ('MetaData "ColumnMutability" "Hasura.RQL.Types.Column" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ColumnMutability" 'PrefixI 'True) (S1 ('MetaSel ('Just "_cmIsInsertable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_cmIsUpdatable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)))

data ColumnInfo (b :: BackendType) Source #

“Resolved” column info, produced from a RawColumnInfo value that has been combined with other schema information to produce a PGColumnType.

Constructors

ColumnInfo 

Fields

Instances

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

Defined in Hasura.RQL.Types.Column

Generic (ColumnInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

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

Methods

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

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

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Methods

rnf :: ColumnInfo b -> () #

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

Defined in Hasura.RQL.Types.Column

Methods

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

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

Backend b => Ord (ColumnInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

type Rep (ColumnInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

data NestedObjectInfo b Source #

Instances

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

Defined in Hasura.RQL.Types.Column

Generic (NestedObjectInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

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

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Methods

rnf :: NestedObjectInfo b -> () #

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

Defined in Hasura.RQL.Types.Column

Backend b => Ord (NestedObjectInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

type Rep (NestedObjectInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

data NestedArrayInfo b Source #

Instances

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

Defined in Hasura.RQL.Types.Column

Generic (NestedArrayInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

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

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Methods

rnf :: NestedArrayInfo b -> () #

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

Defined in Hasura.RQL.Types.Column

Backend b => Ord (NestedArrayInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

type Rep (NestedArrayInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep (NestedArrayInfo b) = D1 ('MetaData "NestedArrayInfo" "Hasura.RQL.Types.Column" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "NestedArrayInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "_naiSupportsNestedArrays") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (XNestedObjects b)) :*: (S1 ('MetaSel ('Just "_naiIsNullable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_naiColumnInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (StructuredColumnInfo b)))))

data StructuredColumnInfo b Source #

Instances

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

Defined in Hasura.RQL.Types.Column

Generic (StructuredColumnInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

Associated Types

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

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

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

Methods

rnf :: StructuredColumnInfo b -> () #

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

Defined in Hasura.RQL.Types.Column

Backend b => Ord (StructuredColumnInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

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

Defined in Hasura.RQL.Types.Column

type Rep (StructuredColumnInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

type Rep (StructuredColumnInfo b) = D1 ('MetaData "StructuredColumnInfo" "Hasura.RQL.Types.Column" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "SCIScalarColumn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ColumnInfo b))) :+: (C1 ('MetaCons "SCIObjectColumn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NestedObjectInfo b))) :+: C1 ('MetaCons "SCIArrayColumn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NestedArrayInfo b)))))

onlyNumCols :: forall b. Backend b => [ColumnInfo b] -> [ColumnInfo b] Source #

isNumCol :: forall b. Backend b => ColumnInfo b -> Bool Source #

data ColumnReference (b :: BackendType) Source #

Represents a reference to a source column, possibly casted an arbitrary number of times. Used within parseBoolExpOperations for bookkeeping.

Instances

Instances details
Backend b => ToTxt (ColumnReference b) Source # 
Instance details

Defined in Hasura.RQL.Types.Column

columnReferenceNullable :: ColumnReference (b :: BackendType) -> Maybe Bool Source #

Whether the column referred to might be null. Currently we can only tell for references that refer to proper relation columns.