Beispiel #1
0
 def test_date(self):
     value = date(1977, 4, 5)
     self.connection.execute("INSERT INTO datetime_test (d) VALUES (?)",
                             (value,))
     result = self.connection.execute("SELECT d FROM datetime_test")
     variable = DateVariable()
     result.set_variable(variable, result.get_one()[0])
     self.assertEquals(variable.get(), value)
Beispiel #2
0
 def test_date(self):
     value = date(1977, 4, 5)
     self.connection.execute("INSERT INTO datetime_test (d) VALUES (?)",
                             (value, ))
     result = self.connection.execute("SELECT d FROM datetime_test")
     variable = DateVariable()
     result.set_variable(variable, result.get_one()[0])
     self.assertEquals(variable.get(), value)
Beispiel #3
0
def compile_date(compile, expr, state):
    state.parameters.append(DateVariable(expr))
    return "?"