Gotcha, would there be any interest in adding StoredProcedure objects?
For the immediate need of "drop everything", your suggestion sounds like
the best way forward, but I wonder if solving the more generic
"reflecting stored procedures" problem might help with other things...
Have any tools emerged for comparing two databases' schemas? I guess the
stuff used to auto-generate migrations must largely solve this problem?
Sorry, I'm a bit rambly this morning...
On 15/08/2016 14:38, Mike Bayer wrote:
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.