--- /dev/null
+package net.sourceforge.phpdt.sql.adapters;
+
+public abstract class DatabaseAdapter {
+ public abstract DatabaseAdapter getInstance();
+ public abstract String getShowTableQuery(DatabaseInfo info);
+ public String getShowViewQuery(DatabaseInfo info) {
+ throw new FeatureNotSupported("Views");
+ }
+ public String getShowSequenceQuery(DatabaseInfo info) {
+ throw new FeatureNotSupported("Sequences");
+ }
+ public final String getShowTableQuery(DatabaseInfo info, String table) {
+ String schema = info.getSchema();
+ if (schema.equals("")) {
+ return "SELECT * FROM " + table;
+ } else {
+ return "SELECT * FROM " + info.getSchema() + "." + table;
+ }
+ }
+ public final String getTableCountQuery(DatabaseInfo info, String table) {
+ String schema = info.getSchema();
+ if (schema.equals("")) {
+ return "SELECT COUNT(*) FROM " + table;
+ } else {
+ return "SELECT COUNT(*) FROM " + info.getSchema() + "." + table;
+ }
+ }
+ public String getNextValue(String sequence) {
+ throw new FeatureNotSupported("Sequences");
+ }
+ public String getTableListFilter() {
+ return null;
+ }
+}
\ No newline at end of file