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 request: Generate entities (structs) from database #1589
Comments
This comment has been minimized.
|
|
This comment has been minimized.
flip111
commented
Mar 6, 2018
I see the |
This comment has been minimized.
|
Do you mean Queryable structs ? You don't. You have to write them yourself. |
This comment has been minimized.
flip111
commented
Mar 6, 2018
|
queryable and insertable ... it would be nice if this code can be generated |
This comment has been minimized.
|
IMO this is out of the scope of diesel and since SQL types aren't |
This comment has been minimized.
flip111
commented
Mar 6, 2018
|
It's possible but with the caveat that is described in the symfony link
Same for type mapping ... a best guess could be done. I think since already the schema can be printed it shouldn't be too hard to print the rust structs as well. I have no rust experience though, for me it will be hard in this point of time. I will close this because it's considered out of scope for diesel itself. |
flip111
closed this
Mar 6, 2018
flip111
referenced this issue
Mar 6, 2018
Closed
Feature request: Table migration based on structs #1590
This comment has been minimized.
dereckson
commented
Aug 22, 2018
•
|
If someone is looking for such feature, |
flip111 commentedMar 6, 2018
•
edited
I have an existing database with tables, it would be very nice if diesel could inspect the database and generate the rust code for the models. Here is an example of the process using a different language and orm https://symfony.com/doc/current/doctrine/reverse_engineering.html