writeEffectsRow :: EventLog -> EventId -> ByteString -> RIO e ()
writeEffectsRow log k v = do
    rwith (writeTxn $ env log) $ \txn ->
        putBytes flags txn (effectsTbl log) k v >>= \case
            True  -> pure ()
            False -> throwIO (BadWriteEffect k)
  where
    flags = compileWriteFlags []


-- Read Events -----------------------------------------------------------------
writeEffectsRow :: EventLog -> EventId -> ByteString -> RIO e ()
writeEffectsRow log k v = do
    rwith (writeTxn $ env log) $ \txn ->
        putBytes flags txn (effectsTbl log) k v >>= \case
            True  -> pure ()
            False -> throwIO (BadWriteEffect k)
  where
    flags = compileWriteFlags []


-- Read Events -----------------------------------------------------------------
writeEffectsRow log k v = do
    rwith (writeTxn $ env log) $ \txn ->
        putBytes flags txn (effectsTbl log) k v >>= \case
            True  -> pure ()
            False -> throwIO (BadWriteEffect k)
  where
    flags = compileWriteFlags []


-- Read Events -----------------------------------------------------------------