|
5 | 5 |
|
6 | 6 | /** |
7 | 7 | * @namespace 包含了使用了 LeanCloud |
8 | | - * <a href='/docs/bigquery_guide.html'>离线数据分析功能</a>的函数。 |
| 8 | + * <a href='/docs/leanInsight_guide.html'>离线数据分析功能</a>的函数。 |
9 | 9 | * <p><strong><em> |
10 | 10 | * 部分函数仅在云引擎运行环境下有效。 |
11 | 11 | * </em></strong></p> |
12 | 12 | */ |
13 | | - AV.BigQuery = AV.BigQuery || {}; |
| 13 | + AV.Insight = AV.Insight || {}; |
14 | 14 |
|
15 | | - _.extend(AV.BigQuery, /** @lends AV.BigQuery */ { |
| 15 | + _.extend(AV.Insight, /** @lends AV.Insight */ { |
16 | 16 |
|
17 | 17 | /** |
18 | | - * 开始一个 BigQuery 任务。结果里将返回 Job id,你可以拿得到的 id 使用 |
19 | | - * AV.BigQuery.JobQuery 查询任务状态和结果。 |
| 18 | + * 开始一个 Insight 任务。结果里将返回 Job id,你可以拿得到的 id 使用 |
| 19 | + * AV.Insight.JobQuery 查询任务状态和结果。 |
20 | 20 | * @param {Object} jobConfig 任务配置的 JSON 对象,例如:<code><pre> |
21 | 21 | * { "sql" : "select count(*) as c,gender from _User group by gender", |
22 | 22 | * "saveAs": { |
|
42 | 42 | jobConfig: jobConfig, |
43 | 43 | appId: AV.applicationId |
44 | 44 | } |
45 | | - var request = AV._request("bigquery", 'jobs', null, 'POST', |
| 45 | + var request = AV._request("insight", 'jobs', null, 'POST', |
46 | 46 | AV._encode(data, null, true)); |
47 | 47 |
|
48 | 48 | return request.then(function(resp) { |
|
51 | 51 | }, |
52 | 52 |
|
53 | 53 | /** |
54 | | - * 监听 BigQuery 任务事件,目前仅支持 end 事件,表示任务完成。 |
| 54 | + * 监听 Insight 任务事件,目前仅支持 end 事件,表示任务完成。 |
55 | 55 | * <p><strong><em> |
56 | 56 | * 仅在云引擎运行环境下有效。 |
57 | 57 | * </em></strong></p> |
58 | 58 | * @param {String} event 监听的事件,目前仅支持 'end' ,表示任务完成 |
59 | 59 | * @param {Function} 监听回调函数,接收 (err, id) 两个参数,err 表示错误信息, |
60 | | - * id 表示任务 id。接下来你可以拿这个 id 使用AV.BigQuery.JobQuery 查询任务状态和结果。 |
| 60 | + * id 表示任务 id。接下来你可以拿这个 id 使用AV.Insight.JobQuery 查询任务状态和结果。 |
61 | 61 | * |
62 | 62 | */ |
63 | 63 | on: function(event, cb) { |
64 | 64 | } |
65 | 65 | }); |
66 | 66 |
|
67 | 67 | /** |
68 | | - * 创建一个对象,用于查询 BigQuery 任务状态和结果。 |
| 68 | + * 创建一个对象,用于查询 Insight 任务状态和结果。 |
69 | 69 | * @class |
70 | 70 | * @param {String} id 任务 id |
71 | 71 | * @since 0.5.5 |
72 | 72 | */ |
73 | | - AV.BigQuery.JobQuery = function(id, className) { |
| 73 | + AV.Insight.JobQuery = function(id, className) { |
74 | 74 | if(!id) { |
75 | 75 | throw new Error('Please provide the job id.'); |
76 | 76 | } |
|
80 | 80 | this._limit = 100; |
81 | 81 | }; |
82 | 82 |
|
83 | | - AV.BigQuery.JobQuery.prototype = { |
| 83 | + AV.Insight.JobQuery.prototype = { |
84 | 84 |
|
85 | 85 | /** |
86 | 86 | * Sets the number of results to skip before returning any results. |
|
125 | 125 | limit: this._limit |
126 | 126 | }; |
127 | 127 |
|
128 | | - var request = AV._request("bigquery", 'jobs', this.id, "GET", |
| 128 | + var request = AV._request("insight", 'jobs', this.id, "GET", |
129 | 129 | params); |
130 | 130 | var self = this; |
131 | 131 | return request.then(function(response) { |
|
0 commit comments