Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- fetchUndeliveredEvents :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> SourceName -> [TriggerName] -> MaintenanceMode () -> FetchBatchSize -> m [Event 'MSSQL]
- setRetry :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> Event 'MSSQL -> UTCTime -> MaintenanceMode MaintenanceModeVersion -> m ()
- insertManualEvent :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TableName -> TriggerName -> Value -> UserInfo -> Maybe TraceContext -> m EventId
- getMaintenanceModeVersion :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> m MaintenanceModeVersion
- recordSuccess :: MonadIO m => MSSQLSourceConfig -> Event 'MSSQL -> Invocation 'EventType -> MaintenanceMode MaintenanceModeVersion -> m (Either QErr ())
- recordError :: MonadIO m => MSSQLSourceConfig -> Event 'MSSQL -> Invocation 'EventType -> ProcessEventError -> MaintenanceMode MaintenanceModeVersion -> m (Either QErr ())
- recordError' :: MonadIO m => MSSQLSourceConfig -> Event 'MSSQL -> Maybe (Invocation 'EventType) -> ProcessEventError -> MaintenanceMode MaintenanceModeVersion -> m (Either QErr ())
- redeliverEvent :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> EventId -> m ()
- dropTriggerAndArchiveEvents :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerName -> TableName -> m ()
- dropDanglingSQLTrigger :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerName -> TableName -> HashSet Ops -> m ()
- createTableEventTrigger :: MonadIO m => SQLGenCtx -> MSSQLSourceConfig -> TableName -> [ColumnInfo 'MSSQL] -> TriggerName -> TriggerOnReplication -> TriggerOpsDef 'MSSQL -> Maybe (PrimaryKey 'MSSQL (ColumnInfo 'MSSQL)) -> m (Either QErr ())
- createMissingSQLTriggers :: (MonadIO m, MonadError QErr m, MonadBaseControl IO m) => SQLGenCtx -> MSSQLSourceConfig -> TableName -> ([ColumnInfo 'MSSQL], Maybe (PrimaryKey 'MSSQL (ColumnInfo 'MSSQL))) -> TriggerName -> TriggerOnReplication -> TriggerOpsDef 'MSSQL -> m ()
- unlockEventsInSource :: MonadIO m => MSSQLSourceConfig -> NESet EventId -> m (Either QErr Int)
- checkIfTriggerExists :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerName -> HashSet Ops -> m Bool
- dropTriggerQ :: TriggerName -> SchemaName -> TxE QErr ()
- qualifyTableName :: TableName -> Text
- addCleanupSchedules :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> [(TriggerName, AutoTriggerLogCleanupConfig)] -> m ()
- deleteAllScheduledCleanups :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerName -> m ()
- getCleanupEventsForDeletion :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> m [(Text, TriggerName)]
- updateCleanupEventStatusToDead :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> [Text] -> m ()
- updateCleanupEventStatusToPaused :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> Text -> m ()
- updateCleanupEventStatusToCompleted :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> Text -> DeletedEventLogStats -> m ()
- deleteEventTriggerLogs :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerLogCleanupConfig -> IO (Maybe (TriggerLogCleanupConfig, EventTriggerCleanupStatus)) -> m DeletedEventLogStats
- fetchEventLogs :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> GetEventLogs b -> m [EventLog]
- fetchEventInvocationLogs :: (MonadError QErr m, MonadIO m) => MSSQLSourceConfig -> GetEventInvocations b -> m [EventInvocationLog]
- fetchEventById :: (MonadError QErr m, MonadIO m) => MSSQLSourceConfig -> GetEventById b -> m EventLogWithInvocations
Documentation
fetchUndeliveredEvents :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> SourceName -> [TriggerName] -> MaintenanceMode () -> FetchBatchSize -> m [Event 'MSSQL] Source #
setRetry :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> Event 'MSSQL -> UTCTime -> MaintenanceMode MaintenanceModeVersion -> m () Source #
insertManualEvent :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TableName -> TriggerName -> Value -> UserInfo -> Maybe TraceContext -> m EventId Source #
getMaintenanceModeVersion :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> m MaintenanceModeVersion Source #
recordSuccess :: MonadIO m => MSSQLSourceConfig -> Event 'MSSQL -> Invocation 'EventType -> MaintenanceMode MaintenanceModeVersion -> m (Either QErr ()) Source #
recordError :: MonadIO m => MSSQLSourceConfig -> Event 'MSSQL -> Invocation 'EventType -> ProcessEventError -> MaintenanceMode MaintenanceModeVersion -> m (Either QErr ()) Source #
recordError' :: MonadIO m => MSSQLSourceConfig -> Event 'MSSQL -> Maybe (Invocation 'EventType) -> ProcessEventError -> MaintenanceMode MaintenanceModeVersion -> m (Either QErr ()) Source #
redeliverEvent :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> EventId -> m () Source #
dropTriggerAndArchiveEvents :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerName -> TableName -> m () Source #
dropDanglingSQLTrigger :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerName -> TableName -> HashSet Ops -> m () Source #
createTableEventTrigger :: MonadIO m => SQLGenCtx -> MSSQLSourceConfig -> TableName -> [ColumnInfo 'MSSQL] -> TriggerName -> TriggerOnReplication -> TriggerOpsDef 'MSSQL -> Maybe (PrimaryKey 'MSSQL (ColumnInfo 'MSSQL)) -> m (Either QErr ()) Source #
createMissingSQLTriggers :: (MonadIO m, MonadError QErr m, MonadBaseControl IO m) => SQLGenCtx -> MSSQLSourceConfig -> TableName -> ([ColumnInfo 'MSSQL], Maybe (PrimaryKey 'MSSQL (ColumnInfo 'MSSQL))) -> TriggerName -> TriggerOnReplication -> TriggerOpsDef 'MSSQL -> m () Source #
unlockEventsInSource :: MonadIO m => MSSQLSourceConfig -> NESet EventId -> m (Either QErr Int) Source #
checkIfTriggerExists :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerName -> HashSet Ops -> m Bool Source #
dropTriggerQ :: TriggerName -> SchemaName -> TxE QErr () Source #
qualifyTableName :: TableName -> Text Source #
addCleanupSchedules :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> [(TriggerName, AutoTriggerLogCleanupConfig)] -> m () Source #
Add cleanup logs for given trigger names and cleanup configs. This will perform the following steps:
- Get last scheduled cleanup event and count.
- If count is less than 5, then add add more cleanup logs, else do nothing
deleteAllScheduledCleanups :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerName -> m () Source #
deleteAllScheduledCleanups
deletes all scheduled cleanup logs for a given event trigger
getCleanupEventsForDeletion :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> m [(Text, TriggerName)] Source #
getCleanupEventsForDeletion
returns the cleanup logs that are to be deleted.
This will perform the following steps:
- Get the scheduled cleanup events that were scheduled before current time.
- If there are multiple entries for the same trigger name with different scheduled time, then fetch the latest entry and mark others as dead.
updateCleanupEventStatusToDead :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> [Text] -> m () Source #
updateCleanupEventStatusToPaused :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> Text -> m () Source #
updateCleanupEventStatusToPaused
updates the cleanup log status to paused
if the event trigger configuration is paused.
updateCleanupEventStatusToCompleted :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> Text -> DeletedEventLogStats -> m () Source #
updateCleanupEventStatusToCompleted
updates the cleanup log status after the event logs are deleted.
This will perform the following steps:
- Updates the cleanup config status to
completed
. - Updates the number of event logs and event invocation logs that were deleted for a trigger name
deleteEventTriggerLogs :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> TriggerLogCleanupConfig -> IO (Maybe (TriggerLogCleanupConfig, EventTriggerCleanupStatus)) -> m DeletedEventLogStats Source #
deleteEventTriggerLogs
deletes the event logs (and event invocation logs) based on the cleanup configuration given
This will perform the following steps:
- Select all the dead events based on criteria set in the cleanup config.
- Lock the events in the database so that other HGE instances don't pick them up for deletion.
- Based on the config, perform the delete action.
fetchEventLogs :: (MonadIO m, MonadError QErr m) => MSSQLSourceConfig -> GetEventLogs b -> m [EventLog] Source #
fetchEventInvocationLogs :: (MonadError QErr m, MonadIO m) => MSSQLSourceConfig -> GetEventInvocations b -> m [EventInvocationLog] Source #
fetchEventById :: (MonadError QErr m, MonadIO m) => MSSQLSourceConfig -> GetEventById b -> m EventLogWithInvocations Source #