Open Serjlee opened 3 months ago
Well... now that there is support for views, it should be possible.
The thing would be to read the tables as usual, and then add any table without a primary key to the views.
Thanks for considering it, I'll then try again to write a PR as soon as I have time for it
I know this was already labeled as a "won't do" in https://github.com/volatiletech/sqlboiler/issues/75#issuecomment-265070783, but I recently stumbled upon a proper use case when dealing with Timescale's Hypertables: for those, primary keys degrade performance and have little use, as foreign keys pointing to hypertables are not allowed.
Even without PKs sqlboiler would still be very valuable to provide generated types, constants, where helpers and perform queries in a consistent way.
I found a okay-ish workaround by using a View defined as
select * from my_table_without_pk
, but this causes all columns of the generated type to be nullable, which is quite annoying,Is it something you might plan to reconsider? I tried to implement it myself but so far I failed to produce anything useful