* Returns the schema as an XML string.
*/
public String readSchemaColumn()
throws SQLException {
DBDictionary dict = _conf.getDBDictionaryInstance();
SQLBuffer sel = new SQLBuffer(dict).append(_schemaColumn);
SQLBuffer where = new SQLBuffer(dict).append(_pkColumn).append(" = ").
appendValue(Numbers.valueOf(1), _pkColumn);
SQLBuffer tables = new SQLBuffer(dict).append(_pkColumn.getTable());
SQLBuffer select = dict.toSelect(sel, null, tables, where, null,
null, null, false, false, 0, Long.MAX_VALUE);
Connection conn = getConnection();
PreparedStatement stmnt = null;
ResultSet rs = null;
boolean wasAuto = true;
try {
wasAuto = conn.getAutoCommit();
if (!wasAuto)
conn.setAutoCommit(true);
stmnt = select.prepareStatement(conn);
rs = stmnt.executeQuery();
rs.next();
String schema = (_schemaColumn.getType() == Types.CLOB) ?
dict.getClobString(rs, 1) : dict.getString(rs, 1);
return schema;