Skip to content

Commit

Permalink
End date is now inclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
Samwalton9 committed Jan 23, 2018
1 parent 64fcab5 commit 8ef1587
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dal.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_hashtags(self,
WHERE ht.ht_text = ?
AND rc.htrc_lang LIKE ?
AND rc.rc_timestamp/1000000 > ?
AND rc.rc_timestamp/1000000 < ?
AND rc.rc_timestamp/1000000 <= ?
ORDER BY rc.rc_timestamp DESC
LIMIT ?, ?'''
params = (tag, lang, startdate, enddate, start, end)
Expand Down Expand Up @@ -115,7 +115,7 @@ def get_all_hashtags(self,
AND ht.ht_text REGEXP '[[:alpha:]]+'
AND CHAR_LENGTH(ht.ht_text) > 1
AND rc.rc_timestamp/1000000 > ?
AND rc.rc_timestamp/1000000 < ?
AND rc.rc_timestamp/1000000 <= ?
ORDER BY rc.rc_id DESC
LIMIT ?, ?''' % ', '.join(['?' for i in range(len(EXCLUDED))])
params = (lang,) + EXCLUDED + (startdate,) + (enddate,) + (start, end)
Expand Down Expand Up @@ -198,7 +198,7 @@ def get_hashtag_stats(self,
WHERE ht.ht_text = ?
AND rc.htrc_lang LIKE ?
AND rc.rc_timestamp/1000000 > ?
AND rc.rc_timestamp/1000000 < ?
AND rc.rc_timestamp/1000000 <= ?
ORDER BY rc.rc_id DESC'''
params = (tag, lang, startdate, enddate)
with tlog.critical('get_hashtag_stats') as rec:
Expand Down Expand Up @@ -226,7 +226,7 @@ def get_all_hashtag_stats(self, lang=None, startdate=None, enddate=None):
WHERE rc.rc_type = 0
AND rc.htrc_lang LIKE ?
AND rc.rc_timestamp/1000000 > ?
AND rc.rc_timestamp/1000000 < ?
AND rc.rc_timestamp/1000000 <= ?
AND ht.ht_text NOT IN(%s)
AND ht.ht_text REGEXP '[[:alpha:]]+' ''' % ', '.join(['?' for i in range(len(EXCLUDED))])
with tlog.critical('get_all_hashtag_stats') as rec:
Expand Down

0 comments on commit 8ef1587

Please sign in to comment.