Hi,

> Well, I at nights I dream about jooq having two operation modes: "fully
> qualified schemata objects naming" and "short schemata objects naming".

You should go on vacation if you start dreaming about jOOQ!

> Short mode is also useful for debugging because SQL queries (having all
> schema names omitted) become more readable. And the ability to switch to
> full mode in production is simply miraculous.

I think this can be sufficiently covered today by using the
SchemaMapping with a mapping of your schema to (Schema) null. Have you
tried that? It's not officially documented or tested, but it might
work.

> For example, we have some logging in database in the table "log". And we
> want this logging to be transparent. And we want customizable log rotation.
> In this case we can setup table mapping so that the most recent table is
> always referred to as "log" being actually named "log_2011-05-25" or
> "log_2011-05" depending on rotation settings and others are invisible from
> jooq.

That makes sense. Of course, these specific things can always be
implemented with writable views, as well.

> This is as I understand, table-by-table mapping. Can you provide an example
> of prefix mapping? I didn't catch it.

I remember from my LAMP-times (early days), that some PHP products
ship with a database whose tables should be prefixed, as you cannot
always rely on having a dedicated database per product. In order to
prevent naming clashes between several products installed on the same
database (two products both having a "users" table, for instance), you
can prefix a product's tables with "prod_a" and "prod_b", such that
you will have "prod_a_users" and "prod_b_users" tables. But that's in
fact the same issue as your logging example.

I have added this feature request:
https://sourceforge.net/apps/trac/jooq/ticket/551

Reply via email to