Skip to content

Commit

Permalink
feat: [#540] Remove config.go::Driver
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbrzzl committed Jan 18, 2025
1 parent 87b73aa commit 217e6d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/goravel/framework/contracts/database/orm"
"github.com/goravel/framework/database/gorm"
"github.com/goravel/framework/testing/utils"
"github.com/goravel/postgres"
)

type TestQuery struct {
Expand Down Expand Up @@ -60,7 +61,8 @@ func (r *TestQuery) Query() orm.Query {
}

func (r *TestQuery) WithSchema(schema string) {
if r.driver.Config().Driver != contractsdatabase.DriverPostgres.String() && r.driver.Config().Driver != contractsdatabase.DriverSqlserver.String() {
// TODO: Add Sqlserver
if r.driver.Config().Driver != postgres.Name {
panic(fmt.Sprintf("%s does not support schema", r.driver.Config().Driver))
}

Expand Down

0 comments on commit 217e6d0

Please sign in to comment.