| 150 | ) |
| 151 | |
| 152 | def test_join_with_hint(self): |
| 153 | t1 = table( |
| 154 | "t1", |
| 155 | column("a", Integer), |
| 156 | column("b", String), |
| 157 | column("c", String), |
| 158 | ) |
| 159 | t2 = table( |
| 160 | "t2", |
| 161 | column("a", Integer), |
| 162 | column("b", Integer), |
| 163 | column("c", Integer), |
| 164 | ) |
| 165 | join = ( |
| 166 | t1.join(t2, t1.c.a == t2.c.a) |
| 167 | .select() |
| 168 | .with_hint(t1, "WITH (NOLOCK)") |
| 169 | ) |
| 170 | self.assert_compile( |
| 171 | join, |
| 172 | "SELECT t1.a, t1.b, t1.c, t2.a AS a_1, t2.b AS b_1, t2.c AS c_1 " |
| 173 | "FROM t1 WITH (NOLOCK) JOIN t2 ON t1.a = t2.a", |
| 174 | ) |
| 175 | |
| 176 | def test_insert(self): |
| 177 | t = table("sometable", column("somecolumn")) |