-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Oracle TimesTen Dialect for Hibernate 6.6 Updates #10492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.6
Are you sure you want to change the base?
Conversation
…LimitHandler and TimesTenSequenceSupport
…ate contributor. Also addressing some comments from the PR
Thanks for your pull request! This pull request does not follow the contribution rules. Could you have a look? ❌ All commit messages should start with a JIRA issue key matching pattern › This message was automatically generated. |
Here's a new PR to update the TimesTen Community Dialect for Hibernate 6.6 I closed the previous PR: #10273 This is a clean PR with the same changes but addressed the previous comments:
Let me know any other comment. Thanks |
case SqlTypes.BLOB: | ||
return "BLOB"; | ||
case SqlTypes.CLOB: | ||
return "CLOB"; | ||
case SqlTypes.NCLOB: | ||
return "NCLOB"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at the Dialect
implementation, you will notice that the LOB handling here is redundant.
case SqlTypes.TINYINT: | ||
return "tt_tinyint"; | ||
return "TT_TINYINT"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert the all type names in this function to lower case again.
} | ||
} | ||
else if ( offsetClauseExpression != null && fetchClauseExpression == null ) { | ||
throw new UnsupportedOperationException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you use e.g. Integer.MAX_VALUE
then?
try { | ||
// TimesTen includes both m and n rows of 'ROWS m to n'; | ||
// We need to substract 1 row to fit maxRows | ||
renderFetchPlusOffsetExpressionAsLiteral( fetchClauseExpression, offsetClauseExpression, -1 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does TimesTen not support a parameter here?
renderFetchPlusOffsetExpressionAsLiteral( fetchClauseExpression, offsetClauseExpression, -1 ); | |
renderFetchPlusOffsetExpressionAsSingleParameter( fetchClauseExpression, offsetClauseExpression, -1 ); |
@@ -143,4 +145,56 @@ protected boolean supportsRowValueConstructorSyntaxInInList() { | |||
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() { | |||
return false; | |||
} | |||
|
|||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this function is only used in TimesTen, could you please remove it from AbstractSqlAstTranslator
?
case SqlTypes.TIMESTAMP: | ||
return "TIMESTAMP"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to do this, as the Dialect
implementation already handles timestamp.
case SqlTypes.TIMESTAMP: | |
return "TIMESTAMP"; |
case SqlTypes.CHAR: | ||
return "CHAR($l)"; | ||
case SqlTypes.VARCHAR: | ||
case SqlTypes.LONGVARCHAR: | ||
return "VARCHAR2($l)"; | ||
|
||
case SqlTypes.BINARY: | ||
return "BINARY($l)"; | ||
case SqlTypes.VARBINARY: | ||
case SqlTypes.LONGVARBINARY: | ||
return "VARBINARY($l)"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only need to handle the varchar type.
case SqlTypes.CHAR: | |
return "CHAR($l)"; | |
case SqlTypes.VARCHAR: | |
case SqlTypes.LONGVARCHAR: | |
return "VARCHAR2($l)"; | |
case SqlTypes.BINARY: | |
return "BINARY($l)"; | |
case SqlTypes.VARBINARY: | |
case SqlTypes.LONGVARBINARY: | |
return "VARBINARY($l)"; | |
case SqlTypes.LONGVARCHAR: | |
return "varchar2($l)"; |
Some updates from an Oracle employee to the Oracle TimesTen Community dialect. ( Hibernate 6.6 )
In TimesTenDialect.java
In TimesTenSqlAstTranslator.java
In TimesTenLimitHandler.java
In TimesTenSequenceSupport.java
Testing:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.