Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hasura.RQL.Types.Source
Synopsis
- data SourceInfo b = SourceInfo {
- _siName :: SourceName
- _siSourceKind :: BackendSourceKind b
- _siTables :: TableCache b
- _siFunctions :: FunctionCache b
- _siNativeQueries :: NativeQueryCache b
- _siStoredProcedures :: StoredProcedureCache b
- _siLogicalModels :: LogicalModelCache b
- _siConfiguration :: ~(SourceConfig b)
- _siQueryTagsConfig :: Maybe QueryTagsConfig
- _siCustomization :: ResolvedSourceCustomization
- _siDbObjectsIntrospection :: DBObjectsIntrospection b
- type BackendSourceInfo = AnyBackend SourceInfo
- type SourceCache = HashMap SourceName BackendSourceInfo
- unsafeSourceInfo :: forall b. HasTag b => BackendSourceInfo -> Maybe (SourceInfo b)
- unsafeSourceName :: BackendSourceInfo -> SourceName
- unsafeSourceTables :: forall b. HasTag b => BackendSourceInfo -> Maybe (TableCache b)
- unsafeSourceFunctions :: forall b. HasTag b => BackendSourceInfo -> Maybe (FunctionCache b)
- unsafeSourceConfiguration :: forall b. HasTag b => BackendSourceInfo -> Maybe (SourceConfig b)
- data DBObjectsIntrospection b = DBObjectsIntrospection {}
- newtype ScalarMap b = ScalarMap (HashMap Name (ScalarType b))
- type SourceResolver b = Environment -> SourceName -> SourceConnConfiguration b -> IO (Either QErr (SourceConfig b))
- class Monad m => MonadResolveSource m where
- getPGSourceResolver :: m (SourceResolver ('Postgres 'Vanilla))
- getMSSQLSourceResolver :: m (SourceResolver 'MSSQL)
- data MaintenanceModeVersion
- data SourceHealthCheckInfo b = SourceHealthCheckInfo {}
- type BackendSourceHealthCheckInfo = AnyBackend SourceHealthCheckInfo
- type SourceHealthCheckCache = HashMap SourceName BackendSourceHealthCheckInfo
- data SourcePingInfo b = SourcePingInfo {}
- type BackendSourcePingInfo = AnyBackend SourcePingInfo
- type SourcePingCache = HashMap SourceName BackendSourcePingInfo
- siTables :: forall b. Lens' (SourceInfo b) (TableCache b)
- siStoredProcedures :: forall b. Lens' (SourceInfo b) (StoredProcedureCache b)
- siSourceKind :: forall b. Lens' (SourceInfo b) (BackendSourceKind b)
- siQueryTagsConfig :: forall b. Lens' (SourceInfo b) (Maybe QueryTagsConfig)
- siNativeQueries :: forall b. Lens' (SourceInfo b) (NativeQueryCache b)
- siName :: forall b. Lens' (SourceInfo b) SourceName
- siLogicalModels :: forall b. Lens' (SourceInfo b) (LogicalModelCache b)
- siFunctions :: forall b. Lens' (SourceInfo b) (FunctionCache b)
- siDbObjectsIntrospection :: forall b. Lens' (SourceInfo b) (DBObjectsIntrospection b)
- siCustomization :: forall b. Lens' (SourceInfo b) ResolvedSourceCustomization
- siConfiguration :: forall b. Lens' (SourceInfo b) (SourceConfig b)
Documentation
data SourceInfo b Source #
Constructors
Instances
(Backend b, ToJSON (TableCache b), ToJSON (FunctionCache b), ToJSON (NativeQueryCache b), ToJSON (StoredProcedureCache b), ToJSON QueryTagsConfig, ToJSON SourceCustomization) => ToJSON (SourceInfo b) Source # | |
Defined in Hasura.RQL.Types.Source Methods toJSON :: SourceInfo b -> Value Source # toEncoding :: SourceInfo b -> Encoding Source # toJSONList :: [SourceInfo b] -> Value Source # toEncodingList :: [SourceInfo b] -> Encoding Source # |
type BackendSourceInfo = AnyBackend SourceInfo Source #
unsafeSourceInfo :: forall b. HasTag b => BackendSourceInfo -> Maybe (SourceInfo b) Source #
unsafeSourceTables :: forall b. HasTag b => BackendSourceInfo -> Maybe (TableCache b) Source #
unsafeSourceFunctions :: forall b. HasTag b => BackendSourceInfo -> Maybe (FunctionCache b) Source #
unsafeSourceConfiguration :: forall b. HasTag b => BackendSourceInfo -> Maybe (SourceConfig b) Source #
data DBObjectsIntrospection b Source #
Contains metadata (introspection) from the database, used to build the
schema cache. This type only contains results of introspecting DB objects,
i.e. the DB types specified by tables, functions, and scalars. Notably, it
does not include the additional introspection that takes place on Postgres,
namely reading the contents of tables used as Enum Values -- see
fetchAndValidateEnumValues
.
Constructors
DBObjectsIntrospection | |
Fields
|
Instances
A map from GraphQL name to equivalent scalar type for a given backend.
Constructors
ScalarMap (HashMap Name (ScalarType b)) |
type SourceResolver b = Environment -> SourceName -> SourceConnConfiguration b -> IO (Either QErr (SourceConfig b)) Source #
FIXME: this should be either in BackendMetadata
, or into a new dedicated
BackendResolve
, instead of listing backends explicitly. It could also be
moved to the app level.
class Monad m => MonadResolveSource m where Source #
Methods
getPGSourceResolver :: m (SourceResolver ('Postgres 'Vanilla)) Source #
getMSSQLSourceResolver :: m (SourceResolver 'MSSQL) Source #
Instances
data MaintenanceModeVersion Source #
Constructors
PreviousMMVersion | should correspond to the source catalog version from which the user is migrating from |
CurrentMMVersion | should correspond to the latest source catalog version |
Instances
Show MaintenanceModeVersion Source # | |
Defined in Hasura.RQL.Types.Source Methods showsPrec :: Int -> MaintenanceModeVersion -> ShowS # show :: MaintenanceModeVersion -> String # showList :: [MaintenanceModeVersion] -> ShowS # | |
Eq MaintenanceModeVersion Source # | |
Defined in Hasura.RQL.Types.Source Methods (==) :: MaintenanceModeVersion -> MaintenanceModeVersion -> Bool # (/=) :: MaintenanceModeVersion -> MaintenanceModeVersion -> Bool # |
data SourceHealthCheckInfo b Source #
Constructors
SourceHealthCheckInfo | |
Fields |
data SourcePingInfo b Source #
Constructors
SourcePingInfo | |
Fields |
siTables :: forall b. Lens' (SourceInfo b) (TableCache b) Source #
siStoredProcedures :: forall b. Lens' (SourceInfo b) (StoredProcedureCache b) Source #
siSourceKind :: forall b. Lens' (SourceInfo b) (BackendSourceKind b) Source #
siQueryTagsConfig :: forall b. Lens' (SourceInfo b) (Maybe QueryTagsConfig) Source #
siNativeQueries :: forall b. Lens' (SourceInfo b) (NativeQueryCache b) Source #
siName :: forall b. Lens' (SourceInfo b) SourceName Source #
siLogicalModels :: forall b. Lens' (SourceInfo b) (LogicalModelCache b) Source #
siFunctions :: forall b. Lens' (SourceInfo b) (FunctionCache b) Source #
siDbObjectsIntrospection :: forall b. Lens' (SourceInfo b) (DBObjectsIntrospection b) Source #
siCustomization :: forall b. Lens' (SourceInfo b) ResolvedSourceCustomization Source #
siConfiguration :: forall b. Lens' (SourceInfo b) (SourceConfig b) Source #