|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.upenn.crimson.io.SQL
public class SQL
Most SQL commands are contained here, to facilitate portability to different databases. This object does not do anything other than return SQL code. The running of the code and processing of the output is done by the calling methods.
Field Summary | |
---|---|
private static int |
dbType
This is a name of the database: -1 = none. |
private static java.lang.String[] |
dbTypes
This is the list of databases we can use. |
Constructor Summary | |
---|---|
SQL()
|
Method Summary | |
---|---|
static java.lang.String |
createTable(java.lang.String table)
This method will create all of the necessary tables. |
static java.lang.String |
dbDriver()
|
static java.lang.String |
dbURL()
|
static java.lang.String |
getDate()
This will return the database date, as is used to test database connectivity. |
static java.lang.String |
getDBType()
Get the type of database (oracle or mysql). |
static java.lang.String[] |
getDBTypes()
|
static int |
getDBTypeValue()
Get the index value of the type of database. |
static boolean |
isMySQL()
|
static boolean |
isOracle()
|
static boolean |
setDBType(java.lang.String type)
Set the type of database (oracle or mysql). |
static java.lang.String |
tableExists(java.lang.String table)
This code will return the table name, if the table exists in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String[] dbTypes
private static int dbType
Constructor Detail |
---|
public SQL()
Method Detail |
---|
public static java.lang.String[] getDBTypes()
public static java.lang.String getDBType()
public static boolean setDBType(java.lang.String type)
public static int getDBTypeValue()
public static boolean isOracle()
public static boolean isMySQL()
public static java.lang.String dbDriver()
public static java.lang.String dbURL()
public static java.lang.String getDate()
public static java.lang.String tableExists(java.lang.String table)
public static java.lang.String createTable(java.lang.String table)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |