table.go 431 字节
package dao

import (
	pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
	"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/domain"
)

func TableDelete(ptr *pgTransaction.TransactionContext, tableId int, tableType domain.TableType) error {
	sql := "delete from metadata.tables where table_id = ? and table_type = ?"
	_, err := ptr.PgTx.Exec(sql, tableId, tableType.ToString())
	return err
}