当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript rs-query-service.query函数代码示例

本文整理汇总了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'
			});
	}
开发者ID:izenda,项目名称:resources,代码行数:10,代码来源:instant-report-query.ts

示例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]
		});
	}
开发者ID:izenda,项目名称:resources,代码行数:11,代码来源:common-query-service.ts

示例3: getVisualizationConfig

	getVisualizationConfig() {
		return this.$izendaRsQueryService.query('getVisualizationConfig', [], {
			dataType: 'json'
		}, {
				handler: () => 'Failed to get visualizations config'
			});
	}
开发者ID:izenda,项目名称:resources,代码行数:7,代码来源:instant-report-query.ts

示例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]
		});
	}
开发者ID:izenda,项目名称:resources,代码行数:11,代码来源:common-query-service.ts

示例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]
			});
	}
开发者ID:izenda,项目名称:resources,代码行数:11,代码来源:instant-report-query.ts

示例6: getDatasources

	/**
	 * Get datasources
	 */
	getDatasources() {
		return this.$izendaRsQueryService.query('getjsonschema', ['lazy'], {
			dataType: 'json'
		}, {
				handler: () => 'Failed to get datasources',
				params: []
			});
	}
开发者ID:izenda,项目名称:resources,代码行数:11,代码来源:instant-report-query.ts

示例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]
		});
	}
开发者ID:izenda,项目名称:resources,代码行数:14,代码来源:common-query-service.ts

示例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]
			});
	}
开发者ID:izenda,项目名称:resources,代码行数:14,代码来源:instant-report-query.ts

示例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'
			});
	};
开发者ID:izenda,项目名称:resources,代码行数:15,代码来源:instant-report-query.ts

示例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]
		});
	}
开发者ID:izenda,项目名称:resources,代码行数:16,代码来源:common-query-service.ts


注:本文中的common/query/services/rs-query-service.query函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。