typesafe query outline