예제 #1
0
파일: base.py 프로젝트: datnguyen0606/storm
 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)
예제 #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)
예제 #3
0
def compile_date(compile, expr, state):
    state.parameters.append(DateVariable(expr))
    return "?"