Move from gocql/gocql to scylladb/gocql
This commit is contained in:
committed by
Sylwia Szunejko
parent
ab80d70106
commit
207ba8723e
@@ -1,12 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gocql/gocql"
|
||||
)
|
||||
|
||||
var types = map[string]string{
|
||||
@@ -88,18 +85,3 @@ func mapScyllaToGoType(s string) string {
|
||||
|
||||
return camelize(s) + "UserType"
|
||||
}
|
||||
|
||||
func typeToString(t interface{}) string {
|
||||
tType := fmt.Sprintf("%T", t)
|
||||
switch tType {
|
||||
case "gocql.NativeType":
|
||||
return t.(gocql.NativeType).String()
|
||||
case "gocql.CollectionType":
|
||||
collectionType := t.(gocql.CollectionType).String()
|
||||
collectionType = strings.ReplaceAll(collectionType, "(", "<")
|
||||
collectionType = strings.ReplaceAll(collectionType, ")", ">")
|
||||
return collectionType
|
||||
default:
|
||||
panic(fmt.Sprintf("Did not expect %v type in user defined type", tType))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user