add spec for query generator