@lcap/asl
Version:
NetEase Application Specific Language
36 lines (34 loc) • 771 B
text/typescript
import { immutable } from '../../decorators';
import { ExpressionNode, LOGIC_TYPE } from '../LogicItem';
/**
* 实体操作
* @TODO: 当前类目前主要用于生成文档
*/
export class DBQuery extends ExpressionNode {
/**
* 逻辑节点类型
*/
()
public readonly type: LOGIC_TYPE = LOGIC_TYPE.DBQuery;
/**
* 实体
*/
()
public readonly entity: string = undefined;
/**
* 实体
*/
()
public readonly method: string = undefined;
/**
* 参数
*/
()
public readonly arguments: Array<ExpressionNode> = [];
/**
* 生成 JS 脚本
*/
toScript() {
return `JSON.stringify(${this.arguments[0].toScript()})`;
}
}