| 2900 | ) |
| 2901 | |
| 2902 | def test_via_column(self, connection): |
| 2903 | c1, c2, c3, c4 = column("q"), column("p"), column("r"), column("d") |
| 2904 | stmt = text("select a, b, c, d from text1").columns(c1, c2, c3, c4) |
| 2905 | |
| 2906 | result = connection.execute(stmt) |
| 2907 | row = result.first() |
| 2908 | |
| 2909 | eq_(row._mapping[c2], "b1") |
| 2910 | eq_(row._mapping[c4], "d1") |
| 2911 | eq_(row[1], "b1") |
| 2912 | eq_(row._mapping["b"], "b1") |
| 2913 | eq_(list(row._mapping.keys()), ["a", "b", "c", "d"]) |
| 2914 | eq_(row._fields, ("a", "b", "c", "d")) |
| 2915 | eq_(row._mapping["r"], "c1") |
| 2916 | eq_(row._mapping["d"], "d1") |
| 2917 | |
| 2918 | def test_fewer_cols_than_sql_positional(self, connection): |
| 2919 | c1, c2 = column("q"), column("p") |