1 | for (int i = 0; i < dbObjs.length; i++)↵ | | 1 | for (int i = 0; i < dbObjs.length; i++)↵
|
2 | {↵ | | 2 | {↵
|
3 | ITableInfo ti = (ITableInfo) dbObjs[i];↵ | | 3 | IProcedureInfo pi = (IProcedureInfo) dbObjs[i];↵
|
|
4 | ///////////////////////////////////////////////////////////↵ | | 4 | ///////////////////////////////////////////////////////////↵
|
5 | // IBM DB 2 specific code to read view definitions.↵ | | 5 | // SybaseASE specific code to read procedure definitions.↵
|
6 | String sql =↵ | | 6 | String sql =↵
|
7 | "SELECT TEXT " +↵ | | 7 | "Select text " +↵
|
8 | "FROM SYSIBM.SYSVIEWS " +↵ | | 8 | "from sysobjects inner join syscomments on syscomments.id = sysobjects.id " +↵
|
9 | "WHERE NAME = '" + ti.getSimpleName() + "'";↵ | | 9 | "where name = '" + pi.getSimpleName().replace(";1", "") + "'";↵
|
|
10 | ResultSet res = stat.executeQuery(sql);↵ | | 10 | ResultSet res = stat.executeQuery(sql);↵
|
|
11 | res.next();↵ | | 11 | while(res.next()↵
|
|
| | | 12 | )↵
|
| | | 13 | {↵
|
12 | script.append(res.getString("TEXT"));↵ | | 14 | script.append(res.getString("↵
|
| | | 15 | text")); ↵
|
| | | 16 | }↵
|
13 | script.append(getStatementSeparator());↵ | | 17 | script.append(getStatementSeparator());↵
|
14 | res.close();↵ | | 18 | res.close();↵
|
15 | //↵ | | 19 | //↵
|
16 | ///////////////////////////////////////////////////////////↵ | | 20 | ///////////////////////////////////////////////////////////↵
|
17 | } | | 21 | }
|