Open fy0 opened 4 years ago
@long2ice Does tortoise-orm have any plan to support it?
After a little time search, maybe filter for blob is unnecessary
After a little time search, maybe filter for blob is unnecessary
No, it's common situation.
For example, when use a distributed id algorithm like snowflake, uuid and so on, blob field is natural choice.
class User:
id = BlobField(primary_key=True)
name = CharField()
class Topic:
title = CharField()
content = TextField()
author = BlobField()
Why not use UUIDField or CharField directly?
Why not use UUIDField or CharField directly?
CharField needs 2x space, and this will cause additional serialization and deserialization.
blob is part of sql standard, if native type works, why not use it?
still can not filter the blob
Describe the bug Can't query by blob fields, can't update blob values.
To Reproduce
Expected behavior Code just works. Actually cause error.
sql generated: SELECT "id","bin" FROM "event" WHERE "bin"=b'aabb'
Additional context