dialect/sql: minor comment fixes (#687)

This commit is contained in:
Ariel Mashraki
2020-08-23 20:48:56 +03:00
committed by GitHub
parent e30adfc601
commit ae7ba0b43c
2 changed files with 3 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ import (
)
// ColumnScanner is the interface that wraps the
// three sql.Rows methods used for scanning.
// four sql.Rows methods used for scanning.
type ColumnScanner interface {
Next() bool
Scan(...interface{}) error

View File

@@ -17,7 +17,7 @@ import (
"github.com/facebook/ent/schema/field"
)
// MySQL is a mysql migration driver.
// MySQL is a MySQL migration driver.
type MySQL struct {
dialect.Driver
version string
@@ -238,7 +238,7 @@ func (d *MySQL) cType(c *Column) (t string) {
t = c.scanTypeOr("double")
case field.TypeTime:
t = c.scanTypeOr("timestamp")
// In MySQL, timestamp columns are `NOT NULL by default, and assigning NULL
// In MySQL, timestamp columns are `NOT NULL` by default, and assigning NULL
// assigns the current_timestamp(). We avoid this if not set otherwise.
c.Nullable = c.Attr == ""
case field.TypeEnum: