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 upAllow selecting from views #566
Comments
rnewman
referenced this issue
Feb 16, 2017
Closed
[query] Add some algebraic interface for generating SQL #273
This comment has been minimized.
|
You can create the table DSL for views by calling the |
This comment has been minimized.
am0d
commented
Mar 22, 2017
|
Sorry for the slow response. It seems calling the macro myself does solve the problem a little, although I would definitely prefer to have the view inferred for me to ensure at compile time that it matches the definition in the database. |
This comment has been minimized.
|
I was looking at this sort of functionality today as well (using postgres). The quick-and-dirty approach of hacking
It seems introducing inferred views could not be quickly/easily integrated; it would perhaps require the introduction of some trait or abstraction ( |
This comment has been minimized.
|
I'm not sure there's much else that's going to happen on this in the near future. |
am0d commentedJan 3, 2017
I've noticed that Diesel can't
infer_schemafor views. I'd like to see something very similar generated for views as for tables, without (at least at this time) support for updating / inserting rows. But I believe copying all theSELECT/Queryablesupport from tables would provide the support that is needed for now (at least in my use case).I could be interested in working on this myself, if someone could provide me with some pointers on where to start.