Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TestRunnerStatement with dynamic Parameter-list#96

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

pesse
Copy link
Member

@pessepesse commentedOct 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 added21 commitsJuly 19, 2019 10:38
Responsibility to build SQL fragment now also lies in the DynamicParameter
Needed some ugly mocking, probably something to refactor in future
…sionas being equal to anything in comparing version
@pessepesse requested a review fromPazusOctober 21, 2019 21:15
if (i1 == null && i2 == null) {
return 0;
} else if (i1 == null) {
return -1;
returnnullMeansEqual ? 0 :-1;
} else if (i2 == null) {
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Sorry, I don't get it...

Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

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 byisGreaterOrEqualTo andisLessOrEqualTo.
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 usingisGreaterOrEqualTo - 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 theisGreaterOrEqualTo function separately so it's more clear we're not implementing a strictcompareTo here.

@pessepesse merged commit74daeb6 intodevelopOct 22, 2019
@pessepesse deleted the feature/testRunnerStatement_as_dynamic_paramList branchOctober 22, 2019 15:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jgebaljgebaljgebal left review comments

@PazusPazusPazus left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Different FileMapper call 3.0.0 to 3.0.2
3 participants
@pesse@jgebal@Pazus

[8]ページ先頭

©2009-2025 Movatter.jp