mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 增加 .Net Framework 4.0 的支持,出于环境考虑 .Net Framework 4.0 不支持异步方法;
- 增加 IFreeSql.Insert<T>(IEnumerable<T1> source) 方法;
This commit is contained in:
@ -19,9 +19,13 @@ namespace FreeSql.Sqlite.Curd
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#if net40
|
||||
#else
|
||||
public override Task<List<T1>> ExecuteDeletedAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -17,12 +17,8 @@ namespace FreeSql.Sqlite.Curd
|
||||
}
|
||||
|
||||
public override int ExecuteAffrows() => base.SplitExecuteAffrows(5000, 999);
|
||||
public override Task<int> ExecuteAffrowsAsync() => base.SplitExecuteAffrowsAsync(5000, 999);
|
||||
public override long ExecuteIdentity() => base.SplitExecuteIdentity(5000, 999);
|
||||
public override Task<long> ExecuteIdentityAsync() => base.SplitExecuteIdentityAsync(5000, 999);
|
||||
public override List<T1> ExecuteInserted() => base.SplitExecuteInserted(5000, 999);
|
||||
public override Task<List<T1>> ExecuteInsertedAsync() => base.SplitExecuteInsertedAsync(5000, 999);
|
||||
|
||||
|
||||
protected override long RawExecuteIdentity()
|
||||
{
|
||||
@ -50,6 +46,22 @@ namespace FreeSql.Sqlite.Curd
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
protected override List<T1> RawExecuteInserted()
|
||||
{
|
||||
var sql = this.ToSql();
|
||||
if (string.IsNullOrEmpty(sql)) return new List<T1>();
|
||||
|
||||
this.RawExecuteAffrows();
|
||||
return _source;
|
||||
}
|
||||
|
||||
#if net40
|
||||
#else
|
||||
public override Task<int> ExecuteAffrowsAsync() => base.SplitExecuteAffrowsAsync(5000, 999);
|
||||
public override Task<long> ExecuteIdentityAsync() => base.SplitExecuteIdentityAsync(5000, 999);
|
||||
public override Task<List<T1>> ExecuteInsertedAsync() => base.SplitExecuteInsertedAsync(5000, 999);
|
||||
|
||||
async protected override Task<long> RawExecuteIdentityAsync()
|
||||
{
|
||||
var sql = this.ToSql();
|
||||
@ -76,14 +88,6 @@ namespace FreeSql.Sqlite.Curd
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
protected override List<T1> RawExecuteInserted()
|
||||
{
|
||||
var sql = this.ToSql();
|
||||
if (string.IsNullOrEmpty(sql)) return new List<T1>();
|
||||
|
||||
this.RawExecuteAffrows();
|
||||
return _source;
|
||||
}
|
||||
async protected override Task<List<T1>> RawExecuteInsertedAsync()
|
||||
{
|
||||
var sql = this.ToSql();
|
||||
@ -92,5 +96,6 @@ namespace FreeSql.Sqlite.Curd
|
||||
await this.RawExecuteAffrowsAsync();
|
||||
return _source;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -19,19 +19,13 @@ namespace FreeSql.Sqlite.Curd
|
||||
}
|
||||
|
||||
public override int ExecuteAffrows() => base.SplitExecuteAffrows(200, 999);
|
||||
public override Task<int> ExecuteAffrowsAsync() => base.SplitExecuteAffrowsAsync(200, 999);
|
||||
public override List<T1> ExecuteUpdated() => base.SplitExecuteUpdated(200, 999);
|
||||
public override Task<List<T1>> ExecuteUpdatedAsync() => base.SplitExecuteUpdatedAsync(200, 999);
|
||||
|
||||
|
||||
protected override List<T1> RawExecuteUpdated()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
protected override Task<List<T1>> RawExecuteUpdatedAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override void ToSqlCase(StringBuilder caseWhen, ColumnInfo[] primarys)
|
||||
{
|
||||
@ -68,5 +62,16 @@ namespace FreeSql.Sqlite.Curd
|
||||
}
|
||||
sb.Append(")");
|
||||
}
|
||||
|
||||
#if net40
|
||||
#else
|
||||
public override Task<int> ExecuteAffrowsAsync() => base.SplitExecuteAffrowsAsync(200, 999);
|
||||
public override Task<List<T1>> ExecuteUpdatedAsync() => base.SplitExecuteUpdatedAsync(200, 999);
|
||||
|
||||
protected override Task<List<T1>> RawExecuteUpdatedAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user