remove QuoteStr() usage in dialects (#1364)

This commit is contained in:
BetaCat 2019-07-24 13:22:14 +08:00 committed by Lunny Xiao
parent 9b08f9494f
commit 4b0ff8ad27
2 changed files with 185 additions and 192 deletions

View File

@ -507,7 +507,7 @@ func (db *mssql) CreateTableSql(table *core.Table, tableName, storeEngine, chars
sql = "IF NOT EXISTS (SELECT [name] FROM sys.tables WHERE [name] = '" + tableName + "' ) CREATE TABLE "
sql += db.QuoteStr() + tableName + db.QuoteStr() + " ("
sql += db.Quote(tableName) + " ("
pkList := table.PrimaryKeys

View File

@ -175,13 +175,6 @@ func (engine *Engine) SupportInsertMany() bool {
return engine.dialect.SupportInsertMany()
}
// QuoteStr Engine's database use which character as quote.
// mysql, sqlite use ` and postgres use "
// Deprecated, use Quote() instead
func (engine *Engine) QuoteStr() string {
return engine.dialect.QuoteStr()
}
func (engine *Engine) quoteColumns(columnStr string) string {
columns := strings.Split(columnStr, ",")
for i := 0; i < len(columns); i++ {