(self)
| 1274 | ) |
| 1275 | |
| 1276 | def test_extract(self): |
| 1277 | t = sql.table("t", sql.column("col1")) |
| 1278 | |
| 1279 | for field in "year", "month", "day": |
| 1280 | self.assert_compile( |
| 1281 | select(extract(field, t.c.col1)), |
| 1282 | "SELECT EXTRACT(%s FROM t.col1) AS anon_1 FROM t" % field, |
| 1283 | ) |
| 1284 | |
| 1285 | # milliseconds to millisecond |
| 1286 | self.assert_compile( |
| 1287 | select(extract("milliseconds", t.c.col1)), |
| 1288 | "SELECT EXTRACT(millisecond FROM t.col1) AS anon_1 FROM t", |
| 1289 | ) |
| 1290 | |
| 1291 | def test_too_long_index(self): |
| 1292 | exp = "ix_zyrenian_zyme_zyzzogeton_zyzzogeton_zyrenian_zyme_zyz_5cd2" |
nothing calls this directly
no test coverage detected