1 11 package com.nilostep.xlsql.sql.hsqldb; 12 13 import com.nilostep.xlsql.sql.xlSqlWriter; 14 15 import java.sql.*; 16 import java.text.*; 17 import java.util.*; 18 19 22 public class xlHsqldbWriter extends xlSqlWriter { 23 30 public String wCreateSchema(String s) { 31 return "--"; 32 } 33 34 42 public String wDropTable(String s, 43 String t) { 44 String sql; 45 sql = "DROP TABLE " + getTableName(s, t) + " IF EXISTS;"; 46 47 return sql; 48 } 49 50 protected String getTableName(String s, 51 String t) { 52 String tablename; 53 54 if (s.equalsIgnoreCase("sa")) { 55 tablename = "\"" + t + "\""; 56 } else { 57 tablename = "\"" + s + "." + t + "\""; 58 } 59 60 return tablename; 61 } 62 } | Popular Tags |