Skip to content

Commit

Permalink
修改参数名
Browse files Browse the repository at this point in the history
  • Loading branch information
junjie-sun committed Nov 14, 2019
1 parent 2d26174 commit f4c4d3b
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion doc/更新日志.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ TableAttribute

--------------------------------------------------------------------------------

2019-11-14
2019-11-15
XDbAccess Tag��1.5.2

XDbAccess.Common
Expand Down
4 changes: 2 additions & 2 deletions src/XDbAccess.Common/SQLBuilder/ISQLBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public interface ISQLBuilder
/// <param name="meta">映射信息</param>
/// <param name="isBuildFullSql">是否构造完整的SQL,如果为false则只构造SELECT部分的语句</param>
/// <param name="sqlConditionPart">WHERE部分的SQL</param>
/// <param name="sqlOrderByPart">ORDER部分的SQL</param>
/// <param name="sqlOrderPart">ORDER部分的SQL</param>
/// <returns></returns>
string BuildSelectSql(MapInfo meta, bool isBuildFullSql = false, string sqlConditionPart = null, string sqlOrderByPart = null);
string BuildSelectSql(MapInfo meta, bool isBuildFullSql = false, string sqlConditionPart = null, string sqlOrderPart = null);

/// <summary>
/// 构造DELETE语句
Expand Down
8 changes: 4 additions & 4 deletions src/XDbAccess.Common/SQLBuilder/MSSqlSQLBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ SELECT 1 as CountField
/// <param name="meta">映射信息</param>
/// <param name="isBuildFullSql">是否构造完整的SQL,如果为false则只构造SELECT部分的语句</param>
/// <param name="sqlConditionPart">WHERE部分的SQL</param>
/// <param name="sqlOrderByPart">ORDER部分的SQL</param>
/// <param name="sqlOrderPart">ORDER部分的SQL</param>
/// <returns></returns>
public string BuildSelectSql(MapInfo meta, bool isBuildFullSql = false, string sqlConditionPart = null, string sqlOrderByPart = null)
public string BuildSelectSql(MapInfo meta, bool isBuildFullSql = false, string sqlConditionPart = null, string sqlOrderPart = null)
{
if (meta == null || meta.Fields.Count == 0)
{
Expand Down Expand Up @@ -275,9 +275,9 @@ public string BuildSelectSql(MapInfo meta, bool isBuildFullSql = false, string s
sqlBuilder.AppendFormat(" WHERE {0}", sqlConditionPart);
}

if (!string.IsNullOrWhiteSpace(sqlOrderByPart))
if (!string.IsNullOrWhiteSpace(sqlOrderPart))
{
sqlBuilder.AppendFormat(" ORDER BY {0}", sqlOrderByPart);
sqlBuilder.AppendFormat(" ORDER BY {0}", sqlOrderPart);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/XDbAccess.Common/SQLBuilder/MySqlSQLBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ public string BuildReplaceSql(MapInfo meta)
/// <param name="meta">映射信息</param>
/// <param name="isBuildFullSql">是否构造完整的SQL,如果为false则只构造SELECT部分的语句</param>
/// <param name="sqlConditionPart">WHERE部分的SQL</param>
/// <param name="sqlOrderByPart">ORDER部分的SQL</param>
/// <param name="sqlOrderPart">ORDER部分的SQL</param>
/// <returns></returns>
public string BuildSelectSql(MapInfo meta, bool isBuildFullSql = false, string sqlConditionPart = null, string sqlOrderByPart = null)
public string BuildSelectSql(MapInfo meta, bool isBuildFullSql = false, string sqlConditionPart = null, string sqlOrderPart = null)
{
if (meta == null || meta.Fields.Count == 0)
{
Expand Down Expand Up @@ -339,9 +339,9 @@ public string BuildSelectSql(MapInfo meta, bool isBuildFullSql = false, string s
sqlBuilder.AppendFormat(" WHERE {0}", sqlConditionPart);
}

if(!string.IsNullOrWhiteSpace(sqlOrderByPart))
if (!string.IsNullOrWhiteSpace(sqlOrderPart))
{
sqlBuilder.AppendFormat(" ORDER BY {0}", sqlOrderByPart);
sqlBuilder.AppendFormat(" ORDER BY {0}", sqlOrderPart);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/XDbAccess.Common/XDbAccess.Common.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/XDbAccess.Dapper/DbHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -838,15 +838,15 @@ public DbHelper(DbContextImpl dbContext)
/// <typeparam name="T"></typeparam>
/// <param name="sqlConditionPart">WHERE部分的SQL</param>
/// <param name="condition">条件对象</param>
/// <param name="sqlOrderByPart">ORDER部分的SQL</param>
/// <param name="sqlOrderPart">ORDER部分的SQL</param>
/// <param name="buffered"></param>
/// <param name="commandTimeout"></param>
/// <returns></returns>
public virtual IEnumerable<T> QuerySingleTable<T>(string sqlConditionPart = null, object condition = null, string sqlOrderByPart = null, bool buffered = true, int? commandTimeout = default(int?))
public virtual IEnumerable<T> QuerySingleTable<T>(string sqlConditionPart = null, object condition = null, string sqlOrderPart = null, bool buffered = true, int? commandTimeout = default(int?))
{
var meta = MapParser.GetMapMetaInfo(typeof(T));

var sql = SQLBuilder.BuildSelectSql(meta, true, sqlConditionPart, sqlOrderByPart);
var sql = SQLBuilder.BuildSelectSql(meta, true, sqlConditionPart, sqlOrderPart);

LogDebug($"QuerySingleTable generate SQL: {sql}");

Expand All @@ -859,14 +859,14 @@ public DbHelper(DbContextImpl dbContext)
/// <typeparam name="T"></typeparam>
/// <param name="sqlConditionPart">WHERE部分的SQL</param>
/// <param name="condition">条件对象</param>
/// <param name="sqlOrderByPart">ORDER部分的SQL</param>
/// <param name="sqlOrderPart">ORDER部分的SQL</param>
/// <param name="commandTimeout"></param>
/// <returns></returns>
public virtual Task<IEnumerable<T>> QuerySingleTableAsync<T>(string sqlConditionPart = null, object condition = null, string sqlOrderByPart = null, int? commandTimeout = default(int?))
public virtual Task<IEnumerable<T>> QuerySingleTableAsync<T>(string sqlConditionPart = null, object condition = null, string sqlOrderPart = null, int? commandTimeout = default(int?))
{
var meta = MapParser.GetMapMetaInfo(typeof(T));

var sql = SQLBuilder.BuildSelectSql(meta, true, sqlConditionPart, sqlOrderByPart);
var sql = SQLBuilder.BuildSelectSql(meta, true, sqlConditionPart, sqlOrderPart);

LogDebug($"QuerySingleTableAsync generate SQL: {sql}");

Expand Down
8 changes: 4 additions & 4 deletions src/XDbAccess.Dapper/IDbHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -425,22 +425,22 @@ public interface IDbHelper<DbContextImpl> where DbContextImpl : IDbContext
/// <typeparam name="T"></typeparam>
/// <param name="sqlConditionPart">WHERE部分的SQL</param>
/// <param name="condition">条件对象</param>
/// <param name="sqlOrderByPart">ORDER部分的SQL</param>
/// <param name="sqlOrderPart">ORDER部分的SQL</param>
/// <param name="buffered"></param>
/// <param name="commandTimeout"></param>
/// <returns></returns>
IEnumerable<T> QuerySingleTable<T>(string sqlConditionPart = null, object condition = null, string sqlOrderByPart = null, bool buffered = true, int? commandTimeout = default(int?));
IEnumerable<T> QuerySingleTable<T>(string sqlConditionPart = null, object condition = null, string sqlOrderPart = null, bool buffered = true, int? commandTimeout = default(int?));

/// <summary>
/// 单表查询
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="sqlConditionPart">WHERE部分的SQL</param>
/// <param name="condition">条件对象</param>
/// <param name="sqlOrderByPart">ORDER部分的SQL</param>
/// <param name="sqlOrderPart">ORDER部分的SQL</param>
/// <param name="commandTimeout"></param>
/// <returns></returns>
Task<IEnumerable<T>> QuerySingleTableAsync<T>(string sqlConditionPart = null, object condition = null, string sqlOrderByPart = null, int? commandTimeout = default(int?));
Task<IEnumerable<T>> QuerySingleTableAsync<T>(string sqlConditionPart = null, object condition = null, string sqlOrderPart = null, int? commandTimeout = default(int?));

/// <summary>
/// 执行DELETE操作
Expand Down
8 changes: 4 additions & 4 deletions src/XDbAccess.Dapper/XDbAccess.Dapper.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f4c4d3b

Please sign in to comment.