query method

added methods to query database. queries added for clock at time, clock
between range, actor, other actor, direction of message and message