Re: Creating database tables from queries based on ORM API?
Oleg Broytman <[email protected]> Tue, 16 Apr 2019 11:56:32 +0200
| Newsgroups | gmane.comp.python.sqlobject |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Apr 16, 2019 at 11:40:37AM +0200, Markus Elfring <[email protected]> wrote: > >> How do you think about the clarification for additional classes? > > > > Sorry, I don't understand. > > You indicated the possibility to add two methods directly > to the class ???SQLObject??? (as a design sketch). > Will it become more helpful to extend the corresponding class hierarchy? Ah, I see, tnx. No, I don't see a reason for a new class. New class could override existing methods but we're talking about new method(s) so why not add them just to SQLObject's main class? > > SQLObject does some limited introspection. > > Would you like to improve the software situation in this area? I'll be glad to accept pull requests or patches in any area in SQLObject. > > It can determine if a table exists[1] and get the list[2][3] of columns and joins. > > Such functionality might be sufficient for my data analysis needs > while I can get more concerned also about other software limitations > (or requirements). > > Can the name be automatically determined for a dynamically generated > database table? No. In SQLObject you have to have a name. You can generate the name dynamically or you can list tables[1] and filter the list. 1. https://github.com/sqlobject/sqlobject/blob/ed64be0ed032055b0a6613fe3051d83a74ded566/sqlobject/postgres/pgconnection.py#L525 > Regards, > Markus Oleg. -- Oleg Broytman https://phdru.name/ [email protected] Programmers don't die, they just GOSUB without RETURN.