com.scudata.expression.CreateRecord Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.expression;
import com.scudata.dm.Context;
import com.scudata.dm.DataStruct;
import com.scudata.dm.Record;
/**
* ??????¼
* {f1:v1,...} ?ֶ????dz?????ֵ?DZ???ʽ
* @author RunQian
*
*/
public class CreateRecord extends Function {
public Node optimize(Context ctx) {
if (param != null) {
param.optimize(ctx);
}
return this;
}
public Object calculate(Context ctx) {
ParamInfo2 pi = ParamInfo2.parse(param, "{}", true, true);
String []names = pi.getExpressionStrs1();
Object []values = pi.getValues2(ctx);
DataStruct ds = new DataStruct(names);
return new Record(ds, values);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy