mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 10:24:55 +08:00
Update Core
This commit is contained in:
@@ -43,7 +43,7 @@ namespace SqlSugar
|
|||||||
var isDisableMasterSlaveSeparation = this.Context.Ado.IsDisableMasterSlaveSeparation;
|
var isDisableMasterSlaveSeparation = this.Context.Ado.IsDisableMasterSlaveSeparation;
|
||||||
this.Context.Ado.IsDisableMasterSlaveSeparation = true;
|
this.Context.Ado.IsDisableMasterSlaveSeparation = true;
|
||||||
var count = Ado.ExecuteCommand(sql, InsertBuilder.Parameters == null ? null : InsertBuilder.Parameters.ToArray());
|
var count = Ado.ExecuteCommand(sql, InsertBuilder.Parameters == null ? null : InsertBuilder.Parameters.ToArray());
|
||||||
var result = (this.GetIdentityKeys().IsNullOrEmpty() || count == 0) ? 0 :Convert.ToInt64(GetSeqValue(GetSeqName()));
|
var result = (this.GetIdentityKeys().IsNullOrEmpty() || count == 0) ? 0 : Convert.ToInt64(GetSeqValue(GetSeqName()));
|
||||||
this.Context.Ado.IsDisableMasterSlaveSeparation = isDisableMasterSlaveSeparation;
|
this.Context.Ado.IsDisableMasterSlaveSeparation = isDisableMasterSlaveSeparation;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -65,15 +65,15 @@ namespace SqlSugar
|
|||||||
int seqBeginValue = 0;
|
int seqBeginValue = 0;
|
||||||
seqBeginValue = this.Ado.GetInt("select " + seqName + ".Nextval from dual");
|
seqBeginValue = this.Ado.GetInt("select " + seqName + ".Nextval from dual");
|
||||||
//Console.WriteLine(seqBeginValue);
|
//Console.WriteLine(seqBeginValue);
|
||||||
var nextLength= insertCount - 1;
|
var nextLength = insertCount - 1;
|
||||||
if (nextLength > 0)
|
if (nextLength > 0)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.AppendLine(" select Seq_Id.nextval,t.* from (");
|
sb.AppendLine(" select " + seqName + ".nextval,t.* from (");
|
||||||
for (int i = 0; i < nextLength; i++)
|
for (int i = 0; i < nextLength; i++)
|
||||||
{
|
{
|
||||||
sb.AppendLine(" select 1 from dual");
|
sb.AppendLine(" select 1 from dual");
|
||||||
if (i<(nextLength - 1) )
|
if (i < (nextLength - 1))
|
||||||
{
|
{
|
||||||
sb.AppendLine("union all");
|
sb.AppendLine("union all");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<Version>5.0.0.16</Version>
|
<Version>5.0.0.17</Version>
|
||||||
<Copyright>sun_kai_xuan</Copyright>
|
<Copyright>sun_kai_xuan</Copyright>
|
||||||
<PackageProjectUrl>https://github.com/sunkaixuan/SqlSugar</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/sunkaixuan/SqlSugar</PackageProjectUrl>
|
||||||
<PackageLicenseUrl></PackageLicenseUrl>
|
<PackageLicenseUrl></PackageLicenseUrl>
|
||||||
|
|||||||
Reference in New Issue
Block a user