(start, end, nb_values)
| 257 | |
| 258 | @staticmethod |
| 259 | def _get_bounds(start, end, nb_values): |
| 260 | order = "ASC" |
| 261 | |
| 262 | if start is None or start == ua.get_win_epoch(): |
| 263 | order = "DESC" |
| 264 | start = ua.get_win_epoch() |
| 265 | |
| 266 | if end is None or end == ua.get_win_epoch(): |
| 267 | end = datetime.utcnow() + timedelta(days=1) |
| 268 | |
| 269 | if start < end: |
| 270 | start_time = start.isoformat(' ') |
| 271 | end_time = end.isoformat(' ') |
| 272 | else: |
| 273 | order = "DESC" |
| 274 | start_time = end.isoformat(' ') |
| 275 | end_time = start.isoformat(' ') |
| 276 | |
| 277 | if nb_values: |
| 278 | limit = nb_values + 1 # add 1 to the number of values for retrieving a continuation point |
| 279 | else: |
| 280 | limit = -1 # in SQLite a LIMIT of -1 returns all results |
| 281 | |
| 282 | return start_time, end_time, order, limit |
| 283 | |
| 284 | def _format_event(self, event): |
| 285 | """ |
no outgoing calls
no test coverage detected