/// <summary> /// 官方文档: http://docs.bmob.cn/bql/index.html?menukey=otherdoc&key=bql /// </summary> /// <param name="bql">e.g. : select * from Player where name=? limit ?,? order by name' </param> /// <param name="values">必须是JsonAdapter.JSON能正常序列化的对象。 e.g. : ["dennis", 0, 100]</param> public void Sql <T>(string bql, List <Object> values, BmobCallback <QueryCallbackData <T> > callback) { var bia = BmobInteractObject.BQL; var kv = new BmobKV().Put("bql", bql); if (values != null) { kv.Put("values", values); } bia.Data = kv; submit(bia, callback); }
/// <summary> /// 云端代码 /// /// 执行Bmob的云端代码. /// /// 注意:SDK暂时不支持直接从云端返回primitive类型的数据。也就是返回的值要么是键值对,要么是数组 /// </summary> /// <typeparam name="T">对象。 FIXME 当前处理List的返回有问题!需要进一步的完善。</typeparam> /// <param name="eMethod">云端代码方法名</param> /// <param name="callback">云端代码结果的回调</param> public void Endpoint <T>(String eMethod, IDictionary <String, Object> parameters, BmobCallback <EndPointCallbackData <T> > callback) { var bia = BmobInteractObject.Endpoint; bia.EndPointName = eMethod; var endpoint = new BmobKV(); if (parameters != null) { endpoint.PutAll(parameters); } bia.Data = endpoint; submit(bia, callback); }