KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nilostep > xlsql > sql > mckoi > xlMcKoiWriter


1 /*(Header: NiLOSTEP / xlSQL)
2
3     Copyright (C) 2004 NiLOSTEP Information Sciences, all
4     rights reserved.
5     
6     This program is licensed under the terms of the GNU
7     General Public License.You should have received a copy
8     of the GNU General Public License along with this
9     program;
10 */

11
12 package com.nilostep.xlsql.sql.mckoi;
13
14 import com.nilostep.xlsql.sql.xlSqlWriter;
15
16 import java.sql.*;
17 import java.text.*;
18 import java.util.*;
19
20 /**
21  * DOCUMENT ME!
22  *
23  * @author Jim Caprioli
24  */

25 public class xlMcKoiWriter extends xlSqlWriter {
26     //~ Methods ································································
27

28     /**
29      * TODO: javadoc
30      *
31      * @param s
32      *
33      * @return sql string for 'CREATE SCHEMA'
34      */

35     public String JavaDoc wCreateSchema(String JavaDoc s) {
36         return "CREATE SCHEMA " + s + ";";
37     }
38
39     /**
40      * TODO: javadoc
41      *
42      * @param s
43      * @param t
44      *
45      * @return sql string for 'DROP TABLE'
46      */

47     public String JavaDoc wDropTable(String JavaDoc s,
48                              String JavaDoc t) {
49 //NiLOSTEP...
50
//workaround for IF EXISTS known bug in McKoi 1.0.2
51
//return "DROP TABLE IF EXISTS " + s + "." + t + ";";
52
return null;
53 //End
54
}
55
56     protected String JavaDoc getTableName(String JavaDoc s,
57                                   String JavaDoc t) {
58         return "\"" + s + "." + t + "\"";
59     }
60 }
Popular Tags