1 package com.quantum.adapters;
3 import com.quantum.sql.SQLHelper;
5 public class DB2Adapter extends DatabaseAdapter {
6 public String getShowTableQuery(String qualifier, boolean isDefault) {
7 return "SELECT TABNAME FROM syscat.tables WHERE tabschema = '" + qualifier.toUpperCase() + "' AND TYPE='T'"; //$NON-NLS-1$ //$NON-NLS-2$
9 public String getShowViewQuery(String qualifier, boolean isDefault) {
10 return "SELECT TABNAME FROM syscat.tables WHERE tabschema = '" + qualifier.toUpperCase() + "' AND TYPE='V'"; //$NON-NLS-1$ //$NON-NLS-2$
12 public String getShowSequenceQuery(String qualifier, boolean isDefault) {
13 return "SELECT SEQNAME FROM sysibm.syssequences WHERE seqschema = '" + qualifier.toUpperCase() + "'"; //$NON-NLS-1$ //$NON-NLS-2$
15 public String getNextValue(String sequence, String owner) {
16 return "VALUES NEXTVAL FOR " + SQLHelper.getQualifiedName(owner, sequence); //$NON-NLS-1$
18 public String getPrevValue(String sequence, String owner) {
19 return "VALUES PREVVAL FOR " + SQLHelper.getQualifiedName(owner, sequence); //$NON-NLS-1$