def make_timestamp_query(func, start=None, start_op=None, end=None, end_op=None, bounds_only=False, **kwargs):
 (rts_start, rts_end) = get_start_end_rts(start, end)
 (start_row, end_row) = func(rts_start, rts_end, **kwargs)
 if bounds_only:
  return (start_row, end_row)
 q = []
 start_op = (start_op or 'ge')
 end_op = (end_op or 'lt')
 if rts_start:
  q.append(("SingleColumnValueFilter ('f', 'rts', %s, 'binary:%s')" % (OP_SIGN_REV[start_op], rts_start)))
 if rts_end:
  q.append(("SingleColumnValueFilter ('f', 'rts', %s, 'binary:%s')" % (OP_SIGN_REV[end_op], rts_end)))
 res_q = None
 if len(q):
  res_q = ' AND '.join(q)
 return (start_row, end_row, res_q)

def make_timestamp_query ( func , start = None , start_op = None , end = None , end_op = None , bounds_only = False , ** kwargs ) : ( rts_start , rts_end ) = get_start_end_rts ( start , end ) ( start_row , end_row ) = func ( rts_start , rts_end , ** kwargs ) if bounds_only : return ( start_row , end_row ) q = [ ] start_op = ( start_op or 'ge' ) end_op = ( end_op or 'lt' ) if rts_start : q . append ( ( "SingleColumnValueFilter ('f', 'rts', %s, 'binary:%s')" % ( OP_SIGN_REV [ start_op ] , rts_start ) ) ) if rts_end : q . append ( ( "SingleColumnValueFilter ('f', 'rts', %s, 'binary:%s')" % ( OP_SIGN_REV [ end_op ] , rts_end ) ) ) res_q = None if len ( q ) : res_q = ' AND ' . join ( q ) return ( start_row , end_row , res_q )
return a filter start and stop row for filtering and a query .