Commit 9c8e06b3 authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

changeset_at: use the sql query builder

parent 2ff3ceb13c1a
......@@ -363,12 +363,17 @@ class timeseries(SeriesServices):
tablename = self._serie_to_tablename(cn, seriename)
assert mode in operators
sql = ('select cset '
f'from "{self.namespace}.timeserie"."{tablename}" as tstable, '
f' "{self.namespace}".changeset as cset '
f'where = tstable.cset '
f'and cset.insertion_date {operators[mode]} %(revdate)s')
return cn.execute(sql, revdate=revdate).scalar()
q = sqlq(
f'"{self.namespace}.timeserie"."{tablename}" as tstable',
f'"{self.namespace}".changeset as cset '
' = tstable.cset',
f'cset.insertion_date {operators[mode]} %(revdate)s',
def rename(self, cn, oldname, newname):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment