Migrated to the new go-web-dev-kit setup.

This commit is contained in:
Zed A. Shaw 2025-09-13 15:08:19 -04:00
parent 8d70b57299
commit 71ee505717
20 changed files with 193 additions and 810 deletions

View file

@ -2,6 +2,7 @@ package data
import (
"log"
"database/sql"
"github.com/gofiber/fiber/v2"
_ "github.com/mattn/go-sqlite3"
"github.com/jmoiron/sqlx"
@ -50,8 +51,8 @@ func GetJson[T any](c *fiber.Ctx, err error, sql string, args ...interface{}) er
fail: return err
}
func Exec(err error, sql_query string, args ...interface{}) (error) {
if err != nil { return err }
DB.MustExec(sql_query, args...)
return err
func Exec(err error, sql_query string, args ...interface{}) (sql.Result, error) {
if err != nil { return nil, err }
result, err := DB.Exec(sql_query, args...)
return result, err
}