document table.constraints

Issue #2902 new
Former user created an issue

I was trying to temporarily disable foreign keys for replication, but for the life of me couldn't find how to get the set of ForeignKeyConstraint objects from either Inspector, MetaData, or Table, for the longest time. There's nothing on it from google.

Perhaps it should be exposed in the docs. Are there any reason it is private?

Comments (6)

  1. Former user Account Deleted

    I see. When I filed the ticket it was very late night/early morning so my head wasn't exactly straight. Should've looked at the instance level attributes.

    But anyhow it seems to make sense to expose things like indexes and constraints if foreign_keys is mentioned in the docs. At least a sentence or 2 in the tutorial.

  2. Mike Bayer repo owner

    I'll definitely add docstrings, I do that by placing a class-level variable with a doc that is set to None. Carry on !

  3. Log in to comment