chore: 调整 LCQuery 与 LCQuery<T> 的关系

oneRain 2020-05-13 15:54:50 +08:00
parent 8de256993a
commit fb5c0754b2
1 changed files with 21 additions and 14 deletions

View File

@ -8,13 +8,9 @@ using LeanCloud.Storage.Internal.Query;
using LeanCloud.Storage.Internal.Object; using LeanCloud.Storage.Internal.Object;
namespace LeanCloud.Storage { namespace LeanCloud.Storage {
/// <summary> public class LCQuery {
/// 查询类
/// </summary>
/// <typeparam name="T"></typeparam>
public class LCQuery<T> where T : LCObject {
public string ClassName { public string ClassName {
get; private set; get; internal set;
} }
public LCCompositionalCondition Condition { public LCCompositionalCondition Condition {
@ -26,6 +22,25 @@ namespace LeanCloud.Storage {
Condition = new LCCompositionalCondition(); Condition = new LCCompositionalCondition();
} }
internal Dictionary<string, object> BuildParams() {
return Condition.BuildParams();
}
internal string BuildWhere() {
return Condition.BuildWhere();
}
}
/// <summary>
/// 查询类
/// </summary>
/// <typeparam name="T"></typeparam>
public class LCQuery<T> : LCQuery where T : LCObject {
public LCQuery(string className) :
base(className) {
}
/// <summary> /// <summary>
/// 等于 /// 等于
/// </summary> /// </summary>
@ -421,13 +436,5 @@ namespace LeanCloud.Storage {
compositionQuery.ClassName = className; compositionQuery.ClassName = className;
return compositionQuery; return compositionQuery;
} }
Dictionary<string, object> BuildParams() {
return Condition.BuildParams();
}
internal string BuildWhere() {
return Condition.BuildWhere();
}
} }
} }