Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature: support tables without a primary key #1661
Comments
This comment has been minimized.
|
This isn't possible until Diesel 2.0. We may eventually try to generalize "data source" as a supertrait of |
sgrif
closed this
Apr 25, 2018
This comment has been minimized.
|
Is that because it would require breaking changes? AFAICT, the only part of diesel currently using knowledge of the primary key is the |
This comment has been minimized.
|
It will require a breaking change because we need do separate @sgrif Maybe we should introduce a diesel 2.0 tag to have a list of things we may want to fix in 2.0? |
This comment has been minimized.
|
Not calling it a I currently have a table which implements a "set" data structure - the "value" is not the primary key because for reasons relating to locking, it is preferable to allow transient duplicate items than to enforce uniqueness (which could cause "insert" operations to have to wait on "remove" transactions, which are slow). |
This comment has been minimized.
|
@Diggsey You can just tell Diesel some random column is the primary key |
This comment has been minimized.
|
Is this planned to be developed for diesel 2.0? (And is diesel 2.0 is planned?) I want to use partitioned tables, which doesn't support primary key. |
This comment has been minimized.
|
I found diesel_cli supports table filtering. |
Diggsey commentedApr 25, 2018
Pretty self explanatory - there's not really a reason to prevent inserting into a table without a primary key. Not supporting operations requiring
Identifiableis fine.