您的位置:首页 > 移动开发 > Objective-C

How to Compare two layer’s object: Get AOT objects both modified in USR & SL1 layer

2010-12-08 13:30 507 查看
[code]static void CompareJob(Args _args)


{


UtilElements utilElements;


UtilElements_Job utilElementsJob;


UtilElements_Job utilElementsJob_usr;


UtilElements_Job utilElementsJob_sl1;


;


 


delete_from utilElementsJob;


Insert_Recordset utilElementsJob(utilLevel, recordType, parentId, name)


select utilLevel, recordType, parentId, name from utilElements


where utilElements.utilLevel == UtilEntryLevel::usr || utilElements.utilLevel == UtilEntryLevel::sl1;


info("Imported completed!");


 


while select utilElementsJob_usr join utilElementsJob_sl1


where utilElementsJob_usr.utilLevel == UtilEntryLevel::usr


&& utilElementsJob_sl1.utilLevel == UtilEntryLevel::sl1


&& utilElementsJob_usr.name == utilElementsJob_sl1.name


// && utilElementsJob_usr.parentId == 0 && utilElementsJob_sl1.parentId == 0


&&


(


    (utilelementsJob_usr.recordType == UtilElementType::Class && utilelementsJob_sl1.recordType == UtilElementType::Class)


||


    (utilelementsJob_usr.recordType == UtilElementType::Form && utilelementsJob_sl1.recordType == UtilElementType::Form)


||


    (utilelementsJob_usr.recordType == UtilElementType::Table && utilelementsJob_sl1.recordType == UtilElementType::Table)


)


{


info(utilElementsJob_usr.name);


}


}

[/code]

How it works:

1. There is one special table in AOT\System Documentation\Tables\UtilElements, firstly, create a similar table UtilElements_Job with those fields: utilLevel(Enum: UtilEntryLevel), recordType(Enum: UtilElementType), parentId(int), name(EDT: Name)

2. import data from UtilElements table into new table UtilElements_Job

Bcs it’s very slow when querying the UtilElements table. (I cannot find the UtilElements table in AOT Data Dictionary tables folder, Maybe it is a system table, a file-based table, or a queried table…)

3. while select…
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: