Hi Adam, 2014-02-13 13:32 GMT+01:00 <[email protected]>:
> Hi Lukas > > Thanks for investigating further. > > For what it's worth, it actually seems like the IGNORECASE setting makes > no difference here; it's only MODE=MySQL that causes the case to be > different. > > Running the query for constraints with case-sensitivity on (H2 default) > produces the following results: > > URL: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=MySQL > Outputs: public,consultant,CONSULTANTID,constraint_1 > > URL: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 > Outputs: PUBLIC,CONSULTANT,CONSULTANTID,CONSTRAINT_1 > > According do the H2 documentation about MySQL Compatibility Mode, The fact > that *"Meta data calls return identifiers in lower case"* is by design: > http://h2database.com/html/features.html#compatibility > I think Thomas is a PostgreSQL aficionado and thus chose lower case. Many other databases report case-insensitive names as upper-case. I believe that the SQL standard is indifferent with respect to that, though. Therefore, it seems to me that jOOQ cannot assume the case of meta data > when using H2 because, as far as I can see, there's no way of jOOQ's code > generator knowing whether or not the underlying database is in > compatibility mode. In fact, even if you could determine compatibility > mode, it's probably not wise to dabble in such a thing. > It would be a terrible idea :-) But a global explicit flag might eventually be useful. I'm not sure if it is feasible, though. > If the column list does disappear and a better way to join indexes and > constraints is established then this might solve the problem but, if not, > would it still not be reasonable to use case-insensitivity for code > generation against H2? > My personal opinion is to always stay in full control of casing, especially when you support several databases, and when you're starting a project. It's the only way to get it right because apart from SQLite, all databases correctly implement quoted, case-sensitive names. If you're adding H2 to a legacy, case-insensitive MySQL database, then I'm not quite sure what the best approach would be... Cheers Lukas -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
