Skip to content

Commit 4610335

Browse files
committed
- Added new getReservedKeywords() method to the Database class
git-svn-id: svn://192.168.0.80/JavaXT/javaxt-core@1563 2c7b0aa6-e0b2-3c4e-bb4a-8b65b6c465ff
1 parent 15586e5 commit 4610335

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/javaxt/sql/Database.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,19 @@ public static String[] getCatalogs(Connection conn){
902902
//**************************************************************************
903903
//** getReservedKeywords
904904
//**************************************************************************
905-
/** Used to retrieve a list of reserved keywords for a given database.
905+
/** Returns a list of reserved keywords for the current database.
906+
*/
907+
public String[] getReservedKeywords() throws Exception {
908+
try(Connection conn = this.getConnection()){
909+
return getReservedKeywords(conn);
910+
}
911+
}
912+
913+
914+
//**************************************************************************
915+
//** getReservedKeywords
916+
//**************************************************************************
917+
/** Returns a list of reserved keywords for a given database.
906918
*/
907919
public static String[] getReservedKeywords(Connection conn){
908920
Database database = conn.getDatabase();
@@ -1152,12 +1164,12 @@ public Database clone(){
11521164
"CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER",
11531165
"DISTINCT","EXCEPT","EXISTS","FALSE","FETCH","FILTER","FOR","FOREIGN",
11541166
"FROM","FULL","GROUP","GROUPS","HAVING","IF","ILIKE","IN","INNER",
1155-
"INTERSECT","INTERSECTS","INTERVAL","IS","JOIN","LEADING","LEFT","LIKE",
1167+
"INTERSECT","INTERSECTS","INTERVAL","IS","JOIN","KEY","LEADING","LEFT","LIKE",
11561168
"LIMIT","LOCALTIME","LOCALTIMESTAMP","MINUS","NATURAL","NOT","NULL","OFFSET",
11571169
"ON","OR","ORDER","OVER","PARTITION","PRIMARY","QUALIFY","RANGE","REGEXP",
11581170
"RIGHT","ROW","_ROWID_","ROWNUM","ROWS","SELECT","SYSDATE","SYSTIME",
11591171
"SYSTIMESTAMP","TABLE","TODAY","TOP","TRAILING","TRUE","UNION","UNIQUE",
1160-
"VALUES","WHERE","WINDOW","WITH"
1172+
"VALUE","VALUES","WHERE","WINDOW","WITH","YEAR"
11611173
};
11621174

11631175

0 commit comments

Comments
 (0)