@@ -220,7 +220,7 @@ func (db *mysql) SqlType(c *core.Column) string {
220
220
case core .TimeStampz :
221
221
res = core .Char
222
222
c .Length = 64
223
- case core .Enum : //mysql enum
223
+ case core .Enum : // mysql enum
224
224
res = core .Enum
225
225
res += "("
226
226
opts := ""
@@ -229,7 +229,7 @@ func (db *mysql) SqlType(c *core.Column) string {
229
229
}
230
230
res += strings .TrimLeft (opts , "," )
231
231
res += ")"
232
- case core .Set : //mysql set
232
+ case core .Set : // mysql set
233
233
res = core .Set
234
234
res += "("
235
235
opts := ""
@@ -278,10 +278,6 @@ func (db *mysql) Quote(name string) string {
278
278
return "`" + name + "`"
279
279
}
280
280
281
- func (db * mysql ) QuoteStr () string {
282
- return "`"
283
- }
284
-
285
281
func (db * mysql ) SupportEngine () bool {
286
282
return true
287
283
}
@@ -360,7 +356,7 @@ func (db *mysql) GetColumns(tableName string) ([]string, map[string]*core.Column
360
356
var len1 , len2 int
361
357
if len (cts ) == 2 {
362
358
idx := strings .Index (cts [1 ], ")" )
363
- if colType == core .Enum && cts [1 ][0 ] == '\'' { //enum
359
+ if colType == core .Enum && cts [1 ][0 ] == '\'' { // enum
364
360
options := strings .Split (cts [1 ][0 :idx ], "," )
365
361
col .EnumOptions = make (map [string ]int )
366
362
for k , v := range options {
@@ -408,7 +404,7 @@ func (db *mysql) GetColumns(tableName string) ([]string, map[string]*core.Column
408
404
col .IsPrimaryKey = true
409
405
}
410
406
if colKey == "UNI" {
411
- //col.is
407
+ // col.is
412
408
}
413
409
414
410
if extra == "auto_increment" {
@@ -554,12 +550,10 @@ func (db *mysql) CreateTableSql(table *core.Table, tableName, storeEngine, chars
554
550
555
551
if len (charset ) == 0 {
556
552
charset = db .URI ().Charset
557
- }
553
+ }
558
554
if len (charset ) != 0 {
559
555
sql += " DEFAULT CHARSET " + charset
560
556
}
561
-
562
-
563
557
564
558
if db .rowFormat != "" {
565
559
sql += " ROW_FORMAT=" + db .rowFormat
@@ -633,7 +627,7 @@ func (p *mysqlDriver) Parse(driverName, dataSourceName string) (*core.Uri, error
633
627
`\/(?P<dbname>.*?)` + // /dbname
634
628
`(?:\?(?P<params>[^\?]*))?$` ) // [?param1=value1¶mN=valueN]
635
629
matches := dsnPattern .FindStringSubmatch (dataSourceName )
636
- //tlsConfigRegister := make(map[string]*tls.Config)
630
+ // tlsConfigRegister := make(map[string]*tls.Config)
637
631
names := dsnPattern .SubexpNames ()
638
632
639
633
uri := & core.Uri {DbType : core .MYSQL }
0 commit comments