func (f *File) FromRows(rows *sql.Rows) error {
	var scanf struct {
		ID          int
		CreateTime  sql.NullTime
		UpdateTime  sql.NullTime
		Type        sql.NullString
		Name        sql.NullString
		Size        sql.NullInt64
		ModifiedAt  sql.NullTime
		UploadedAt  sql.NullTime
		ContentType sql.NullString
		StoreKey    sql.NullString
		Category    sql.NullString
	}
	// the order here should be the same as in the `file.Columns`.
	if err := rows.Scan(
		&scanf.ID,
		&scanf.CreateTime,
		&scanf.UpdateTime,
		&scanf.Type,
		&scanf.Name,
		&scanf.Size,
		&scanf.ModifiedAt,
		&scanf.UploadedAt,
		&scanf.ContentType,
		&scanf.StoreKey,
		&scanf.Category,
	); err != nil {
		return err
	}
	f.ID = strconv.Itoa(scanf.ID)
	f.CreateTime = scanf.CreateTime.Time
	f.UpdateTime = scanf.UpdateTime.Time
	f.Type = scanf.Type.String
	f.Name = scanf.Name.String
	f.Size = int(scanf.Size.Int64)
	f.ModifiedAt = scanf.ModifiedAt.Time
	f.UploadedAt = scanf.UploadedAt.Time
	f.ContentType = scanf.ContentType.String
	f.StoreKey = scanf.StoreKey.String
	f.Category = scanf.Category.String
	return nil
}
// FromRows scans the sql response data into File.
FromRows scans the sql response data into File.
// FromRows scans the sql response data into File .
func (f *File) FromRows(rows *sql.Rows) error {
	var scanf struct {
		ID          int
		CreateTime  sql.NullTime
		UpdateTime  sql.NullTime
		Type        sql.NullString
		Name        sql.NullString
		Size        sql.NullInt64
		ModifiedAt  sql.NullTime
		UploadedAt  sql.NullTime
		ContentType sql.NullString
		StoreKey    sql.NullString
		Category    sql.NullString
	}
	if err := rows.Scan(
		&scanf.ID,
		&scanf.CreateTime,
		&scanf.UpdateTime,
		&scanf.Type,
		&scanf.Name,
		&scanf.Size,
		&scanf.ModifiedAt,
		&scanf.UploadedAt,
		&scanf.ContentType,
		&scanf.StoreKey,
		&scanf.Category,
	); err != nil {
		return err
	}
	f.ID = strconv.Itoa(scanf.ID)
	f.CreateTime = scanf.CreateTime.Time
	f.UpdateTime = scanf.UpdateTime.Time
	f.Type = scanf.Type.String
	f.Name = scanf.Name.String
	f.Size = int(scanf.Size.Int64)
	f.ModifiedAt = scanf.ModifiedAt.Time
	f.UploadedAt = scanf.UploadedAt.Time
	f.ContentType = scanf.ContentType.String
	f.StoreKey = scanf.StoreKey.String
	f.Category = scanf.Category.String
	return nil
}
func ( f * File ) FromRows ( rows * sql . Rows ) error { var scanf struct { ID int CreateTime sql . NullTime UpdateTime sql . NullTime Type sql . NullString Name sql . NullString Size sql . NullInt64 ModifiedAt sql . NullTime UploadedAt sql . NullTime ContentType sql . NullString StoreKey sql . NullString Category sql . NullString } if err := rows . Scan ( & scanf . ID , & scanf . CreateTime , & scanf . UpdateTime , & scanf . Type , & scanf . Name , & scanf . Size , & scanf . ModifiedAt , & scanf . UploadedAt , & scanf . ContentType , & scanf . StoreKey , & scanf . Category , ) ; err != nil { return err } f . ID = strconv . Itoa ( scanf . ID ) f . CreateTime = scanf . CreateTime . Time f . UpdateTime = scanf . UpdateTime . Time f . Type = scanf . Type . String f . Name = scanf . Name . String f . Size = int ( scanf . Size . Int64 ) f . ModifiedAt = scanf . ModifiedAt . Time f . UploadedAt = scanf . UploadedAt . Time f . ContentType = scanf . ContentType . String f . StoreKey = scanf . StoreKey . String f . Category = scanf . Category . String return nil }
FromRows scans the sql response data into File.
FromRows scans the sql response data into File .
// the order here should be the same as in the `file.Columns`.