Project

General

Profile

Actions

Feature #2263

closed

sinedon query by timestamp range

Added by Jim Pulokas almost 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Sinedon
Start date:
02/26/2013
Due date:
% Done:

0%

Estimated time:
Deliverable:

Description

We already have the "timelimit" parameter to a query, which tells it to return the most recent results going back to the given number of days. I want something more general to give it an exact range (minimum, maximum) of timestamps to return.

Actions #1

Updated by Jim Pulokas almost 12 years ago

  • Status changed from Assigned to In Code Review
  • Assignee changed from Jim Pulokas to Anchi Cheng

The existing usage was

object.query(..., timelimit='-10 0:0:0')
where the string is a valid time parameter for the mysql DATE_ADD function.

I have extended the timelimit parameter in r17417. It is still a string, to minimize the changes in sinedon, but now the string can contain two timestamps separated by a tab (\t character). For example:

object.query(..., timelimit='20130215000000\t20130220000000')
Or you can use a a function like "NOW" in place of either of the timestamps, for example
object.query(..., timelimit='20130215000000\tNOW()')
which really means this new syntax can be used in place of the old one.

Behind the scenes, this is inserting your two timestamps (or functions) into the mysql query like this example:

... DEF_timestamp BETWEEN 20130215000000 AND 20130220000000... 

Actions #2

Updated by Anchi Cheng over 11 years ago

  • Status changed from In Code Review to Closed

reviewed and tested

Actions #3

Updated by Anchi Cheng about 11 years ago

  • Target version set to Appion/Leginon 3.0.0
Actions

Also available in: Atom PDF