Skip to content

Commit fac3ae4

Browse files
committed
Adding support for TINYBLOB and TINYTEXT
Fixes issue #15
1 parent 0ad44c9 commit fac3ae4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

main.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ func makeValueFuncs(conn *sql.DB, fields []tableparser.Field) insertValues {
392392
values = append(values, getters.NewRandomDate(field.ColumnName, field.IsNullable))
393393
case "datetime", "timestamp":
394394
values = append(values, getters.NewRandomDateTime(field.ColumnName, field.IsNullable))
395-
case "blob", "text", "mediumtext", "mediumblob", "longblob", "longtext":
395+
case "tinyblob", "tinytext", "blob", "text", "mediumtext", "mediumblob", "longblob", "longtext":
396396
values = append(values, getters.NewRandomString(field.ColumnName,
397397
field.CharacterMaximumLength.Int64, field.IsNullable))
398398
case "time":
@@ -458,8 +458,8 @@ func getSamples(conn *sql.DB, schema, table, field string, samples int64, dataTy
458458
var v int64
459459
err = rows.Scan(&v)
460460
val = v
461-
case "char", "varchar", "varbinary", "blob", "text", "mediumtext",
462-
"mediumblob", "longblob", "longtext":
461+
case "char", "varchar", "varbinary", "tinyblob", "tinytext", "blob", "text",
462+
"mediumtext", "mediumblob", "longblob", "longtext":
463463
var v string
464464
err = rows.Scan(&v)
465465
val = v
@@ -508,6 +508,8 @@ func isSupportedType(fieldType string) bool {
508508
"timestamp": true,
509509
"time": true,
510510
"year": true,
511+
"tinyblob": true,
512+
"tinytext": true,
511513
"blob": true,
512514
"text": true,
513515
"mediumblob": true,

0 commit comments

Comments
 (0)