Compare query as string to be compatible with driver 2.11.x