Introduce Exec interface and implementers (#1)
Go Tests / test (push) Failing after 6s

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-05-11 06:03:40 +00:00
parent dedbcc4cfe
commit ffd9cd004e
16 changed files with 1026 additions and 585 deletions
+14
View File
@@ -22,6 +22,20 @@ func OpenConnection(driver string, dsn string) *DBConnection {
return &DBConnection{db: db, State: 1}
}
func (c *DBConnection) Exec(sql string) (sql.Result, error) {
// Force a real DB interaction
result, err := c.db.Exec(sql)
if err != nil {
log.LogFatalError("DB execution failed: %", err)
return nil, err
}
return result, nil
}
func (c *DBConnection) Prepare(sql string) (*sql.Stmt, error) {
return c.db.Prepare(sql)
}
func (c *DBConnection) Close() (bool, error) {
err := c.db.Close()
if err != nil {