| 219 | |
| 220 | |
| 221 | class Ord(Transform): |
| 222 | function = "ASCII" |
| 223 | lookup_name = "ord" |
| 224 | output_field = IntegerField() |
| 225 | |
| 226 | def as_mysql(self, compiler, connection, **extra_context): |
| 227 | return super().as_sql(compiler, connection, function="ORD", **extra_context) |
| 228 | |
| 229 | def as_sqlite(self, compiler, connection, **extra_context): |
| 230 | return super().as_sql(compiler, connection, function="UNICODE", **extra_context) |
| 231 | |
| 232 | |
| 233 | class Repeat(Func): |