#
#			ITSV GmbH
#	CCDB _ COmmand and Control Database
#
#	FILE:			dquerymfile_COMPMFILE.txt
#	DESCRIPTION:	DQUERY definition for DQUERY COMPMFILE
#					compiles a managed file and shows result as object
#
@querytitle			Kompiliere managed File
@querydescrption	Kompiliere einen Object Descriptor aus einem Managed File und zeige das Ergebnis als Object and
@group				TEST
@attributenames		mfid:mfileid
@querytype			function
@function			seqtrans.seqtrans

~query.tsteps

#
# <<TSTEPNUM:0>>: compile and build result
#
aexpression
	this.cctx = {};
	objcomp.compileMfile(this.query.mfid,this.cctx,{debug: true},
		function(err,res) {
			if (err) {
				this.errcoll.collect(err,"Error compiling mfile \""+this.query.mfileid+"\"",res);
				this();
				return;
			}
			this.result = new aux.Result({resulttype: 'object', resultobject: { global_context: this.cctx, comp_result: res }});
			this();
		}.bind(this)
	);