1 package net.sourceforge.phpdt.sql.adapters;
3 public class DB2Adapter extends DatabaseAdapter {
4 public String getShowTableQuery(DatabaseInfo info) {
5 return "SELECT TABNAME FROM syscat.tables WHERE tabschema = '" + info.getSchema().toUpperCase() + "' AND TYPE='T'";
7 public String getShowViewQuery(DatabaseInfo info) {
8 return "SELECT TABNAME FROM syscat.tables WHERE tabschema = '" + info.getSchema().toUpperCase() + "' AND TYPE='V'";
10 public String getShowSequenceQuery(DatabaseInfo info) {
11 return "SELECT SEQNAME FROM sysibm.syssequences WHERE seqschema = '" + info.getSchema().toUpperCase() + "'";
13 public String getNextValue(String sequence) {
14 return "VALUES NEXTVAL FOR " + sequence;
16 public DatabaseAdapter getInstance() {
17 return new DB2Adapter();