Merge UnsafeMonadQuery and MonadQuery.