mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
Make store SQL Server compatible
This commit is contained in:
parent
9ec858286f
commit
64403c402b
17 changed files with 112 additions and 50 deletions
|
@ -28,6 +28,8 @@ func RebindParams(sql string, s env.StoreType) string {
|
|||
switch s {
|
||||
case env.StoreTypePostgreSQL:
|
||||
bindParam = sqlx.DOLLAR
|
||||
case env.StoreTypeSQLServer:
|
||||
bindParam = sqlx.AT
|
||||
}
|
||||
|
||||
return sqlx.Rebind(bindParam, sql)
|
||||
|
|
8
core/env/provider.go
vendored
8
core/env/provider.go
vendored
|
@ -103,4 +103,12 @@ type StoreProvider interface {
|
|||
// Must use ? for parameter placeholder character as DB layer
|
||||
// will convert to database specific parameter placeholder character.
|
||||
ConvertTimestamp() (statement string)
|
||||
|
||||
// IsTrue returns storage provider boolean TRUE:
|
||||
// MySQL is 1, PostgresSQL is TRUE, SQL Server is 1
|
||||
IsTrue() string
|
||||
|
||||
// IsFalse returns storage provider boolean FALSE:
|
||||
// MySQL is 0, PostgresSQL is FALSE, SQL Server is 0
|
||||
IsFalse() string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue