From 55c31667142133b810439c81010a273befb6f764 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 1 Nov 2005 04:02:31 +0000 Subject: [PATCH] --- test/select.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/select.py b/test/select.py index d66c232cfe..3c626eaf9d 100644 --- a/test/select.py +++ b/test/select.py @@ -124,13 +124,15 @@ sq.myothertable_othername AS sq_myothertable_othername FROM (" + sqstring + ") s ) def testor(self): + self.runtest( select([table], and_( table.c.id == 12, or_(table2.c.name=='asdf', table2.c.name == 'foo', table2.c.id == 9), "sysdate() = today()", )), - "SELECT mytable.myid, mytable.name, mytable.description FROM mytable, myothertable WHERE mytable.myid = :mytable_myid AND (myothertable.othername = :myothertable_othername OR myothertable.othername = :myothertable_othername_1 OR myothertable.otherid = :myothertable_otherid) AND sysdate() = today()" + "SELECT mytable.myid, mytable.name, mytable.description FROM mytable, myothertable WHERE mytable.myid = :mytable_myid AND (myothertable.othername = :myothertable_othername OR myothertable.othername = :myothertable_othername_1 OR myothertable.otherid = :myothertable_otherid) AND sysdate() = today()", + checkparams = {'myothertable_othername': 'asdf', 'myothertable_othername_1':'foo', 'myothertable_otherid': 9, 'mytable_myid': 12} ) @@ -154,7 +156,7 @@ sq.myothertable_othername AS sq_myothertable_othername FROM (" + sqstring + ") s # create a select for a join of two tables. use_labels means the column names will have # labels tablename_columnname, which become the column keys accessible off the Selectable object. # also, only use one column from the second table and all columns from the first table. - q = select([table, table2.c.id], table.c.id == table2.c.id, use_labels = True) + q = select([table, table2.c.id], table.c.id == table2.c.id, use_labels = False) # make an alias of the "selectable". column names stay the same (i.e. the labels), table name "changes" to "t2view". a = alias(q, 't2view') -- 2.47.2