You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An occasionally re-occurring request is to be able to auto-alias top level projections for a variety of reasons, including:
Standardising output for some third party to consume
Migrate legacy SQL statements to a new scheme, where such projections might be useful
Accommodating the needs of a third party mapping library
An example would be:
SELECTt1.col1AS t1_col1,
t1.col2AS t1_col2,
t2.col3AS t2_col3
FROM t1, t2
So, the naming scheme would automatically concatenate table_column. Or also schema_table_column. Or schema_table_column_attribute. Or involve abbreviations from a lookub, e.g. tabl_column (where TABL is a standardised 4 character abbreviation for TABLE, just like ACCO would be the one for ACCOUNT. I've blogged about this approach here: https://blog.jooq.org/a-guide-to-sql-naming-conventions/).
The use case is probably not the most popular, but when it arises, jOOQ could add a lot of value here, because doing this manually is way too tedious and doing it with a utility on a per-query basis is still a bit error prone (it could be forgotten, users don't think of all the edge cases, e.g. when using aliases in ORDER BY, etc.)
Let's collect feedback about this requirement and see what we can offer here.
The text was updated successfully, but these errors were encountered:
An occasionally re-occurring request is to be able to auto-alias top level projections for a variety of reasons, including:
An example would be:
So, the naming scheme would automatically concatenate
table_column
. Or alsoschema_table_column
. Orschema_table_column_attribute
. Or involve abbreviations from a lookub, e.g.tabl_column
(whereTABL
is a standardised 4 character abbreviation forTABLE
, just likeACCO
would be the one forACCOUNT
. I've blogged about this approach here: https://blog.jooq.org/a-guide-to-sql-naming-conventions/).The use case is probably not the most popular, but when it arises, jOOQ could add a lot of value here, because doing this manually is way too tedious and doing it with a utility on a per-query basis is still a bit error prone (it could be forgotten, users don't think of all the edge cases, e.g. when using aliases in
ORDER BY
, etc.)Let's collect feedback about this requirement and see what we can offer here.
The text was updated successfully, but these errors were encountered: