Implement DML func and related tests
Go Tests / test (push) Failing after 6s

This commit is contained in:
2026-05-04 21:33:29 +02:00
parent 852b5e5888
commit 01336bb911
11 changed files with 538 additions and 38 deletions
+30 -1
View File
@@ -4,11 +4,40 @@ import (
"os"
"testing"
_ "github.com/mattn/go-sqlite3"
log "gitlab.com/gdulai/simpleloglvl"
)
type Test struct {
ID int `sql:"pk"`
Int64Field int64 `sql:"nn"`
IntField int `sql:"nn"`
StringField string `sql:"nn"`
}
type TestWithFk struct {
ID int `sql:"pk"`
TestID int `sql:"nn;fk=Test.ID"`
}
type TestWithFkAndFkId struct {
ID int `sql:"pk"`
TestID int `sql:"nn;fk=Test.ID;fk_id=custom_fk"`
}
type TestWithCompositePk struct {
ID int `sql:"nn;pk"`
Name string `sql:"nn;pk"`
}
type TestWithCompositeFk struct {
ID int `sql:"nn;pk"`
CompositeFkId int `sql:"nn;fk=TestWithCompositePk.ID;"`
CompositeFkName string `sql:"nn;fk=TestWithCompositePk.Name;"`
}
func TestMain(m *testing.M) {
log.SetupLogs("Debug")
log.SetupLogs("Info")
code := m.Run()