Added ulong support for queries