MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Format

Method Format

postgres/parser/sem/tree/alter_table.go:850–863  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

848
849// Format implements the NodeFormatter interface.
850func (node *AlterTableTrigger) Format(ctx *FmtCtx) {
851 if node.Disable {
852 ctx.WriteString(" DISABLE")
853 } else {
854 ctx.WriteString(" ENABLE")
855 }
856 if node.IsReplica {
857 ctx.WriteString(" REPLICA")
858 } else if node.IsAlways {
859 ctx.WriteString(" ALWAYS")
860 }
861 ctx.WriteString(" TRIGGER")
862 ctx.FormatNameP(&node.Trigger)
863}
864
865// AlterTableValidateConstraint represents a VALIDATE CONSTRAINT command.
866type AlterTableValidateConstraint struct {

Callers

nothing calls this directly

Calls 2

WriteStringMethod · 0.80
FormatNamePMethod · 0.80

Tested by

no test coverage detected