Added support for attaching queries to single row queries