【MQL】简单语句记录


前言

简单记录一些MQL语句。


一、语句内容

1.
创建policy对象
Add businessobject “Personal Computer” Metro0001  A policy Production description “Computer for a customer.;
2.
Add businessobject “System Box” Metro0001 A policy Production description “System box for a computer .;
3.
输出BO对象信息
Print bus “Personal Computer” Metro0001 A ;
4.
Print bus “Personal Computer” Metro0001 A select policy owner;
5.
select 之后的输出选项有很多.P97
6.
Print bus “Personal Computer” Metro0001 A select policy[Production].state[Planned];
7.
Step6+.signature[Ready].approve;
8.
输出的信息用/来进行分割处理
Print bus “Personal Computer” Metro0001 A select policy owner dump /;
9.
根据type名字来查询对象数据 ----9-11
Temp query businessobject “type_pattern” “name_pattern” “revision_pattern”+
+vault pattern owner pattern where query_expression;
10.
Temp query businessobject BO_NAME where query_expression select <select item(s)> dump | output file_name;
11.
For  9-10
Temp query bus PART *D* * where ‘attribute[Cost] > 25’ select policy current;
Temp query bus PART *D* * where ‘attribute[Cost] > 25 ‘ select policy current dump \;
Temp query bus PART *D* * where ‘attribute[Cost] >25’ select policy current dump , output c:\haha.txt ;
12.
罗列需要的对象信息
List businessobject [vault VAULT_NAME];
List [admin_object_name];
List ADMINTYPE [PATTERN] [select FIELDS][dUMP SEPARATOR][recordsep SEPARATOR][output FILENAME];
13.
For 12
List bus vault Manufacting;
List policy;
List policy P* select type format output “c:\haha.txt”;
 
14.
输出对象信息
Print bus BO_NAME;-------print bus “Personal Computer” Metro0001 A;
Print ADMIN_TYPE;  -----print policy Production;
 
15.
For 14
Print bus “Personal Computer” Metro0001 A select id;
Print bus 49932.59954.60768.61277;
Print role (role);
Print type “type_name” select derived;
Print format Word;
Print person (person) select assignment;
 
16.
查看连接的对象
Expand bus “System Box” Metro0001 A ;
Expand bus “System Box” Metro0001 A from recourse to all ;
Expand bus “System Box” Metro0001 A from recurse to all rel “*Assembly” select bus attribute[Cost] dump | ;
Expand bus “System Box” Metro0001 A from recourse to all terse;
Expand bus “Personal Computer” Metro0001 A from select bus attribute[Source] select rel attribute[Quantity] dump |;
 
17.
For  16
Expand bus “System Box” Metro0001 A ;
Expand bus “System Box” Metro0001 A from recurse to all;
Expand bus “System Box”Metro0001 A from recurse to all rel “*Assembly” select bus attribute[Cost];
 
 
18.
在事务的开始和提交之间包含的命令将在一次操作中写入数据库。
Add businessobject “Type” “Name” Revision policy “policy_name” vault “vault_name” +
+description “description_text” image “path_image” owner “user_name” state “state_name”+
+schedule “date” “attribute_name” value;
 
19.
创建业务对象
Add businessobject “System Box” Metro0001 A policy Production description “My first try+
+Weight 35 Source Intel Cost 1000.00  “Expansion Slots” 5 “Computer Style” Tower “CPU Model” +”Pentium 4” “CPU Speed” 2GHZ;
 
20.
连接业务对象
Connect businessobject BO_NAME relationship “relationship_name” to B0_NAME +
+ attribute_name value;
 
Connect bus “Customer Order” Metro0001 1 relationship Order-PC to “Personal Computer” Metro0001 A OrderQty 5;
 
21.
修改业务对象
Modify businessobject BO_NAME [MOD_ITEM];
Modify businessobject “system box” Metro0001 A description “My system box”;
 
22.
删除业务对象
Delete businessobject BO_NAME [[format FORMAT_NAME] file FILENAME{,FILENAME}];
 
23.
使用接口
Add interfaces NAME [ADD_ITEM{ADD_ITEM }];

24.
print type "TYPE_NAME";
list group  *  select person; 列出所有组,并显示person
list role * select name assignment;

25.  
添加修改删除BO对象,在第136页
连接业务对象,在第137页
 
26.
 在数据库中查询连接到“Project Concept”“gphones1”001的所有对象
expands bus "Project Concep"  gphones1 001 from recurse all;
在数据库输出"Project Concep"  gphones1 001  对象
print bus "Project Concep"  gphones1 001  ;
使用select语句只显示谁是“项目概念”“gphones1”“001”的所有者
priny bus "Project Concep"  gphones1 001 select owner;
计算包含任务的任何管理类型的业务对象的数量。
evaluate expression "Count TRUE " on temp query bus Task * *;

总结

这篇文章属于整理很早之前的笔记,可借鉴度不高。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值