[xorm] Remove some unused functions && mssql related logics (#60788)

* remove some unused functions

* more

* put back the pakcage replace
This commit is contained in:
ying-jeanne
2022-12-28 22:23:25 -05:00
committed by GitHub
parent 497ce81867
commit a3a0c01301
15 changed files with 17 additions and 311 deletions
+1 -4
View File
@@ -353,9 +353,6 @@ func (session *Session) innerInsert(bean interface{}) (int64, error) {
var tableName = session.statement.TableName()
var output string
if session.engine.dialect.DBType() == core.MSSQL && len(table.AutoIncrement) > 0 {
output = fmt.Sprintf(" OUTPUT Inserted.%s", table.AutoIncrement)
}
var buf = builder.NewWriter()
if _, err := buf.WriteString(fmt.Sprintf("INSERT INTO %s", session.engine.Quote(tableName))); err != nil {
@@ -503,7 +500,7 @@ func (session *Session) innerInsert(bean interface{}) (int64, error) {
aiValue.Set(int64ToIntValue(id, aiValue.Type()))
return 1, nil
} else if len(table.AutoIncrement) > 0 && (session.engine.dialect.DBType() == core.POSTGRES || session.engine.dialect.DBType() == core.MSSQL) {
} else if len(table.AutoIncrement) > 0 && (session.engine.dialect.DBType() == core.POSTGRES) {
res, err := session.queryBytes(sqlStr, args...)
if err != nil {