MQL (Matrix Query Language) is an interface allows administrators to interact with enovia database. MQL is similar to SQL for enovia database.
In
enovia Objects are referred to as Business Objects. Each business
object is identified with TYPE, NAME, and REVISION. Here TYPE means an
object of a type. TYPE is similar to CLASS in java. NAME is the name of the business object and REVISION is similar to the version of the object.
MQL Commands
Business Objects
MQL<1>print bus TYPE NAME REVISION;
The print bus query is used to print business object details in the mql console. It is used to print the properties of the business object.
MQL<2>print bus TYPE NAME REVISION select attribute.value;
This query is used to display all attribute values from the business object.
MQL<3>print bus TYPE NAME REVISION select attribute[ATTRIBUTE_NAME].value;
This query is used to display specific attribute values from the business object. Here you need to replace 'ATTRIBUTE_NAME' with the actual attribute name.
MQL<4>temp query bus TYPE NAME REVISION;
temp query bus Query is used to get the multiple business objects details on the mql console.
MQL<5>temp query bus Part * *;
The above query displays all the Part objects present in the database irrespective of name and revision.
MQL<6>expand bus TYPE NAME REVISION;
It is used to display connected business objects. In this query, we can filter the connected object using type as well.
MQL<7>add bus TYPE NAME REVISION policy [POLICY_NAME] vault [VAULT_NAME];
This query is used to create a business object in enovia. Here policy governs the type and controls the behavior of the business object. Vault is the logical storage location for the business object.
MQL<8>mod bus TYPE NAME REVISION [ATTRIBUTE_NAME] [ATTRIBUTE_VALUE];
This query is used to modify the business object details like attribute values, owner, Originator, and so on.
MQL<9>eval expression 'count true' on temp query bus TYPE * *;
This query is used to count the number of objects for a particular type in the enovia database.
MQL<3>pri bus Part A-CV-001 1 select attribute[Count].value;
Q. Checkin a file into a business object in enovia from mql
A. checkin bus TYPE NAME REVISION D:\Files\ABC.txt
MQL<4>checkin bus Part A-CV-001 1 D:\Files\ABC.txt;
Q. Checkout file from a business object in enovia using mql
A. checkout bus TYPE NAME REVISION D:\Files\ABC;
MQL<5>checkout bus Part A-CD-001 1 D:\Files\ABC;
Q. MQL command to add the license to a user in envoia
A. mod product PRODUCT_NAME add person USER_NAME;
MQL<6>mod product EXE add person Chetan;
Q. Enovia MQL query to add program or JPO into the database
A. insert program PROGRAM_NAME (with path)
MQL<7> insert prog D:\JPO\Part_mxJPO.java;
Q. Enovia MQL query to compile the program
A. compile prog PROGRAM_NAME force compile;
MQL<8> compile prog Part force compile;
To compile the inserted program in the database. force compile helps to compile the related parent classes if any.
MQL<9>execute program Part;
To execute the program in mql
Note:- If you execute the program by using the above command by default it will start execution from the mxMain method.
MQL<9>execute program Part -method executeTCL;
execute program PROGRAM_NAME -method METHOD_NAME;
To execute the specific method in mql
Note:-If you execute the program by using the above command by default it will start execution from the desired method and we can pass the command line arguments as well.
Q. MQL Query to modify access for a user in enovia
A. mod person PERSON_NAME type ACCESS_TYPE;
MQL<10>mod person John type business;
MQL<11>mod person John type full;
Q. MQL Query to modify access for a user in enovia
A. mod person PERSON_NAME access ACCESS_TYPE;
MQL<12>mod person John type create, read, show;
MQL<13>mod person John type create,read,show,checkin,fromconnect;
MQL<> print person PERSON_NAME select assignment
Query to print roles of a user in envoia
MQL<14>pri person Jhon select assignment;
To get the list of roles a person has in enovia
MQL<1>expand bus TYPE NAME REVISION select id;
Ex: expand bus Part A-DB-001 001 select id;
<MQL<2>expand bus TYPE NAME REVISION rel REL_NAME;
Ex: expand bus Part A-DB-001 001 rel EBOM;
MQL<3> expand bus TYPE NAME REVISION select bus id;
Ex: expand bus Part A-DB-001 001 select bus id;
MQL<>expand bus Part PART1 001 recurse to 2;
to get multiple levels in expand bus
expand bus TYPE NAME REVISION recurse to N;
Note: Here "N" means the number of levels
MQL<>expand bus Part ABC 001 limit 5;
To add a limit to expand bus
expand bus TYPE NAME REVISION limit N;
SearchIndex
MQL<1> print system searchindex;
To print the searchindex file config.xml in the console
MQL<2> start searchindex mode FULL|PARTIAL [vault PATTERN] [limit N]
To start the indexing of search index. We can give the mode of search index as full or partial and also we can do indexing for specific vault as well.
MQL<3> update searchindex vault VAULT_NAME type TYPE_NAME;
MQL<4> stop searchindex [vault PATTERN];
To stop the currently running searchindex
MQL<5> status searchindex [vault PATTERN];
To get the current status of the search index is in progress.
MQL<6> validate searchindex;
To validate the inserted config.xml and check for errors
MQL<7> help searchindex;
To get the list of all possible commands we can perform in the search index
0 Comments