本文整理汇总了TypeScript中dojo/store/util/SimpleQueryEngine.SimpleQueryEngine函数的典型用法代码示例。如果您正苦于以下问题:TypeScript SimpleQueryEngine函数的具体用法?TypeScript SimpleQueryEngine怎么用?TypeScript SimpleQueryEngine使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SimpleQueryEngine函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
]).then(lang.hitch(this, function (response) {
var accountPermissions = {};
arrayUtil.forEach(response[1], function (item, idx) {
accountPermissions[item.PermissionName] = item;
}, this);
var data = [];
arrayUtil.forEach(response[0], function (item, idx) {
var accountPermission = accountPermissions[item.name];
data.push(lang.mixin(item, {
__hpcc_type: "Resources",
__hpcc_id: this.parentRow.__hpcc_id + CONCAT_SYMBOL + item.name,
__hpcc_parent: this.parentRow,
DisplayName: item.description ? item.description : item.name,
AccountName: this.groupname,
allow_access: accountPermission ? accountPermission.allow_access : false,
allow_read: accountPermission ? accountPermission.allow_read : false,
allow_write: accountPermission ? accountPermission.allow_write : false,
allow_full: accountPermission ? accountPermission.allow_full : false,
deny_access: accountPermission ? accountPermission.deny_access : false,
deny_read: accountPermission ? accountPermission.deny_read : false,
deny_write: accountPermission ? accountPermission.deny_write : false,
deny_full: accountPermission ? accountPermission.deny_full : false
}));
}, this);
options = options || {};
this.setData(SimpleQueryEngine({}, { sort: options.sort })(data));
return this.data;
}));
示例2: Permissions
Permissions().then(lang.hitch(this, function (response) {
var data = [];
if (lang.exists("BasednsResponse.Basedns.Basedn", response)) {
arrayUtil.forEach(response.BasednsResponse.Basedns.Basedn, function (item, idx) {
data.push(lang.mixin(item, {
__hpcc_type: "Permission",
__hpcc_id: item.basedn,
DisplayName: item.name,
children: lang.mixin(CreateResourcesStore(this.groupname, this.username, item.basedn), {
parent: this,
parentRow: item
})
}));
}, this);
}
options = options || {};
this.setData(SimpleQueryEngine({}, { sort: options.sort })(data));
deferredResults.resolve(this.data);
deferredResults.total.resolve(this.data.length);
}));