Skip to content

Added test for the pragma validate_ecsql_inserts #8087

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 18 commits into
base: master
Choose a base branch
from

Conversation

RohitPtnkr1996
Copy link
Contributor

imodel-native: iTwin/imodel-native#1110

assert.isTrue(await reader.step());

try {
ecdb.withCachedWriteStatement(`INSERT INTO test.Child(Parent.Id, Parent.RelECClassId) VALUES(1, ${parentClassId})`, () => {});
Copy link
Contributor

Choose a reason for hiding this comment

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

Just pasting this as a comment from teams discussion
I think it would be good to have another test that uses insertElement and updateElement instead of a low level sql statement. Not sure if you can force an invalid class id in those though..
To make sure those methods fail gracefully if bind fails, as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@RohitPtnkr1996 RohitPtnkr1996 requested a review from rschili May 30, 2025 03:57
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