Move from gocql/gocql to scylladb/gocql

This commit is contained in:
Dmitry Kropachev
2024-06-16 08:40:32 -04:00
committed by Sylwia Szunejko
parent ab80d70106
commit 207ba8723e
6 changed files with 41 additions and 42 deletions

View File

@@ -42,8 +42,7 @@ var (
{{- $field_types := .FieldTypes}}
type {{$type_name}}UserType struct {
{{- range $index, $element := .FieldNames}}
{{- $type := index $field_types $index}}
{{. | camelize}} {{typeToString $type | mapScyllaToGoType}}
{{. | camelize}} {{(index $field_types $index) | mapScyllaToGoType}}
{{- end}}
}
{{- end}}
@@ -54,8 +53,8 @@ type {{$type_name}}UserType struct {
{{- $model_name := .Name | camelize}}
type {{$model_name}}Struct struct {
{{- range .Columns}}
{{- if not (eq .Validator "empty") }}
{{.Name | camelize}} {{.Validator | mapScyllaToGoType}}
{{- if not (eq .Type "empty") }}
{{.Name | camelize}} {{.Type | mapScyllaToGoType}}
{{- end}}
{{- end}}
}