Replies: 1 comment 3 replies
-
Hi David. I just checked, and the database adapter supports bytes, so adding it shouldn't be too hard. What use cases do you envisage for a binary column type? Compound uniqueness constraints shouldn't be too bad. There are a few APIs I can imagine: # option 1
class MyTable(Table, constraints=[Unique('name', 'address')]):
name = Varchar()
address = Text()
# option 2
class MyTable(Table):
name = Varchar(unique_with=['address'])
address = Text()
# option 3
class MyTable(Table):
name = Varchar()
address = Text()
MyTable.constraints.append(Unique(MyTable.name, MyTable.address)) Can you think of any others? My preference is to use direct references to column instances, rather than strings where possible (i.e. I think multicolumn indexes would follow a similar design pattern. There's a list of other features in the roadmap. I don't think an ORM is ever really finished - there's always more stuff to add, especially with Postgres! I just need to prioritise what's most important. I'm interested to hear your thoughts. |
Beta Was this translation helpful? Give feedback.
-
Hello 👋
I wanted to start off discussing a few features that I would love to see in piccolo and see whether they were valuable to the rest of the community.
Here's my preliminary list:
bytes
and other BLOBSFeel free to add more!
Beta Was this translation helpful? Give feedback.
All reactions