Skip to content

Commit

Permalink
Update xsql UseOracle
Browse files Browse the repository at this point in the history
  • Loading branch information
onanying committed Sep 28, 2023
1 parent 5c18540 commit 0d91497
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/xsql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if err != nil {
log.Fatal(err)
}

DB := xsql.New(db, xsql.SwitchToOracle())
DB := xsql.New(db, xsql.UseOracle())
```

- [xorm#drivers](https://github.com/go-xorm/xorm#drivers-support) These drivers are also supported
Expand Down
2 changes: 1 addition & 1 deletion src/xsql/dbora_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func newOracleDB() *xsql.DB {
xsql.WithDebugFunc(func(l *xsql.Log) {
log.Println(l)
}),
xsql.SwitchToOracle(),
xsql.UseOracle(),
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/xsql/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func WithDebugFunc(f DebugFunc) SqlOption {
}}
}

func SwitchToOracle() SqlOption {
func UseOracle() SqlOption {
return &funcSqlOption{func(opt *sqlOptions) {
opt.Placeholder = `:%d`
opt.ColumnQuotes = `"`
Expand Down

0 comments on commit 0d91497

Please sign in to comment.