support for query wrapper in torque layer