kopia lustrzana https://github.com/mkdryden/telegram-stats-bot
Allow quotes in lquery parameters
rodzic
e171d4b579
commit
12eb2d7fec
|
@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
|
||||
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
|
||||
|
||||
----------
|
||||
Unreleased
|
||||
----------
|
||||
Fixed
|
||||
-----
|
||||
- Allow quotes in lquery parameters
|
||||
|
||||
---------------------
|
||||
`0.4.0`_ - 2021-06-06
|
||||
---------------------
|
||||
|
@ -66,4 +73,4 @@ Fixed
|
|||
.. _0.2.0: https://github.com/mkdryden/telegram-stats-bot/releases/tag/v0.2.0
|
||||
.. _0.3.0: https://github.com/mkdryden/telegram-stats-bot/releases/tag/v0.3.0
|
||||
.. _0.3.1: https://github.com/mkdryden/telegram-stats-bot/releases/tag/v0.3.1
|
||||
.. _0.3.1: https://github.com/mkdryden/telegram-stats-bot/releases/tag/v0.4.0
|
||||
.. _0.4.0: https://github.com/mkdryden/telegram-stats-bot/releases/tag/v0.4.0
|
||||
|
|
|
@ -99,7 +99,7 @@ The bot is still in active development but at the moment, it features:
|
|||
Basic Requirements
|
||||
------------------
|
||||
|
||||
- Python 3.7+
|
||||
- Python 3.8+
|
||||
|
||||
- A Telegram bot token with privacy mode disabled (needed to log messages)
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ class StatsRunner(object):
|
|||
raise HelpException(f'n must be greater than 0, got: {n}')
|
||||
|
||||
if lquery:
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery('{lquery}')")
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery( $${lquery}$$ )")
|
||||
|
||||
if start:
|
||||
sql_dict['start_dt'] = pd.to_datetime(start)
|
||||
|
@ -199,7 +199,7 @@ class StatsRunner(object):
|
|||
sql_dict = {}
|
||||
|
||||
if lquery:
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery('{lquery}')")
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery( $${lquery}$$ )")
|
||||
|
||||
if start:
|
||||
sql_dict['start_dt'] = pd.to_datetime(start)
|
||||
|
@ -290,7 +290,7 @@ class StatsRunner(object):
|
|||
sql_dict = {}
|
||||
|
||||
if lquery:
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery('{lquery}')")
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery( $${lquery}$$ )")
|
||||
|
||||
if start:
|
||||
sql_dict['start_dt'] = pd.to_datetime(start)
|
||||
|
@ -374,7 +374,7 @@ class StatsRunner(object):
|
|||
sql_dict = {}
|
||||
|
||||
if lquery:
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery('{lquery}')")
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery( $${lquery}$$ )")
|
||||
|
||||
if start:
|
||||
sql_dict['start_dt'] = pd.to_datetime(start)
|
||||
|
@ -459,7 +459,7 @@ class StatsRunner(object):
|
|||
raise HelpException("averages must be >= 0")
|
||||
|
||||
if lquery:
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery('{lquery}')")
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery( $${lquery}$$ )")
|
||||
|
||||
if start:
|
||||
sql_dict['start_dt'] = pd.to_datetime(start)
|
||||
|
@ -744,7 +744,7 @@ class StatsRunner(object):
|
|||
sql_dict = {}
|
||||
|
||||
if lquery:
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery('{lquery}')")
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery( $${lquery}$$ )")
|
||||
|
||||
if start:
|
||||
sql_dict['start_dt'] = pd.to_datetime(start)
|
||||
|
@ -893,7 +893,7 @@ class StatsRunner(object):
|
|||
sql_dict = {}
|
||||
|
||||
if lquery:
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery('{lquery}')")
|
||||
query_conditions.append(f"text_index_col @@ to_tsquery( $${lquery}$$ )")
|
||||
|
||||
if user:
|
||||
sql_dict['user'] = user[0]
|
||||
|
|
Ładowanie…
Reference in New Issue