コード例 #1
0
ファイル: base.py プロジェクト: datnguyen0606/storm
 def test_expr_endswith(self):
     self.connection.execute("INSERT INTO test VALUES (30, 'blah_%!!')")
     self.connection.execute("INSERT INTO test VALUES (40, 'blah!!')")
     id = Column("id", SQLToken("test"))
     title = Column("title", SQLToken("test"))
     expr = Select(id, title.endswith(u"_%!!"))
     result = list(self.connection.execute(expr))
     self.assertEquals(result, [(30,)])
コード例 #2
0
ファイル: base.py プロジェクト: olivecoder/mamba-storm
 def test_expr_endswith(self):
     self.connection.execute("INSERT INTO test VALUES (30, 'blah_%!!')")
     self.connection.execute("INSERT INTO test VALUES (40, 'blah!!')")
     id = Column("id", SQLToken("test"))
     title = Column("title", SQLToken("test"))
     expr = Select(id, title.endswith(u"_%!!"))
     result = list(self.connection.execute(expr))
     self.assertEquals(result, [(30, )])