← 返回首页
TestRunnerStatement with dynamic Parameter-list by pesse · Pull Request #96 · utPLSQL/utPLSQL-java-api · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

TestRunnerStatement with dynamic Parameter-list#96

Merged
pesse merged 26 commits into
developfrom
feature/testRunnerStatement_as_dynamic_paramList
Oct 22, 2019
Merged

TestRunnerStatement with dynamic Parameter-list#96
pesse merged 26 commits into
developfrom
feature/testRunnerStatement_as_dynamic_paramList

Conversation

Copy link
Copy Markdown
Member

pesse commented Oct 21, 2019
edited
Loading

This removes the necessity for several different TestRunnerStatements, adding all functionality into one Statement with a dynamic Parameterlist.
It's now very clear which features are supported by which utPLSQL version.
Also, NULL-parameters are now handled much better, allowing the core to deal with defaults.

Fixes #92

pesse requested a review from Pazus October 21, 2019 21:15
} else if (i1 == null) {
return -1;
return nullMeansEqual ? 0 : -1;
} else if (i2 == null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Don't we need to check nullMeansEqual here so that comparetoWithNulls is symmetric?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Sorry, I don't get it...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Shouldn't i2 be treated same way as i1 so that if i2 is null you check nullMeansEqual

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Ah.
I thought about this a lot yesterday. The thing is - we are not implementing the normal compareTo method, but we implement something which is only used by isGreaterOrEqualTo and isLessOrEqualTo.
For these 2 cases I think the comparison order is important, because the lazier "equal" depends on the base version to have a null.

Example:
Technically, when comparing 3.1.7 with 3.1.7.3085, 3.1.7 is less and not equal. That's how the comparison was before (null being treated as 0 basically).
But that's not what I want when using isGreaterOrEqualTo - I want this function to be forgiving if I only provide 3.1.7 as base, so any number in the 4th level of the comparison should be treated as being equal.
On the other hand, when I provide a specific base (e.g. 3.1.7.3085), I really expect it to be precise, so I can't treat i2 the same way in that case.

Maybe I should not use parameters here and instead write the isGreaterOrEqualTo function separately so it's more clear we're not implementing a strict compareTo here.

pesse merged commit 74daeb6 into develop Oct 22, 2019
pesse deleted the feature/testRunnerStatement_as_dynamic_paramList branch October 22, 2019 15:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Different FileMapper call 3.0.0 to 3.0.2

3 participants

Footer

© 2026 GitHub, Inc.