本文整理汇总了TypeScript中common/query/services/rs-query-service.query函数的典型用法代码示例。如果您正苦于以下问题:TypeScript query函数的具体用法?TypeScript query怎么用?TypeScript query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了query函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getConstraintsInfo
/**
* Get list of constraints
*/
getConstraintsInfo() {
return this.$izendaRsQueryService.query('getconstraintslist', [], {
dataType: 'json'
}, {
handler: () => 'Failed to get constraints info'
});
}
示例2: setCrs
/**
* Set AdHocContext current report set
* @param {string} reportSetFullName Report set full name for check.
*/
setCrs(reportSetFullName: string): angular.IPromise<any> {
const errorText = this.$izendaLocaleService.localeText('js_SetCrsError', 'Failed to set current report set');
return this.$izendaRsQueryService.query('setcurrentreportset', [reportSetFullName], { dataType: 'text' }, {
handler: name => `${errorText}: ${name}`,
params: [reportSetFullName]
});
}
示例3: getVisualizationConfig
getVisualizationConfig() {
return this.$izendaRsQueryService.query('getVisualizationConfig', [], {
dataType: 'json'
}, {
handler: () => 'Failed to get visualizations config'
});
}
示例4: getReportParts
/**
* Get report parts
* @param {string} reportFullName Report full name (xxx@aaa\bbb).
*/
getReportParts(reportFullName: string): angular.IPromise<any> {
const errorText = this.$izendaLocaleService.localeText('js_ReportPartsError', 'Failed to get report parts for report');
return this.$izendaRsQueryService.query('reportdata', [reportFullName], { dataType: 'json' }, {
handler: name => `${errorText}: ${name}`,
params: [reportFullName]
});
}
示例5: getFieldsInfo
/**
* Load field info by given sql column name.
*/
getFieldsInfo(fieldSysName) {
return this.$izendaRsQueryService.query('getfieldsinfo', [fieldSysName], {
dataType: 'json'
}, {
handler: fieldName => `Failed to get field info for field ${fieldName}`,
params: [fieldSysName]
});
}
示例6: getDatasources
/**
* Get datasources
*/
getDatasources() {
return this.$izendaRsQueryService.query('getjsonschema', ['lazy'], {
dataType: 'json'
}, {
handler: () => 'Failed to get datasources',
params: []
});
}
示例7: checkReportSetExist
/**
* Check report set is exist. Returns promise with 'true' value if exists
* @param {string} reportSetFullName Report set full name for check.
*/
checkReportSetExist(reportSetFullName: string): angular.IPromise<any> {
if (!angular.isString(reportSetFullName) || reportSetFullName.trim() === '')
throw new Error('reportSetFullName should be non empty string');
const errorText = this.$izendaLocaleService.localeText('js_DashboardCheckExistError', 'Failed to check dashboard exist');
return this.$izendaRsQueryService.query('checkreportsetexists', [reportSetFullName], { dataType: 'text' }, {
handler: name => `${errorText}: ${name}`,
params: [reportSetFullName]
});
}
示例8: findInDatasources
/**
* Search fields in datasources (returns range of values [from, to])
*/
findInDatasources(searchString, from, to) {
let params = [encodeURIComponent(searchString)];
if (angular.isNumber(from) && angular.isNumber(to))
params = params.concat(String(from), String(to));
return this.$izendaRsQueryService.query('findfields', params, {
dataType: 'json'
}, {
handler: sString => `Failed to search fields and tables by keyword: ${sString}`,
params: [searchString]
});
}
示例9: setReportAsCrs
/**
* Create report set from json and set it as CurrentReportSet.
*/
setReportAsCrs(reportSetConfig) {
const paramsString = JSON.stringify(reportSetConfig);
return this.$izendaRsQueryService.query('setReportSetFromJsonToCrs', [paramsString], {
dataType: 'text',
headers: {
'Content-Type': 'text/html'
},
method: 'POST'
}, {
handler: () => 'Failed to set current report as CurrentReportSet'
});
};
示例10: getReportSetCategory
/**
* Get report list by category
* @param {string} category category name.
*/
getReportSetCategory(category: string): angular.IPromise<any> {
var categoryStr = angular.isDefined(category)
? (category.toLowerCase() === this.$izendaLocaleService.localeText('js_Uncategorized', 'Uncategorized').toLowerCase()
? ''
: category)
: '';
const errorText = this.$izendaLocaleService.localeText('js_GetCategoryError', 'Failed to get reports for category');
return this.$izendaRsQueryService.query('reportlistdatalite', [categoryStr], { dataType: 'json' }, {
handler: name => `${errorText}: ${name}`,
params: [category]
});
}