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
The order of generated objects in code generation output is by default:
Alphabetic, where it doesn't matter. For example:
Sequences in a schema
Tables in a schema
In order of definition where it matters. For example:
Columns in a table
Parameters in a procedure
We guarantee this order by using SQL ORDER BY clauses in the jOOQ-meta implementations. This is often error prone as:
We sometimes forget to order content
We sometimes order content only partially
The order depends on something like a database collation, or a system flag, such as the MySQL lower_case_table_names
Instead, we could implement a default OrderProvider (a feature introduced in jOOQ 3.10: #4846) that works for all dialects alike, and stop ordering things in SQL.
Benefits:
All dialects behave the same way automatically
Edge cases can be fixed for all dialects
New dialects can be supported a bit more easily
The SQL statement might perform a bit better (the cost of ordering things is now in the client, of course)
Additional test coverage for the OrderProvider feature
The text was updated successfully, but these errors were encountered:
We probably still shouldn't remove ORDER BY clauses in Database implementations because custom order provider implementations might overlook some namespace relevant to ordering. If we produce ordered definitions to the user sort implementation, we could achieve a bit better sort stability in those cases.
The order of generated objects in code generation output is by default:
We guarantee this order by using SQL
ORDER BY
clauses in the jOOQ-meta implementations. This is often error prone as:lower_case_table_names
Instead, we could implement a default
OrderProvider
(a feature introduced in jOOQ 3.10: #4846) that works for all dialects alike, and stop ordering things in SQL.Benefits:
OrderProvider
featureThe text was updated successfully, but these errors were encountered: