System-generated find() and exist() methods on tables
Good afternoon,
The following job will output correct (but not best practice) code for find() and exist() methods for any table (that has a primary key), to a text file:
public static void genFindNExist(Args _args)
{
SysDictTable sysDictTable;
AsciiIO asciiIO = new AsciiIO('C://Documents and Settings//#your user#//Desktop//asciio.txt', 'a');
;
{
SysDictTable sysDictTable;
AsciiIO asciiIO = new AsciiIO('C://Documents and Settings//#your user#//Desktop//asciio.txt', 'a');
;
sysDictTable = new SysDictTable(tablenum(AnyTableName));
asciiIO.write(sysDictTable.getSourceFind());
asciiIO.write(sysDictTable.getSourceExist());
asciiIO.write(sysDictTable.getSourceFind());
asciiIO.write(sysDictTable.getSourceExist());
}
本文介绍了一种自动生成针对任意具有主键的表格的find()和exist()方法的方案。通过提供的代码示例,可以为不同的表快速生成查找及存在性验证方法,并将生成的代码写入指定文件。
805

被折叠的 条评论
为什么被折叠?



