aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/xorm.io/xorm/dialects/mssql.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-06-16 04:46:01 +0800
committerGitHub <noreply@github.com>2020-06-15 16:46:01 -0400
commitcdef92b3ffc7dcbc0f4ee26f7f973ca2b28fea61 (patch)
tree0bf6d1d054affe3dd04daaa92e35fa1e50d8ade1 /vendor/xorm.io/xorm/dialects/mssql.go
parent492b7d63576cc18c5de70cb0fa061b97d67bf227 (diff)
downloadgitea-cdef92b3ffc7dcbc0f4ee26f7f973ca2b28fea61.tar.gz
gitea-cdef92b3ffc7dcbc0f4ee26f7f973ca2b28fea61.zip
Upgrade xorm to v1.0.2 (#11900)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'vendor/xorm.io/xorm/dialects/mssql.go')
-rw-r--r--vendor/xorm.io/xorm/dialects/mssql.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/xorm.io/xorm/dialects/mssql.go b/vendor/xorm.io/xorm/dialects/mssql.go
index 92457ff928..8ef924b820 100644
--- a/vendor/xorm.io/xorm/dialects/mssql.go
+++ b/vendor/xorm.io/xorm/dialects/mssql.go
@@ -205,7 +205,11 @@ var (
"PROC": true,
}
- mssqlQuoter = schemas.Quoter{'[', ']', schemas.AlwaysReserve}
+ mssqlQuoter = schemas.Quoter{
+ Prefix: '[',
+ Suffix: ']',
+ IsReserved: schemas.AlwaysReserve,
+ }
)
type mssql struct {
@@ -501,11 +505,8 @@ func (db *mssql) CreateTableSQL(table *schemas.Table, tableName string) ([]strin
for _, colName := range table.ColumnsSeq() {
col := table.GetColumn(colName)
- if col.IsPrimaryKey && len(pkList) == 1 {
- sql += db.String(col)
- } else {
- sql += db.StringNoPk(col)
- }
+ s, _ := ColumnString(db, col, col.IsPrimaryKey && len(pkList) == 1)
+ sql += s
sql = strings.TrimSpace(sql)
sql += ", "
}