Skip to content

Oracle Timesten dialect updates #10273

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

Open
wants to merge 5 commits into
base: 6.6
Choose a base branch
from

Conversation

carlblan
Copy link

@carlblan carlblan commented Jun 3, 2025

Some updates from an Oracle employee to the Oracle TimesTen Community dialect. ( Hibernate 6.6 )

In TimesTenDialect.java

  • Adding more datatypes into columnType()
  • Added more SQL functions support into initializeFunctionRegistry()
  • Updated the custom definition for 'getForUpdateString()'
  • Added a custom definition for 'getNativeIdentifierGeneratorStrategy()'
  • Added a custom definition for 'currentDate()'
  • Added a custom definition for 'currentTime()'
  • Added a custom definition for 'getMaxVarcharLength()'
  • Added a custom definition for 'getMaxVarbinaryLength()'
  • Added a custom definition for 'isEmptyStringTreatedAsNull()'
  • Added a custom definition for 'supportsTupleDistinctCounts()'
  • Added a custom definition for 'getDual()'
  • Added a custom definition for 'getFromDualForSelectOnly()'

In TimesTenSqlAstTranslator.java

  • Added a custom definition for 'renderRowsToClause()'

In TimesTenLimitHandler.java

    • The class now extends 'AbstractLimitHandler'
    • Removed a custom definition for 'insert()'
    • Added a custom definition for 'supportsLimit()'
    • Added a custom definition for 'supportsOffset()'
    • Added a custom definition for 'supportsLimitOffset()'
    • Added a custom definition for 'supportsVariableLimit()'
    • Added a custom definition for 'convertToFirstRowValue(int zeroBasedFirstResult)'
    • Added a custom definition for 'useMaxForLimit()'
    • Added a custom definition for 'limitClause(boolean hasFirstRow)'

In TimesTenSequenceSupport.java

    • The Class now implements 'SequenceSupport'
    • Added a custom definition for 'supportsSequences()'
    • Added a custom definition for 'supportsPooledSequences()'
    • Added a custom definition for 'getSelectSequenceNextValString(String sequenceName)'
    • Added a custom definition for 'getSequenceNextValString(String sequenceName)'
    • Added a custom definition for 'getCreateSequenceString(String sequenceName)'
    • Added a custom definition for 'getDropSequenceString(String sequenceName)'

Testing:

  • The changes were tested with some local tests we have using this Hibernate 6 TimesTen community dialect.

SPECIAL NOTE:

  • 'copyright notices' were added for each change made to the code. As this was suggested by our company lawyers.
    Please review those and let me know If there's a problem with that.

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.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Jun 3, 2025

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 HHH-\d+
    ↳ Offending commits: [e52adc2, 2b79fed, 454433f, 1c492bd, 0b4bc8e]

› This message was automatically generated.

@mbellade
Copy link
Member

mbellade commented Jun 5, 2025

Hi @carlblan, thank you for the contribution.

  • 'copyright notices' were added for each change made to the code. As this was suggested by our company lawyers.
    Please review those and let me know If there's a problem with that.

As @yrodiere mentioned in this other pr #9629 (comment), we now have an AUTHORS.txt file where corporate contributors will be able to add such notices, feel free to check with your colleagues at Oracle (specifically Jean de Lavarene). After that, we would kindly ask you to remove any custom copyright text from the code comments, thanks.

@yrodiere
Copy link
Member

yrodiere commented Jun 5, 2025

Also please note that your contributions cannot, under any circumstance, be licensed under UPL, but must be licensed under ASL2 with the option to relicense under LGPL v2.1, as mentioned in your PR description:

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.

And thanks for contributing :)

return false;
}

public String getDual() {

Check notice

Code scanning / CodeQL

Missing Override annotation Note

This method overrides
Dialect.getDual
; it is advisable to add an Override annotation.
return "dual";
}

public String getFromDualForSelectOnly() {

Check notice

Code scanning / CodeQL

Missing Override annotation Note

This method overrides
Dialect.getFromDualForSelectOnly
; it is advisable to add an Override annotation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants