Added bindkey to _DebugQueryTuple and creating functions

The _DebugQueryTuple now contains the bind key used for the query.