Hello all,
This is my first post, and my first try at 'contributing' to a project...
I've come across an issue with 'keywords' in derby. Bear in mind the
functionality as it currently stands does exactly what I would expect
(and as is described in the docs, as far as I can tell!).
My issue relates to 2 that are currently on jira
https://issues.apache.org/jira/browse/DERBY-2245
https://issues.apache.org/jira/browse/DERBY-3256
Bryan Pendleton made a comment on Derby2245
https://issues.apache.org/jira/browse/DERBY-2245?focusedCommentId=12539961&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12539961
Which encompasses my expectations exactly.
Background.
I'm converting (albeit slowly) a number of MS Access DB's to derbyDB. I
came across the problem that MS Access seems not to care about SQL
keywords as names for tables or columns!
I was unable to find a 'neat' solution to test names against all the
keywords that are reserved by Derby (so as I could then simply prepend
the name of the table to the field).
I did some searching and found the following page.
http://db.apache.org/derby/javadoc/language/sqlgrammar.html
This has 2 functions (or I assume they are functions or static
variables) in it: reservedKeyword and nonReservedKeyword
Due to my specific problem I took this list, and inserted the values
into my DB instance. During this process I found that a number of the
values where duplicated (is this to be expected?), this caused me a bit
of a surprise, but wasn't hard to solve.
The upshot is I have a nice mechanism for inserting the all the values
into a table.
If it would be helpful I would be more than happy to slightly modify
this code so as to get the values from the functions (mentioned above),
and insert them into a table somewhere.
If this would be a function that may be useful for users generally I
would be happy to investigate implementing it.
My Questions / problems are now the following.
Where do I find the java class file that contains the methods /
functions (or whatever they are) so as I can work out a way to extract them.
If I am to insert them into a table (I assume one of the system table,
or create a new one) where should they go?
Currently the DatabaseMetaData.getSQLKeywords() returns the 'non SQL92
keywords'. This seems fair enough, but I guess we should make this data
available somehow, what should I call the method, and what class file
should I put it in (I seem unable to find a DatabaseMetaData.java file ~
so I guess I'm missing something, or not looking hard enough!).
Other questions, info...
Did I mention that this is my first attempt at doing any contributing to
a project?
I normally use eclipse for my personal development, how can I go about
importing the project to an eclipse workspace?
I normally used OpenJDK when I'm at home (At work I use the Sun JDK7,
and then cross test with OpenJDK7 ~ unfortunately anything that involves
MS Access uses the sun.java.jdbc.odbc package, which I can't seem to
find a replacement for), is there any likelyhood this will cause be
grief? Also I'm on Junit 4.
I'm sure I'll get other "silly" questions before I commit my first
'patch', so please bear with me.
I look forward to hearing from you all.
David