浏览代码

added missing cases for DATETIME datatype

linux chips 8 年之前
父节点
当前提交
dd7ab43d09
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      vendor/github.com/denisenkom/go-mssqldb/types.go

+ 6 - 0
vendor/github.com/denisenkom/go-mssqldb/types.go

@@ -1178,6 +1178,8 @@ func makeGoLangTypeName(ti typeInfo) string {
 		return "IMAGE"
 	case typeVariant:
 		return "SQL_VARIANT"
+	case typeDateTime:
+		return "DATETIME"
 	default:
 		panic(fmt.Sprintf("not implemented makeDecl for type %d", ti.TypeId))
 	}
@@ -1297,6 +1299,8 @@ func makeGoLangTypeLength(ti typeInfo) (int64, bool) {
 		return 2147483647, true
 	case typeVariant:
 		return 0, false
+	case typeDateTime:
+		return 0, false
 	default:
 		panic(fmt.Sprintf("not implemented makeDecl for type %d", ti.TypeId))
 	}
@@ -1404,6 +1408,8 @@ func makeGoLangTypePrecisionScale(ti typeInfo) (int64, int64, bool) {
 		return 0, 0, false
 	case typeVariant:
 		return 0, 0, false
+	case typeDateTime:
+		return 0, 0, false
 	default:
 		panic(fmt.Sprintf("not implemented makeDecl for type %d", ti.TypeId))
 	}