mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 12:18:00 +08:00
Synchronization code
This commit is contained in:
parent
e21aa62216
commit
4e87995e99
@ -91,7 +91,7 @@ namespace SqlSugar
|
|||||||
|
|
||||||
batchInsetrSql.Append("(");
|
batchInsetrSql.Append("(");
|
||||||
batchInsetrSql.Append(columnsString);
|
batchInsetrSql.Append(columnsString);
|
||||||
if (identities.HasValue())
|
if (identities.HasValue()&& this.IsOffIdentity==false)
|
||||||
{
|
{
|
||||||
batchInsetrSql.Append("," + string.Join(",", identities.Select(it => Builder.GetTranslationColumnName(it.DbColumnName))));
|
batchInsetrSql.Append("," + string.Join(",", identities.Select(it => Builder.GetTranslationColumnName(it.DbColumnName))));
|
||||||
}
|
}
|
||||||
@ -101,20 +101,23 @@ namespace SqlSugar
|
|||||||
batchInsetrSql.Append("(");
|
batchInsetrSql.Append("(");
|
||||||
insertColumns = string.Join(",", item.Select(it => GetDbColumn(it, FormatValue(it.Value, it.PropertyName))));
|
insertColumns = string.Join(",", item.Select(it => GetDbColumn(it, FormatValue(it.Value, it.PropertyName))));
|
||||||
batchInsetrSql.Append(insertColumns);
|
batchInsetrSql.Append(insertColumns);
|
||||||
if (identities.HasValue())
|
if (this.IsOffIdentity == false)
|
||||||
{
|
{
|
||||||
batchInsetrSql.Append(",");
|
if (identities.HasValue())
|
||||||
foreach (var idn in identities)
|
|
||||||
{
|
{
|
||||||
var seqvalue = this.OracleSeqInfoList[idn.OracleSequenceName];
|
batchInsetrSql.Append(",");
|
||||||
this.OracleSeqInfoList[idn.OracleSequenceName] = this.OracleSeqInfoList[idn.OracleSequenceName] + 1;
|
foreach (var idn in identities)
|
||||||
if (identities.Last() == idn)
|
|
||||||
{
|
{
|
||||||
batchInsetrSql.Append(seqvalue);
|
var seqvalue = this.OracleSeqInfoList[idn.OracleSequenceName];
|
||||||
}
|
this.OracleSeqInfoList[idn.OracleSequenceName] = this.OracleSeqInfoList[idn.OracleSequenceName] + 1;
|
||||||
else
|
if (identities.Last() == idn)
|
||||||
{
|
{
|
||||||
batchInsetrSql.Append(seqvalue + ",");
|
batchInsetrSql.Append(seqvalue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
batchInsetrSql.Append(seqvalue + ",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user