Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class (Backend b, Eq (AggregationPredicates b (PartialSQLExp b)), Eq (BooleanOperators b (PartialSQLExp b)), Eq (FunctionArgumentExp b (PartialSQLExp b)), Hashable (AggregationPredicates b (PartialSQLExp b)), Hashable (BooleanOperators b (PartialSQLExp b)), Hashable (FunctionArgumentExp b (PartialSQLExp b))) => BackendMetadata (b :: BackendType) where Source #
buildComputedFieldInfo, fetchAndValidateEnumValues, resolveSourceConfig, resolveDatabaseMetadata, parseBoolExpOperations, buildFunctionInfo, updateColumnInEventTrigger, parseCollectableType, postDropSourceHook, buildComputedFieldBooleanExp, prepareCatalog
buildComputedFieldInfo :: MonadError QErr m => HashSet (TableName b) -> TableName b -> HashSet (Column b) -> ComputedFieldName -> ComputedFieldDefinition b -> RawFunctionInfo b -> Comment -> m (ComputedFieldInfo b) Source #
fetchAndValidateEnumValues :: (MonadIO m, MonadBaseControl IO m) => SourceConfig b -> TableName b -> Maybe (PrimaryKey b (RawColumnInfo b)) -> [RawColumnInfo b] -> m (Either QErr EnumValues) Source #
resolveSourceConfig :: (MonadIO m, MonadResolveSource m) => Logger Hasura -> SourceName -> SourceConnConfiguration b -> BackendSourceKind b -> BackendConfig b -> Environment -> Manager -> m (Either QErr (SourceConfig b)) Source #
Function that resolves the connection related source configuration, and creates a connection pool (and other related parameters) in the process
resolveDatabaseMetadata :: (MonadIO m, MonadBaseControl IO m, MonadResolveSource m) => SourceMetadata b -> SourceConfig b -> SourceTypeCustomization -> m (Either QErr (ResolvedSource b)) Source #
Function that introspects a database for tables, columns, functions etc.
parseBoolExpOperations :: (MonadError QErr m, TableCoreInfoRM b m) => ValueParser b m v -> TableName b -> FieldInfoMap (FieldInfo b) -> ColumnReference b -> Value -> m [OpExpG b v] Source #
:: MonadError QErr m | |
=> SourceName | |
-> FunctionName b | |
-> SystemDefined | |
-> FunctionConfig | |
-> FunctionPermissionsMap | |
-> RawFunctionInfo b | |
-> Maybe Text | the function comment |
-> NamingCase | |
-> m (FunctionInfo b, SchemaDependency) |
updateColumnInEventTrigger :: TableName b -> Column b -> Column b -> TableName b -> EventTriggerConf b -> EventTriggerConf b Source #
parseCollectableType :: MonadError QErr m => CollectableType (ColumnType b) -> Value -> m (PartialSQLExp b) Source #
postDropSourceHook :: (MonadError QErr m, MonadIO m, MonadBaseControl IO m) => SourceConfig b -> TableEventTriggers b -> m () Source #
validateRelationship :: MonadError QErr m => TableCache b -> TableName b -> Either (ObjRelDef b) (ArrRelDef b) -> m () Source #
default validateRelationship :: MonadError QErr m => TableCache b -> TableName b -> Either (ObjRelDef b) (ArrRelDef b) -> m () Source #
buildComputedFieldBooleanExp :: (MonadError QErr m, TableCoreInfoRM b m) => BoolExpResolver b m v -> BoolExpRHSParser b m v -> TableName b -> FieldInfoMap (FieldInfo b) -> ComputedFieldInfo b -> Value -> m (AnnComputedFieldBoolExp b v) Source #
Function that that builds a boolean expression field out of a computed field
prepareCatalog :: (MonadIO m, MonadBaseControl IO m) => SourceConfig b -> ExceptT QErr m RecreateEventTriggers Source #
Run all operations required to create, update, or migrate the internal catalog used by the backend for internal bookkeeping, if any. The return type indicates whether the performed operations subsequently require re-creating event trigers.