We should have reflection for PG ENUM in there already. SP names and such, there's no "stored procedure" object, so if you wanted it to look like the thing you see here you'd make a StoredProcedure() class that's a subclass of DDLElement, etc. I don't know that there's a hook to add new methods to the Inspector() as of yet though. If you're just looking for a "drop everything" method I'd probably forego all that boilerplate and just have "drop_pg_sps", "drop_mysql_sps", etc. functions and key them off of engine.name in a dictionary or something.



On 08/15/2016 06:16 AM, Chris Withers wrote:
Hi All,

What's the best way (preferably database agnostic) to reflect stored
procedure names, enums names and other non-table-specific items?

I'm trying to improve this function, which is based on Mike's original
recipe:

https://github.com/Mortar/mortar_rdb/blob/eb99d549be02643d4d670db2ee52b93b0c386fb4/mortar_rdb/__init__.py#L134


I'd like to expand to to basically delete as much as possible in a
database to give a clean starting ground for tests...

Chris


--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to