MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / formatUpdateExpression

Method formatUpdateExpression

cmd/gosqlx/cmd/sql_formatter.go:991–997  ·  view source on GitHub ↗
(update *ast.UpdateExpression)

Source from the content-addressed store, hash-verified

989}
990
991func (f *SQLFormatter) formatUpdateExpression(update *ast.UpdateExpression) error {
992 if err := f.formatExpression(update.Column); err != nil {
993 return err
994 }
995 f.builder.WriteString(" = ")
996 return f.formatExpression(update.Value)
997}
998
999func (f *SQLFormatter) formatColumnDef(col *ast.ColumnDef) {
1000 f.builder.WriteString(col.Name + " " + col.Type)

Callers 1

formatUpdateMethod · 0.95

Calls 1

formatExpressionMethod · 0.95

Tested by

no test coverage detected