server/test/unittest_rql2sql.py
branchstable
changeset 9769 d3f8866a48f5
parent 9361 0542a85fe667
parent 9678 c34f0cee89b7
child 10475 a1e8dbb7215b
equal deleted inserted replaced
9767:b0b03ac1d03a 9769:d3f8866a48f5
  1880 
  1880 
  1881     def test_today(self):
  1881     def test_today(self):
  1882         for t in self._parse([("Any X WHERE X creation_date TODAY, X is Affaire",
  1882         for t in self._parse([("Any X WHERE X creation_date TODAY, X is Affaire",
  1883                         '''SELECT _X.cw_eid
  1883                         '''SELECT _X.cw_eid
  1884 FROM cw_Affaire AS _X
  1884 FROM cw_Affaire AS _X
  1885 WHERE DATE(_X.cw_creation_date)=CURRENT_DATE'''),
  1885 WHERE DATE(_X.cw_creation_date)=%s''' % self.dbhelper.sql_current_date()),
  1886 
  1886 
  1887                        ("Personne P where not P datenaiss TODAY",
  1887                        ("Personne P where not P datenaiss TODAY",
  1888                         '''SELECT _P.cw_eid
  1888                         '''SELECT _P.cw_eid
  1889 FROM cw_Personne AS _P
  1889 FROM cw_Personne AS _P
  1890 WHERE NOT (DATE(_P.cw_datenaiss)=CURRENT_DATE)'''),
  1890 WHERE NOT (DATE(_P.cw_datenaiss)=%s)''' % self.dbhelper.sql_current_date()),
  1891                        ]):
  1891                        ]):
  1892             yield t
  1892             yield t
  1893 
  1893 
  1894 
  1894 
  1895 class SqliteSQLGeneratorTC(PostgresSQLGeneratorTC):
  1895 class SqliteSQLGeneratorTC(PostgresSQLGeneratorTC):