Skip to content

Conversation

@gwenn
Copy link
Contributor

@gwenn gwenn commented May 10, 2025

See sqlite/sqlite@f9c8ce3

Standardize the error messages generated by constraint failures to a format of "$TYPE constraint failed: $DETAIL".

Also in case extended result codes are activated, we need the & 0xFF.

And as there seems to be no way to tell extractUsingTemplate that there is no templateEnd, the dollar sign is used...

See original code and associated test for reference.


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.


https://hibernate.atlassian.net/browse/HHH-19444

See sqlite/sqlite@f9c8ce3
> Standardize the error messages generated by constraint failures to a format of "$TYPE constraint failed: $DETAIL".

Also in case [extended result codes](http://sqlite.org/c3ref/extended_result_codes.html) are activated, we need the `& 0xFF`.

And as there seems to be no way to tell `extractUsingTemplate` that there is no `templateEnd`, the linefeed is used...

See [original](https://github.com/gwenn/sqlite-dialect/blob/c87223460e3335ff4f041e012bd0d22df99fa2af/src/main/java/org/sqlite/hibernate/dialect/SQLiteDialect.java#L244-L253) code and associated [test](https://github.com/gwenn/sqlite-dialect/blob/c87223460e3335ff4f041e012bd0d22df99fa2af/src/test/java/org/hibernate/tutorial/annotations/AnnotationsIllustrationTest.java#L95-L105) for reference.
@mbellade mbellade merged commit 978c94a into hibernate:main May 13, 2025
23 of 24 checks passed
Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gwenn!

@gwenn gwenn deleted the HHH-19444 branch May 13, 2025 17:44
@gwenn
Copy link
Contributor Author

gwenn commented May 13, 2025

Thanks for your help @mbladel

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.

2 participants