Commit 7784e4e2 by Daniel Lee

mysql: add datetime type to table data

parent 413ee33d
......@@ -7,6 +7,8 @@ import (
"strconv"
"sync"
"time"
"github.com/go-sql-driver/mysql"
"github.com/go-xorm/core"
"github.com/go-xorm/xorm"
......@@ -188,6 +190,8 @@ func (e MysqlExecutor) getTypedRowData(types []*sql.ColumnType, rows *core.Rows)
values[i] = new(int64)
case mysql.FieldTypeNameDouble:
values[i] = new(float64)
case mysql.FieldTypeNameDateTime:
values[i] = new(time.Time)
default:
return nil, fmt.Errorf("Database type %s not supported", stype.DatabaseTypeName())
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment