MCPcopy
hub / github.com/django/django / get_constraints

Method get_constraints

tests/schema/tests.py:223–228  ·  view source on GitHub ↗

Get the constraints on a table using a new cursor.

(self, table)

Source from the content-addressed store, hash-verified

221 ]
222
223 def get_constraints(self, table):
224 """
225 Get the constraints on a table using a new cursor.
226 """
227 with connection.cursor() as cursor:
228 return connection.introspection.get_constraints(cursor, table)
229
230 def get_constraints_for_column(self, model, column_name):
231 constraints = self.get_constraints(model._meta.db_table)

Calls 1

cursorMethod · 0.80

Tested by

no test coverage detected