File tree Expand file tree Collapse file tree 5 files changed +4
-29
lines changed Expand file tree Collapse file tree 5 files changed +4
-29
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ require (
37
37
google.golang.org/protobuf v1.33.0
38
38
gorm.io/driver/mysql v1.5.6
39
39
gorm.io/driver/postgres v1.5.7
40
- gorm.io/driver/sqlite v1.5.5
41
40
gorm.io/gorm v1.25.10
42
41
gorm.io/plugin/dbresolver v1.5.1
43
42
k8s.io/api v0.30.0
@@ -132,7 +131,7 @@ require (
132
131
github.com/gin-contrib/sse v0.1.0 // indirect
133
132
github.com/gin-gonic/gin v1.9.1
134
133
github.com/glebarez/go-sqlite v1.22.0 // indirect
135
- github.com/glebarez/sqlite v1.11.0 // indirect
134
+ github.com/glebarez/sqlite v1.11.0
136
135
github.com/go-playground/locales v0.14.1
137
136
github.com/go-playground/universal-translator v0.18.1
138
137
github.com/go-playground/validator/v10 v10.19.0
@@ -152,7 +151,6 @@ require (
152
151
github.com/klauspost/compress v1.17.8 // indirect
153
152
github.com/leodido/go-urn v1.4.0 // indirect
154
153
github.com/mattn/go-isatty v0.0.20 // indirect
155
- github.com/mattn/go-sqlite3 v1.14.22 // indirect
156
154
github.com/microsoft/go-mssqldb v1.7.1 // indirect
157
155
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
158
156
github.com/modern-go/reflect2 v1.0.2 // indirect
Original file line number Diff line number Diff line change @@ -359,8 +359,6 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
359
359
github.com/mattn/go-isatty v0.0.16 /go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM =
360
360
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY =
361
361
github.com/mattn/go-isatty v0.0.20 /go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y =
362
- github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU =
363
- github.com/mattn/go-sqlite3 v1.14.22 /go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y =
364
362
github.com/matttproud/golang_protobuf_extensions v1.0.1 /go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0 =
365
363
github.com/microsoft/go-mssqldb v1.6.0 /go.mod h1:00mDtPbeQCRGC1HwOOR5K/gr30P1NcEG0vx6Kbv2aJU =
366
364
github.com/microsoft/go-mssqldb v1.7.1 h1:KU/g8aWeM3Hx7IMOFpiwYiUkU+9zeISb4+tx3ScVfsM =
@@ -680,8 +678,6 @@ gorm.io/driver/mysql v1.5.6 h1:Ld4mkIickM+EliaQZQx3uOJDJHtrd70MxAUqWqlx3Y8=
680
678
gorm.io/driver/mysql v1.5.6 /go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM =
681
679
gorm.io/driver/postgres v1.5.7 h1:8ptbNJTDbEmhdr62uReG5BGkdQyeasu/FZHxI0IMGnM =
682
680
gorm.io/driver/postgres v1.5.7 /go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA =
683
- gorm.io/driver/sqlite v1.5.5 h1:7MDMtUZhV065SilG62E0MquljeArQZNfJnjd9i9gx3E =
684
- gorm.io/driver/sqlite v1.5.5 /go.mod h1:6NgQ7sQWAIFsPrJJl1lSNSu2TABh0ZZ/zm5fosATavE =
685
681
gorm.io/driver/sqlserver v1.5.3 h1:rjupPS4PVw+rjJkfvr8jn2lJ8BMhT4UW5FwuJY0P3Z0 =
686
682
gorm.io/driver/sqlserver v1.5.3 /go.mod h1:B+CZ0/7oFJ6tAlefsKoyxdgDCXJKSgwS2bMOQZT0I00 =
687
683
gorm.io/gorm v1.23.8 /go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk =
Original file line number Diff line number Diff line change 1
- //go:build !sqlite3
2
-
3
1
package gormdb
4
2
5
3
import (
4
+ "github.com/glebarez/sqlite"
6
5
dm "github.com/nfjBill/gorm-driver-dm"
7
6
"gorm.io/driver/mysql"
8
7
"gorm.io/driver/postgres"
@@ -13,4 +12,5 @@ var Opens = map[string]func(string) gorm.Dialector{
13
12
"mysql" : mysql .Open ,
14
13
"postgres" : postgres .Open ,
15
14
"dm" : dm .Open ,
15
+ "sqlite" : sqlite .Open ,
16
16
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ func (m *Model) TenantScope(ctx *gin.Context,
134
134
_ = db .AddError (err )
135
135
return db
136
136
}
137
- return db .Where (fmt .Sprintf ("`%s`.` tenant_id` = ?" , m .TableName ()), tenantID )
137
+ return db .Where (fmt .Sprintf ("%s. tenant_id = ?" , m .TableName ()), tenantID )
138
138
}
139
139
}
140
140
You can’t perform that action at this time.
0 commit comments