On 11 Apr., 20:20, Thomas Mueller <[email protected]>
wrote:
> Hi,
>
> Yes, I think that would be a nice feature. Could you explain why
> exactly you need it? If is a compatibility problem, if yes:
> compatibility with which database?
In this particular case it was a compatibility issue with an
OracleDatabase. The application code calls the functions with it's
schemaname - and it has to do so, because the businesslogic is no
schema invariant.

> SchemaCommand: the following line does not follow the code style of
> the rest of H2:
> if (schema == null )  throw new NullPointerException("Schema is null.");
> (it should be an internal error, not a null pointer; use { })
Yepp. Correct. I did this for debugging purposes and forgot to exclude
this line from the patch.

> Database.java: don't comment out code. Instead, remove the code.
Good point. I prefere the same. I included the old lines, so that some
h2 developer would be able to follow my changes very quickly without
the need of subversion history. As above I would never commit these
changes to the repository.

> FunctionAlias.java: why did you remove the "if (!force) {" ? Don't.
I can't remember. Yes. Leave it as is. Obviously a mistake of mine.

> FunctionAlias.java: "space deleted" - I don't understand that. Don't
> remove the space.
Please have a look at the methode mentioned in the comment. Some test
shows red if space is included. Without rolling back the other
methode, you have to delete the space, like I did, to have green
tests. I had to include an additional test
TestFunctions.testWhiteSpacesInParameters() to reflect another error
which would occur during run simple test script - or was it the other
test script?
The problem was: A user (not h2 developer) has to know if spaces after
a comma in the method-parameter list are mandatory or not. With my
changes, he is free to use
java.lang.Integer.parseInt(java.lang.String, int) OR
java.lang.Integer.parseInt(java.lang.String,int). Add the space and
this test would break:
Exception in thread "main" org.h2.jdbc.JdbcSQLException: Die (public
static) Java Funktion wurde nicht gefunden:
"parseInt(java.lang.String,int) (java.lang.Integer)"
The public static Java method was not found:
"parseInt(java.lang.String,int) (java.lang.Integer)"; SQL statement:
CREATE ALIAS PARSE_INT2 FOR
"java.lang.Integer.parseInt(java.lang.String, int)"; [90139-133]
at
org.h2.test.db.TestFunctions.testWhiteSpacesInParameters(TestFunctions.java:
487)

> The code formatting is incorrect in several files. 
> Seehttp://www.h2database.com/html/build.html#providing_patches-
> specially eclipseCodeStyle
I was aware of the Eclipse CodeStyle - but obviously a bit too late. I
tried to reformat all my changes, but you have found some gaps.
Do you remember where?

> Otherwise the patch looks very good. It's great that you have added test 
> cases!
Thanks. Let me know, what to do to include my patch in the main line.

Kind regards,
Marcus

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to