mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update sqlite
This commit is contained in:
parent
c069ce471b
commit
fdf3662d4d
@ -78,8 +78,11 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.IsCorrectErrorSqlParameterName == true)
|
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.IsCorrectErrorSqlParameterName == true)
|
||||||
{
|
{
|
||||||
cmd.CommandText = this.Context.Insertable(dictionary.First()).AS(dt.TableName).ToSqlString().Replace(";SELECT LAST_INSERT_ROWID();", "");
|
foreach (var item in dictionary)
|
||||||
i += await cmd.ExecuteNonQueryAsync();
|
{
|
||||||
|
cmd.CommandText = this.Context.Insertable(item).AS(dt.TableName).ToSqlString().Replace(";SELECT LAST_INSERT_ROWID();", "");
|
||||||
|
i += await cmd.ExecuteNonQueryAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -114,11 +117,14 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.IsCorrectErrorSqlParameterName == true)
|
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.IsCorrectErrorSqlParameterName == true)
|
||||||
{
|
{
|
||||||
cmd.CommandText = this.Context.Updateable(dictionary.First())
|
foreach (var item in dictionary)
|
||||||
.WhereColumns(whereColums)
|
{
|
||||||
.UpdateColumns(updateColums)
|
cmd.CommandText = this.Context.Updateable(item)
|
||||||
.AS(dt.TableName).ToSqlString();
|
.WhereColumns(whereColums)
|
||||||
i += await cmd.ExecuteNonQueryAsync();
|
.UpdateColumns(updateColums)
|
||||||
|
.AS(dt.TableName).ToSqlString();
|
||||||
|
i += await cmd.ExecuteNonQueryAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user