org.hibernate.cfg.reveng.dialect.HSQLMetaDataDialect Maven / Gradle / Ivy
package org.hibernate.cfg.reveng.dialect;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.hibernate.tool.util.TableNameQualifier;
/**
* @author Dmitry Geraskov
*
*/
public class HSQLMetaDataDialect extends JDBCMetaDataDialect {
private String quote(String columnName) {
if(columnName==null) return columnName;
if(needQuote(columnName)) {
if(columnName.length()>1 && columnName.charAt(0)=='\"' && columnName.charAt(columnName.length()-1)=='\"') {
return columnName; // avoid double quoting
}
return "\"" + columnName + "\"";
} else {
return columnName;
}
}
public Iterator