fix errors on insertion to game, fix db creation of game
This commit is contained in:
@@ -22,7 +22,7 @@ type Item struct {
|
||||
Ownership []OwnershipString
|
||||
}
|
||||
|
||||
func (i *Item) Query(data *InsertId[uint]) {
|
||||
func (i *Item) Query(data *InsertId[string]) {
|
||||
data.query = fmt.Sprintf(`
|
||||
INSERT INTO world_folder (%s, id, img, name, type, folder, sort)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7)
|
||||
@@ -43,7 +43,7 @@ func (i *Item) InsertObjects(tx *sqlx.Tx) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (i *Item) Insert(tx *sqlx.Tx, data *InsertId[uint]) error {
|
||||
func (i *Item) Insert(tx *sqlx.Tx, data *InsertId[string]) error {
|
||||
if data.query == "" {
|
||||
return ErrNoQuery
|
||||
}
|
||||
@@ -58,7 +58,7 @@ func (i *Item) Insert(tx *sqlx.Tx, data *InsertId[uint]) error {
|
||||
return i.InsertObjects(tx)
|
||||
}
|
||||
|
||||
func (i *Item) InsertCtx(ctx context.Context, tx *sqlx.Tx, data *InsertId[uint]) error {
|
||||
func (i *Item) InsertCtx(ctx context.Context, tx *sqlx.Tx, data *InsertId[string]) error {
|
||||
if data.query == "" {
|
||||
return ErrNoQuery
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user