Fix schemagen and test generated code
This commit is contained in:
committed by
Sylwia Szunejko
parent
fcd76082db
commit
653faf1e03
71
cmd/schemagen/testdata/models.go
vendored
Normal file
71
cmd/schemagen/testdata/models.go
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
// Code generated by "gocqlx/cmd/schemagen"; DO NOT EDIT.
|
||||
|
||||
package schemagentest
|
||||
|
||||
import (
|
||||
"github.com/gocql/gocql"
|
||||
"github.com/scylladb/gocqlx/v2"
|
||||
"github.com/scylladb/gocqlx/v2/table"
|
||||
)
|
||||
|
||||
// Table models.
|
||||
var (
|
||||
Playlists = table.New(table.Metadata{
|
||||
Name: "playlists",
|
||||
Columns: []string{
|
||||
"album",
|
||||
"artist",
|
||||
"id",
|
||||
"song_id",
|
||||
"title",
|
||||
},
|
||||
PartKey: []string{
|
||||
"id",
|
||||
},
|
||||
SortKey: []string{
|
||||
"title",
|
||||
"album",
|
||||
"artist",
|
||||
},
|
||||
})
|
||||
|
||||
Songs = table.New(table.Metadata{
|
||||
Name: "songs",
|
||||
Columns: []string{
|
||||
"album",
|
||||
"artist",
|
||||
"data",
|
||||
"duration",
|
||||
"id",
|
||||
"tags",
|
||||
"title",
|
||||
},
|
||||
PartKey: []string{
|
||||
"id",
|
||||
},
|
||||
SortKey: []string{},
|
||||
})
|
||||
)
|
||||
|
||||
type AlbumUserType struct {
|
||||
gocqlx.UDT
|
||||
Name string
|
||||
Songwriters []string
|
||||
}
|
||||
|
||||
type PlaylistsStruct struct {
|
||||
Album AlbumUserType
|
||||
Artist string
|
||||
Id [16]byte
|
||||
SongId [16]byte
|
||||
Title string
|
||||
}
|
||||
type SongsStruct struct {
|
||||
Album string
|
||||
Artist string
|
||||
Data []byte
|
||||
Duration gocql.Duration
|
||||
Id [16]byte
|
||||
Tags []string
|
||||
Title string
|
||||
}
|
||||
Reference in New Issue
Block a user