(self)
| 1112 | ) |
| 1113 | |
| 1114 | def test_extract(self): |
| 1115 | t = sql.table("t", sql.column("col1")) |
| 1116 | |
| 1117 | for field in "year", "month", "day": |
| 1118 | self.assert_compile( |
| 1119 | select(extract(field, t.c.col1)), |
| 1120 | "SELECT EXTRACT(%s FROM t.col1) AS anon_1 FROM t" % field, |
| 1121 | ) |
| 1122 | |
| 1123 | # milliseconds to millisecond |
| 1124 | self.assert_compile( |
| 1125 | select(extract("milliseconds", t.c.col1)), |
| 1126 | "SELECT EXTRACT(millisecond FROM t.col1) AS anon_1 FROM t", |
| 1127 | ) |
| 1128 | |
| 1129 | def test_too_long_index(self): |
| 1130 | exp = "ix_zyrenian_zyme_zyzzogeton_zyzzogeton_zyrenian_zyme_zyz_5cd2" |
nothing calls this directly
no test coverage detected