diff --git a/src/xsql/README.md b/src/xsql/README.md index 07fc9f6..5b4042c 100644 --- a/src/xsql/README.md +++ b/src/xsql/README.md @@ -68,7 +68,7 @@ Of course, you can also map usage like `gorm`, `xorm`. type Test struct { Id int `xsql:"id"` Foo string `xsql:"foo"` - Bar time.Time `xsql:"bar"` // oracle uses goora.TimeStamp + Bar time.Time `xsql:"bar"` // oracle uses go_ora.TimeStamp } func (t Test) TableName() string { diff --git a/src/xsql/dbora_test.go b/src/xsql/dbora_test.go index 65b69da..b85a895 100644 --- a/src/xsql/dbora_test.go +++ b/src/xsql/dbora_test.go @@ -4,7 +4,7 @@ import ( "database/sql" "fmt" "github.com/mix-go/xsql" - ora "github.com/sijms/go-ora/v2" + "github.com/sijms/go-ora/v2" "github.com/stretchr/testify/assert" "log" "testing" @@ -52,9 +52,9 @@ func TestOracleQuery(t *testing.T) { } type TestOracle struct { - Id int `xsql:"ID"` - Foo string `xsql:"FOO"` - Bar ora.TimeStamp `xsql:"BAR"` + Id int `xsql:"ID"` + Foo string `xsql:"FOO"` + Bar go_ora.TimeStamp `xsql:"BAR"` } func (t TestOracle) TableName() string { @@ -69,7 +69,7 @@ func TestOracleInsert(t *testing.T) { test := TestOracle{ Id: 3, Foo: "test", - Bar: ora.TimeStamp(time.Now()), + Bar: go_ora.TimeStamp(time.Now()), } _, err := DB.Insert(&test) @@ -86,12 +86,12 @@ func __TestOracleBatchInsert(t *testing.T) { { Id: 4, Foo: "test1", - Bar: ora.TimeStamp(time.Now()), + Bar: go_ora.TimeStamp(time.Now()), }, { Id: 5, Foo: "test2", - Bar: ora.TimeStamp(time.Now()), + Bar: go_ora.TimeStamp(time.Now()), }, } _, err := DB.BatchInsert(&tests) @@ -107,7 +107,7 @@ func TestOracleUpdate(t *testing.T) { test := TestOracle{ Id: 999, Foo: "test update", - Bar: ora.TimeStamp(time.Now()), + Bar: go_ora.TimeStamp(time.Now()), } _, err := DB.Update(&test, "id = :id", 3) @@ -190,7 +190,7 @@ func TestOracleTxCommit(t *testing.T) { test := TestOracle{ Id: 998, // oracle not support AUTO_INCREMENT Foo: "test", - Bar: ora.TimeStamp(time.Now()), + Bar: go_ora.TimeStamp(time.Now()), } _, err := tx.Insert(&test) a.Empty(err) @@ -209,7 +209,7 @@ func TestOracleTxRollback(t *testing.T) { test := TestOracle{ Id: 999, // oracle not support AUTO_INCREMENT Foo: "test", - Bar: ora.TimeStamp(time.Now()), + Bar: go_ora.TimeStamp(time.Now()), } _, err := tx.Insert(&test) a.Empty(err)