达梦 supports mandatory self-increment

This commit is contained in:
sunkaixuan 2024-03-22 19:54:33 +08:00
parent 840a54b9e4
commit e113e9a4e5

View File

@ -49,6 +49,11 @@ namespace SqlSugar
{
result = result.Replace(";select @@identity", "");
}
if (this.IsOffIdentity)
{
var tableName = this.GetTableNameString;
result = $"SET IDENTITY_INSERT {tableName} ON;" + result.TrimEnd(';') + $";SET IDENTITY_INSERT {tableName} OFF"; ;
}
return result;
}