Wrap query in `text()`

Otherwise, SQLAlchemy couldn't handle `connection.execute` with a
SQL `LIKE` statement (because of the `%`).