fix errors on insertion to game, fix db creation of game

This commit is contained in:
lbenedar
2026-04-23 19:03:56 +03:00
parent f46ff8333e
commit 07025afefc
36 changed files with 1820 additions and 693 deletions

View File

@@ -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
}