-
Notifications
You must be signed in to change notification settings - Fork 58
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
Make sql execute return promise api-877 #1046
Conversation
@@ -2,3 +2,4 @@ src/codec/*.ts | |||
src/codec/custom/*.ts | |||
src/.eslintrc.js | |||
lib/** | |||
docs/** |
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.
Needed because of linting does eslint .
. I forgot to add docs folder before
@@ -483,22 +482,22 @@ describe('Data type test', function () { | |||
` | |||
var map = instance_0.getMap("${mapName}"); | |||
for (var key = 1; key < 12; key++) { | |||
map.set(new java.lang.Integer(key), java.time.LocalDate.of(key+50002,key+1,key)); | |||
map.set(new java.lang.Integer(key), java.time.LocalDate.of(key+5002,key+1,key)); |
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.
I changed this for back compat tests because year was a short in 4.2.
Codecov Report
@@ Coverage Diff @@
## master #1046 +/- ##
==========================================
- Coverage 92.56% 92.32% -0.25%
==========================================
Files 432 432
Lines 16730 16712 -18
Branches 1037 1034 -3
==========================================
- Hits 15486 15429 -57
- Misses 979 1017 +38
- Partials 265 266 +1
Continue to review full report at Codecov.
|
* Make execute return promise * Update code samples and docs * Change date string format * Change year * Update SqlResult * Update sql service * Update tests * Review comments * Fix
Makes
execute
andexecuteStatement
methods inSqlService
return promises ofSqlResult
. Update tests, code samples and documentation accordingly.Note that we do not need any conditional tests for back compatibility because using
await
with a non async function works. It will convert the returned value to a promise likePromise.resolve(returnedValue)
implicitly but I think it is better not to change tests for readability. The promise overhead only affects ~50 tests and the overhead is very small.