GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TestRunnerStatement with dynamic Parameter-list by pesse · Pull Request #96 · utPLSQL/utPLSQL-java-api

Conversation

@pesse

@pesse pesse commented Oct 21, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
pesse added 21 commits July 19, 2019 10:38
@pesse
Add some more unit-tests
de3311c
@pesse
completely filled TestRunnerOptions for testing purposes
7f52a33
@pesse
Start exploring possibilities for a dynamic TestRunner-Statement
156f2d9
@pesse
Merge branch 'develop' into feature/testRunnerStatement_as_dynamic_pa…
a10b8b7
…ramList
@pesse
Make getSql public for better testability
166720b
@pesse
Test against interface
2ce1e79
@pesse
Slow approach towards new DynamicTestRunner-Statement
6100f3c
@pesse
Add failing test for Boolean support of DynamicParameterList
4f591ef
@pesse
Some more params of TestRunner handeled
4aba265
@pesse
We can add booleans now
b3d5779
Responsibility to build SQL fragment now also lies in the DynamicParameter
@pesse
Two more parameters in the new DynamicStatement
f2e1e01
@pesse
FileMappings are more complicated to pass around
5ff0ee2
Needed some ugly mocking, probably something to refactor in future
@pesse
Adding TestFileMappings
a7b8266
@pesse
Implement remaining dynamic parameters
e1b7dd3
@pesse
Remove helper comments
c0ca8cd
@pesse
Add version Bugfix-numbers
4afca5f
@pesse
Version isGreaterThanOrEqual and isLessOrEqual treat NULL in base ver…
32b7d56
…sion

as being equal to anything in comparing version
@pesse
Add tests for all utPLSQL versions
1b9e0b2
@pesse
Added "end case" part
2a3d9df
@pesse
Replace old TestRunnerStatements with the new DynamicTestRunnerStatement
19a9037
@pesse
Switch to OpenJDK 8
1751d68
@pesse
pesse requested a review from Pazus October 21, 2019 21:15
pesse added 5 commits October 21, 2019 23:31
@pesse
Add utPLSQL 3.1.8 version
02114ae
@pesse
Fix Version-String
6a0723a
@pesse
Merge branch 'develop' into feature/testRunnerStatement_as_dynamic_pa…
3799867
…ramList
@pesse
Test JDK13 also with version 3.1.8
6ffa576
@pesse
We don't need Maven CFG anymore
97be74d
Pazus
Pazus reviewed Oct 22, 2019
View reviewed changes
Comment thread src/main/java/org/utplsql/api/Version.java
} else if (i1 == null) {
return -1;
return nullMeansEqual ? 0 : -1;
} else if (i2 == null) {

@Pazus Pazus Oct 22, 2019

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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 check nullMeansEqual here so that comparetoWithNulls is symmetric?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@pesse pesse Oct 22, 2019

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

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...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jgebal jgebal Oct 22, 2019

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@pesse pesse Oct 22, 2019

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

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 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pesse
pesse merged commit 74daeb6 into develop Oct 22, 2019
@pesse
pesse deleted the feature/testRunnerStatement_as_dynamic_paramList branch October 22, 2019 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jgebal jgebal jgebal left review comments
+1 more reviewer
@Pazus Pazus Pazus left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

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

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@pesse @jgebal @Pazus
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.