MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / define_constraint_preamble

Method define_constraint_preamble

lib/sqlalchemy/sql/compiler.py:7492–7500  ·  view source on GitHub ↗
(
        self, constraint: Constraint, **kw: Any
    )

Source from the content-addressed store, hash-verified

7490 return text
7491
7492 def define_constraint_preamble(
7493 self, constraint: Constraint, **kw: Any
7494 ) -> str:
7495 text = ""
7496 if constraint.name is not None:
7497 formatted_name = self.preparer.format_constraint(constraint)
7498 if formatted_name is not None:
7499 text += "CONSTRAINT %s " % formatted_name
7500 return text
7501
7502 def define_primary_key_body(
7503 self, constraint: PrimaryKeyConstraint, **kw: Any

Calls 1

format_constraintMethod · 0.80

Tested by

no test coverage detected