diff --git a/dialect/sql/builder.go b/dialect/sql/builder.go index c47f6e3e0..89e8cc747 100644 --- a/dialect/sql/builder.go +++ b/dialect/sql/builder.go @@ -3835,7 +3835,7 @@ func (b *Builder) unquote(s string) string { return s } -// isIdent reports if the given string is a qualified identifier. +// isQualified reports if the given string is a qualified identifier. func (b *Builder) isQualified(s string) bool { ident, pg := b.isIdent(s), b.postgres() return !ident && len(s) > 2 && strings.ContainsRune(s[1:len(s)-1], '.') || // . diff --git a/entc/gen/graph.go b/entc/gen/graph.go index 8d40637e9..9de896cf2 100644 --- a/entc/gen/graph.go +++ b/entc/gen/graph.go @@ -820,7 +820,7 @@ func fkSymbols(e *Edge, c1, c2 *schema.Column) (string, string) { return s1, s2 } -// ensureUniqueNames ensures constraint names are unique. +// ensureUniqueFKs ensures constraint names are unique. func ensureUniqueFKs(tables map[string]*schema.Table) error { fks := make(map[string]*schema.Table) for _, t := range tables { diff --git a/entc/gen/type.go b/entc/gen/type.go index 1b0628c4b..c062b3a21 100644 --- a/entc/gen/type.go +++ b/entc/gen/type.go @@ -754,7 +754,7 @@ func (t *Type) setupFKs() error { return nil } -// setupEdgeField check the field-edge validity and configures it and its foreign-key. +// setupFieldEdge check the field-edge validity and configures it and its foreign-key. func (t *Type) setupFieldEdge(fk *ForeignKey, fkOwner *Edge, fkName string) error { tf, ok := t.fields[fkName] if !ok { @@ -1513,7 +1513,7 @@ func (f Field) ScanTypeField(rec string) string { return expr } -// standardSQLType reports if the field is one of the standard SQL types. +// standardNullType reports if the field is one of the standard SQL types. func (f Field) standardNullType() bool { for _, t := range []reflect.Type{ nullBoolType,