瀏覽代碼

Add TimestampType to known set of Cassandra internal types

Ben Hood 10 年之前
父節點
當前提交
6d472ccc98
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 1
      helpers.go
  2. 1 0
      marshal_test.go

+ 1 - 1
helpers.go

@@ -82,7 +82,7 @@ func getApacheCassandraType(class string) Type {
 			return TypeFloat
 		case "Int32Type":
 			return TypeInt
-		case "DateType":
+		case "DateType", "TimestampType":
 			return TypeTimestamp
 		case "UUIDType":
 			return TypeUUID

+ 1 - 0
marshal_test.go

@@ -659,6 +659,7 @@ var typeLookupTest = []struct {
 	{"FloatType", TypeFloat},
 	{"Int32Type", TypeInt},
 	{"DateType", TypeTimestamp},
+	{"TimestampType", TypeTimestamp},
 	{"UUIDType", TypeUUID},
 	{"UTF8Type", TypeVarchar},
 	{"IntegerType", TypeVarint},