本文整理匯總了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);
}));